c#书店管理系统(winform+linq to entity+sqlserver2008)
使用vs2010+sqlserver2008进行开发的
两个人写的
其中一个写的是代码都揉一起的(BookStore)
一个是分层的(QzwBookStore)
里面使用了spring.net linq to entity等
三层架构(面向接口) 参照这个:http://developer.51cto.com/art/200806/77172.htm
一两天赶出来的东西 要求就别太高了 俺自己的课设
*数据库使用 需要创建一个BookStore的数据库 然后执行BookStore.sql
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 505 2011-05-29 17:33 qzw-hf-bookstoretestBLLApp.Config
文件 7680 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugBLL.dll
文件 505 2011-05-29 17:33 qzw-hf-bookstoretestBLLinDebugBLL.dll.config
文件 19968 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugBLL.pdb
文件 28672 2009-07-21 01:50 qzw-hf-bookstoretestBLLinDebugCommon.Logging.dll
文件 5632 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugFactory.dll
文件 17920 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugFactory.pdb
文件 4608 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugIBLL.dll
文件 7680 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugIBLL.pdb
文件 5120 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugIDAL.dll
文件 7680 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugIDAL.pdb
文件 99328 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugModel.dll
文件 134656 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugModel.pdb
文件 839680 2009-12-17 03:23 qzw-hf-bookstoretestBLLinDebugSpring.Core.dll
文件 2801152 2009-12-17 03:23 qzw-hf-bookstoretestBLLinDebugSpring.Core.pdb
文件 2444176 2009-12-17 03:23 qzw-hf-bookstoretestBLLinDebugSpring.Core.xml
文件 891 2011-05-29 17:33 qzw-hf-bookstoretestBLLinDebugSpring.xml.config
文件 9728 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugSQLServerDAL.dll
文件 30208 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugSQLServerDAL.pdb
文件 3541 2011-05-29 17:35 qzw-hf-bookstoretestBLLBLL.csproj
文件 142 2011-06-02 09:48 qzw-hf-bookstoretestBLLBLL.csproj.vs10x
文件 2703 2011-05-29 15:05 qzw-hf-bookstoretestBLLBookBLL.cs
文件 1853 2011-05-29 18:28 qzw-hf-bookstoretestBLLobjDebugBLL.csproj.FileListAbsolute.txt
文件 7680 2011-05-29 21:10 qzw-hf-bookstoretestBLLobjDebugBLL.dll
文件 19968 2011-05-29 21:10 qzw-hf-bookstoretestBLLobjDebugBLL.pdb
文件 6203 2011-05-29 21:10 qzw-hf-bookstoretestBLLobjDebugDesignTimeResolveAssemblyReferencesInput.cache
文件 1054 2011-05-28 10:28 qzw-hf-bookstoretestBLLPricePolicyBLL.cs
文件 1436 2011-05-24 13:27 qzw-hf-bookstoretestBLLPropertiesAssemblyInfo.cs
文件 891 2011-05-29 17:33 qzw-hf-bookstoretestBLLSpring.xml.config
文件 535 2011-05-28 15:29 qzw-hf-bookstoretestBLLVIPBLL.cs
............此处省略544个文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Factory;
using IDAL;
using IBLL;
using Model;
using SQLServerDAL;
namespace BLL
{
public class BookBLL : IBookBLL
{
public IQueryable GetAll()
{
IBookDAL bookDAL = DALFactory.CreateBookDAL();
return bookDAL.GetAll();
}
public IQueryable GetByName(string name)
{
IBookDAL bookDAL = DALFactory.CreateBookDAL();
return bookDAL.GetUsingByName(name);
}
public BookInfo GetByFullName(string name)
{
IBookDAL bookDAL = DALFactory.CreateBookDAL();
return bookDAL.GetUsingByFullName(name);
}
public IQueryable GetAllUsing()
{
IBookDAL bookDAL = DALFactory.CreateBookDAL();
return bookDAL.GetAllUsing();
}
public IQueryable GetAllUnUsing()
{
IBookDAL bookDAL = DALFactory.CreateBookDAL();
return bookDAL.GetAllUnUsing();
}
public bool AddBookOrder(BookOrder_P bookOrderP List bookOrderDs)
{
IBookOrder_PDAL bookOrderPDAL = DALFactory.CreateBookOrder_PDAL();
IBookOrder_DDAL bookOrderDDAL = DALFactory.CreateBookOrder_DDAL();
try
{
bookOrderP = bookOrderPDAL.AddOne(bookOrderP);
for (int i = 0; i < bookOrderDs.Count; i++)
{
bookOrderDs[i].BookOrder_P_ID = bookOrderP.BookOrder_P_ID;
}
bookOrderDs = bookOrderDDAL.AddSome(bookOrderDs);
DBHelper.Entity.SaveChanges();
return true;
}
catch (Exception)
{
return false;
}
}
public bool AddStock(Stock_P stockP List stockDs)
{
IStock_PDAL stockPDAL = DALFactory.CreateStock_PDAL();
IStock_DDAL stockDDAL = DALFactory.CreateStock_DDAL();
try
{
stockP = stockPDAL.AddOne(stockP);
for(int i=0;i {
stockDs[i].Stock_P_ID = stockP.Stock_P_ID;
}
stockDs = stockDDAL.AddSome(stockDs);
DBHelper.Entity.SaveChanges();
return true;
}
catch (Exception)
{
return false;
throw;
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 505 2011-05-29 17:33 qzw-hf-bookstoretestBLLApp.Config
文件 7680 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugBLL.dll
文件 505 2011-05-29 17:33 qzw-hf-bookstoretestBLLinDebugBLL.dll.config
文件 19968 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugBLL.pdb
文件 28672 2009-07-21 01:50 qzw-hf-bookstoretestBLLinDebugCommon.Logging.dll
文件 5632 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugFactory.dll
文件 17920 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugFactory.pdb
文件 4608 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugIBLL.dll
文件 7680 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugIBLL.pdb
文件 5120 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugIDAL.dll
文件 7680 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugIDAL.pdb
文件 99328 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugModel.dll
文件 134656 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugModel.pdb
文件 839680 2009-12-17 03:23 qzw-hf-bookstoretestBLLinDebugSpring.Core.dll
文件 2801152 2009-12-17 03:23 qzw-hf-bookstoretestBLLinDebugSpring.Core.pdb
文件 2444176 2009-12-17 03:23 qzw-hf-bookstoretestBLLinDebugSpring.Core.xm
文件 891 2011-05-29 17:33 qzw-hf-bookstoretestBLLinDebugSpring.xm
文件 9728 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugSQLServerDAL.dll
文件 30208 2011-05-29 21:10 qzw-hf-bookstoretestBLLinDebugSQLServerDAL.pdb
文件 3541 2011-05-29 17:35 qzw-hf-bookstoretestBLLBLL.csproj
文件 142 2011-06-02 09:48 qzw-hf-bookstoretestBLLBLL.csproj.vs10x
文件 2703 2011-05-29 15:05 qzw-hf-bookstoretestBLLBookBLL.cs
文件 1853 2011-05-29 18:28 qzw-hf-bookstoretestBLLobjDebugBLL.csproj.FileListAbsolute.txt
文件 7680 2011-05-29 21:10 qzw-hf-bookstoretestBLLobjDebugBLL.dll
文件 19968 2011-05-29 21:10 qzw-hf-bookstoretestBLLobjDebugBLL.pdb
文件 6203 2011-05-29 21:10 qzw-hf-bookstoretestBLLobjDebugDesignTimeResolveAssemblyReferencesInput.cache
文件 1054 2011-05-28 10:28 qzw-hf-bookstoretestBLLPricePolicyBLL.cs
文件 1436 2011-05-24 13:27 qzw-hf-bookstoretestBLLPropertiesAssemblyInfo.cs
文件 891 2011-05-29 17:33 qzw-hf-bookstoretestBLLSpring.xm
文件 535 2011-05-28 15:29 qzw-hf-bookstoretestBLLVIPBLL.cs
............此处省略544个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)