库存管理系统软件设计源代码Word格式.docx
《库存管理系统软件设计源代码Word格式.docx》由会员分享,可在线阅读,更多相关《库存管理系统软件设计源代码Word格式.docx(81页珍藏版)》请在冰豆网上搜索。
];
a.Name=(string)row["
name"
a.Pass=(string)row["
pass"
}
returna;
///<
summary>
///添加
/summary>
paramname="
login"
>
<
/param>
returns>
/returns>
publicstaticboolAdd(stringlogin)
insertintoAdminvalues('
'
)"
login);
returnWeb.DBHelper.ExecuteSql(sql);
///删除
publicstaticboolDel(intid)
stringsql="
deletefromAdminwhereid="
+id;
///获取所有用户信息
publicstaticDataTableGet()
select*fromadmin"
;
returnWeb.DBHelper.GetTable(sql,"
///修改密码
publicstaticboolEditPass(stringpass,intid)
updateAdminsetpass='
whereid={1}"
pass,id);
}
publicclassChuServer
///装箱
row"
staticChuGet(DataRowrow)
Chuc=newChu();
c.Buy=(string)row["
buy"
c.Id=(int)row["
c.Num=(int)row["
num"
c.People=PeopleServer.GetByID((int)row["
people_ID"
]);
c.Price=(double)row["
price"
c.Thing=ThingServer.GetByID((int)row["
thing_ID"
c.Intime=(DateTime)row["
intime"
returnc;
///获取所有出库记录
key"
chuType"
publicstaticList<
Chu>
Get(stringkey,intchuType,intstartindex,intpagesize)
select*fromchu_Viewwherechutype={0}{1}orderbyiddesc"
chuType,key);
List<
cs=newList<
();
DataTabledt=Web.DBHelper.GetTable(sql,startindex,pagesize,"
chu"
cs.Add(Get(row));
returncs;
///查询出库的数量
publicstaticintGetCount(stringkey,intchuType)
selectcount(*)fromchu_Viewwherechutype={0}{1}'
chuType,key);
returnConvert.ToInt32(Web.DBHelper.GetScalar(sql));
///添加出库记录
c"
publicstaticboolAdd(Chuc)
insertintochuvalues('
{1},{2},{3},{4},'
{5}'
{6})"
c.Buy,c.People.Id,c.Thing.Id,c.Num,c.Price,DateTime.Now,c.ChuType);
usingWeb;
publicclassExitServer
///添加退货入库记录
e"
thingID"
peopeleID"
publicstaticboolAdd(Exite)
insert[Exit]values({0},{1},getdate(),'
{2}'
{3})"
e.Thing.Id,e.Num,e.Because,e.People.Id);
///封装
staticExitGet(DataRowrow)
Exite=newExit();
e.Because=(string)row["
Because"
e.Id=(int)row["
ID"
e.InTime=(DateTime)row["
InTIme"
e.Num=(int)row["
Num"
e.People=PeopleServer.GetByID((int)row["
People_ID"
e.Thing=ThingServer.GetByID((int)row["
Thing_ID"
returne;
///获取所有退款入库记录
startindex"
pagesize"
Exit>
Get(intstartindex,intpagesize,stringkey)
select*fromExit_Viewwherenamelike'
%{0}%'
orderbyiddesc"
key);
Exit"
e=newList<
e.Add(Get(row));
///获取所有退款入库的数量
publicstaticintGetCount(stringkey)
selectcount(*)fromExit_Viewwherenamelike'
publicclassJinServer
///添加进货
j"
publicstaticboolAdd(Jinj)
insertintojinvalues({0},{1},{2},{3},'
{4}'
{5},'
{6}'
j.Mfg.Id,j.People.Id,j.Thing.Id,j.Num,DateTime.Now,j.Price,j.CaiGou);
staticJinGet(DataRowrow)
Jinj=newJin();
j.Id=(int)row["
j.Mfg=MFGServer.GetByID((int)row["
mfg_ID"
j.Num=(int)row["
j.People=PeopleServer.GetByID((int)row["
j.Thing=ThingServer.GetByID((int)row["
j.Intime=(DateTime)row["
j.Price=(double)row["
j.CaiGou=(string)row["
CaiGou"
returnj;
///获取所有进货记录
Jin>
Get(stringkey,intstartindex,intpagesize)
select*fromjin_View{0}orderbyiddesc"
key);
js=newList<
jin"
js.Add(Get(row));
returnjs;
///获取数量
selectcount(*)fromjin_View{0}"
publicclassMFGServer
staticMFGGet(DataRowrow)
MFGm=newMFG();
m.Address=(string)row["
address"
m.Id=(int)row["
m.Name=(string)row["
m.People=(string)row["
people"
m.Tel=(string)row["
tel"
returnm;
///获取所有厂商
MFG>
Get()
select*fromMFG"
ms=newList<
mfg"
foreach(DataRowrowindt.Rows)
ms.Add(Get(row));
returnms;
///获取明细
publicstaticMFGGetByID(intid)
select*fromMFGwhereid={0}"
id);
if(dt.Rows.Count>
0)
returnGet(dt.Rows[0]);
returnnull;
///修改
m"
publicstaticboolEdit(MFGm)
updatemfgsetaddress='
name='
{1}'
people='
tel='
{3}'
whereid={4}"
m.Address,m.Name,m.People,m.Tel,m.Id);
///添加厂商
publicstaticboolAdd(MFGm)
insertintomfgvalues('
m.Name,m.People,m.Tel,m.Address);
///删除厂商
deletefrommfgwhereid={0}"
publicclassPeopleServer
staticPeopleGet(DataRowrow)
Peoplep=newPeople();
p.Address=(string)row["
p.Age=(int)row["
age"
p.Id=(int)row["
p.Tel=(string)row["
p.Name=(string)row["
returnp;
///获取所有人员
People>
select*frompeople"
ps=newList<
ps.Add(Get(row));
returnps;
///