1 / 20
文档名称:

学生管理系统web程序设计代码.doc

格式:doc   大小:111KB   页数:20页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

学生管理系统web程序设计代码.doc

上传人:水中望月 2019/3/8 文件大小:111 KB

下载得到文件列表

学生管理系统web程序设计代码.doc

相关文档

文档介绍

文档介绍:房屋销售管理系统一、HouseManagerDAL数据访问层中设计三个类:(1);using;;;using;;{lassCustomerService{///ustomerGetCustomerByLoginName(stringname){stringsql=("select*fromCustomerswhereLoginName='{0}'",name);returnGetCustomerBySQL(sql);}///ustomerGetCustomerById(intid){stringsql=("select*fromCustomerswhereCustomerId={0}",id);returnGetCustomerBySQL(sql);}///私有方法,ustomerGetCustomerBySQL(stringsql){using(SqlConnectionconn=newSqlConnection()){Customerc=null;try{();mandcmd=mand(sql,conn);SqlDataReadersdr=();if(()){c=newCustomer();=(int)sdr["CustomerId"];=sdr["LoginName"].ToString();=sdr["Password"].ToString();}}catch(Exceptionex){();}finally{();}returnc;}}}}(2)在DBHelper中usingSystem;using;;{lassDBHelper{publicstaticreadonlystringconnectString="server=.;database=HouseDB;uid=sa;pwd=123456";}}(3)在HouseService中usingSystem;using;;;using;;{lassHouseService{///获取所有发布的房屋信息publicstaticIList<House>GetAllHouse(){List<House>houses=newList<House>();using(SqlConnectionconn=newSqlConnection()){try{();mandcmd=mand("select*fromHouses",conn);SqlDataReadersdr=();while(()){Househ=newHouse();=(int)sdr["HouseId"];=sdr["HouseTypeName"].ToString();=(int)sdr["Area"];=(sdr["Price"]);=sdr["Address"].ToString();//=((int)sdr["CustomerId"]);(h);}}catch(Exceptionex){();}finally{();}}returnhouses;}///根据房屋信息主键ID删除发布的房屋信息///<returns>受影响的行数</returns>publicstaticintDeleteHouseById(inthouserId){intcount=0;using(SqlConne