欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > DOC文档下载  

    [高等教育]毕业设计附件封面.doc

    • 资源ID:4562972       资源大小:994.37KB        全文页数:108页
    • 资源格式: DOC        下载积分:10金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要10金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    [高等教育]毕业设计附件封面.doc

    毕 业 设 计 附 件 一程序清单专业 学生姓名王子悦班级U计算机081学号0811503126指导教师安晶AdminBLL.csusing System;using System.Collections.Generic;using System.Linq;using System.Web;using ProductStockSystem.Model;using ProductStockSystem.DAO;namespace ProductStockSystem.BLL / <summary> /AdminBll 的摘要说明:管理员信息处理的业务层 / </summary> public class AdminBLL /*保存业务逻辑错误信息*/ private string errMessage; public string getErrMessage() return this.errMessage; public AdminBLL() this.errMessage = "" /*验证用户登录信息*/ public bool CheckLogin(Admin admin) /*建立数据访问层对象*/ AdminDAO adminDAO = new AdminDAO(); /*首先验证用户名是否存在*/ if (!adminDAO.ExistUsername(admin.getUsername() this.errMessage = "对不起,用户名不存在!" return false; /*如果用户名存在再验证密码输入是否正确*/ if (!adminDAO.CheckUser(admin) this.errMessage = "对不起,密码错误!" return false; return true; /*修改密码*/ public bool ChangePassword(string username, string password) AdminDAO adminDAO = new AdminDAO(); return adminDAO.ChangePassword(username, password); AdminDAO.csusing System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Data;using ProductStockSystem.DB;using ProductStockSystem.Model;namespace ProductStockSystem.DAO / <summary> /AdminDAO 的摘要说明: 管理员信息处理数据层 / </summary> public class AdminDAO /*保存业务逻辑错误信息*/ private string errMessage; public void setErrMessage(string errMessage) this.errMessage = errMessage; public string getErrMessage() return this.errMessage; public AdminDAO() this.errMessage = "" public bool AddUser(string username, string password) if (username = "") this.errMessage = "用户名不能为空!" return false; if (password = "") this.errMessage = "密码不能为空!" return false; string querySql = "select * from admin where username=" + SqlString.GetQuotedString(username); DataBase db = new DataBase(); DataSet ds = db.GetDataSet(querySql); if (ds.Tables0.Rows.Count > 0) this.errMessage = "用户名已经存在!" return false; string insertString = "insert into admin (username,password) values (" insertString += SqlString.GetQuotedString(username) + "," + SqlString.GetQuotedString(password) + ")" if (db.InsertOrUpdate(insertString) < 0) this.errMessage = "用户添加失败!" return false; return true; /*查询帐号是否存在,存在返回true,不存在返回false*/ public bool ExistUsername(string username) DataBase db = new DataBase(); string query_sql = "select * from admin where username = " + SqlString.GetQuotedString(username); System.Data.DataSet ds = db.GetDataSet(query_sql); if (ds.Tables0.Rows.Count = 0) return false; return true; /*查询帐号密码是否都正确*/ public bool CheckUser(Admin admin) DataBase db = new DataBase(); string query_sql = "select * from admin where username = " + SqlString.GetQuotedString(admin.getUsername() + " and password = " + SqlString.GetQuotedString(admin.getPassword(); System.Data.DataSet ds = db.GetDataSet(query_sql); if (ds.Tables0.Rows.Count = 0) return false; return true; /*修改密码*/ public bool ChangePassword(string username, string password) string sql = "update admin set password=" + SqlString.GetQuotedString(password) + " where username='" + username + "'" DataBase db = new DataBase(); return db.InsertOrUpdate(sql) > 0; /*根据用户名查询用户信息*/ public static Admin GetAdminInfo(string username) Admin admin = null; string querySql = "select * from admin where username=" + SqlString.GetQuotedString(username); DataBase db = new DataBase(); System.Data.DataSet ds = db.GetDataSet(querySql); if (ds.Tables0.Rows.Count > 0) System.Data.DataRow dr = ds.Tables0.Rows0; admin = new Admin(); admin.setUsername(username); admin.setPassword(dr"password".ToString(); admin.setClassManageFlag(Convert.ToInt32(dr"class_manage_flag"); admin.setProductManageFlag(Convert.ToInt32(dr"product_manage_flag"); admin.setProductInFlag(Convert.ToInt32(dr"productIn_flag"); admin.setProductOutFlag(Convert.ToInt32(dr"productOut_flag"); admin.setStockFlag(Convert.ToInt32(dr"stock_flag"); admin.setQueryFlag(Convert.ToInt32(dr"record_query_flag"); admin.setSupplyerManageFlag(Convert.ToInt32(dr"supplyer_manage_flag"); admin.setCustomerManageFlag(Convert.ToInt32(dr"customer_manage_flag"); admin.setUserManageFlag(Convert.ToInt32(dr"user_manage_flag"); return admin; /*设置用户权限*/ public bool UpdateFlag(Admin admin) string updateString = "update admin set class_manage_flag=" updateString += admin.getClassManageFlag() + ",product_manage_flag=" updateString += admin.getProductManageFlag() + ",productIn_flag=" updateString += admin.getProductInFlag() + ",productOut_flag=" updateString += admin.getProductOutFlag() + ",stock_flag=" updateString += admin.getStockFlag() + ",record_query_flag=" updateString += admin.getQueryFlag() + ",supplyer_manage_flag=" updateString += admin.getSupplyerManageFlag() + ",customer_manage_flag=" updateString += admin.getCustomerManageFlag() + ",user_manage_flag=" updateString += admin.getUserManageFlag() + " where username=" + SqlString.GetQuotedString(admin.getUsername(); DataBase db = new DataBase(); return db.InsertOrUpdate(updateString) > 0; CustomerDAO.csusing System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using ProductStockSystem.Model;using ProductStockSystem.DB;/ <summary>/ CustomerDAO 的摘要说明:客户信息管理处理业务逻辑层/ </summary>public class CustomerDAO /*保存业务处理的错误信息*/ private string errMessage; public string getErrMessage() return this.errMessage; public CustomerDAO() this.errMessage = "" /*添加客户信息*/ public bool AddCustomer(Customer customer) /*验证客户名称不能为空*/ if (customer.getCustomerName() = "") this.errMessage = "对不起,客户名称输入不能为空!" return false; /*验证客户名称是否已经存在*/ string querySql = "select * from t_customer where customer_name=" + SqlString.GetQuotedString(customer.getCustomerName(); DataBase db = new DataBase(); DataSet ds = db.GetDataSet(querySql); if (ds.Tables0.Rows.Count > 0) this.errMessage = "对不起,该客户名称已经存在!" return false; /*执行客户信息的添加操作*/ string insertString = "insert into t_customer (customer_name,person_name,telephone,address) values (" insertString += SqlString.GetQuotedString(customer.getCustomerName() + "," insertString += SqlString.GetQuotedString(customer.getPersonName() + "," insertString += SqlString.GetQuotedString(customer.getTelephone() + "," insertString += SqlString.GetQuotedString(customer.getAddress() + ")" if (db.InsertOrUpdate(insertString) < 0) this.errMessage = "客户信息添加失败!" return false; return true; /*根据客户编号查询客户信息*/ public static Customer QueryCustomer(int customerId) Customer customer = null; string querySql = "select * from t_customer where customer_id=" + customerId; DataBase db = new DataBase(); DataSet ds = db.GetDataSet(querySql); if (ds.Tables0.Rows.Count > 0) DataRow dr = ds.Tables0.Rows0; customer = new Customer(); customer.setCustomerId(customerId); customer.setCustomerName(dr"customer_name".ToString(); customer.setPersonName(dr"person_name".ToString(); customer.setTelephone(dr"telephone".ToString(); customer.setAddress(dr"address".ToString(); return customer; /*删除客户信息*/ public bool DeleteCustomer(int customerId) /*查询是否还存在该客户的出库信息*/ string querySql = "select * from t_product_out where customer_id=" + customerId; DataBase db = new DataBase(); DataSet ds = db.GetDataSet(querySql); if (ds.Tables0.Rows.Count > 0) this.errMessage = "还存在该客户的出库信息!无法删除!" return false; /*执行客户信息的删除*/ string deleteString = "delete from t_customer where customer_id=" + customerId; if (db.InsertOrUpdate(deleteString) < 0) this.errMessage = "客户信息删除失败!" return false; return true; ProductClassDAO.csusing System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using ProductStockSystem.DB;using ProductStockSystem.Model;using System.Collections;namespace ProductStockSystem.DAO / <summary> / ProductClassDAO 的摘要说明:图书类别信息处理数据层 / </summary> public class ProductClassDAO private string errMessage; public string getErrMessage() return this.errMessage; public ProductClassDAO() this.errMessage = "" /*添加图书类别信息*/ public bool AddProductClass(ProductClass productClass) if (productClass.getClassName() = "") this.errMessage = "请输入图书类别名称!" return false; DataBase db = new DataBase(); string query_sql = "select * from t_class where class_name = " + SqlString.GetQuotedString(productClass.getClassName(); System.Data.DataSet ds = db.GetDataSet(query_sql); if (ds.Tables0.Rows.Count > 0) this.errMessage = "你输入的图书类别名称已经存在!" return false; string sql = "insert into t_class (class_name) values (" + SqlString.GetQuotedString(productClass.getClassName() + ")" return db.InsertOrUpdate(sql) > 0; /*根据图书类别编号取得图书类别信息*/ public static ProductClass GetProductClass(int classId) ProductClass productClass = null; string queryString = "select * from t_class where class_id=" + classId; DataBase db = new DataBase(); DataSet classDs = db.GetDataSet(queryString); if (classDs.Tables0.Rows.Count > 0) DataRow dr = classDs.Tables0.Rows0; productClass = new ProductClass(); productClass.setClassId(classId); productClass.setClassName(dr"class_name".ToString(); return productClass; /*更新图书类别信息*/ public bool UpdateProductClass(ProductClass productClass) if (productClass.getClassName() = "") this.errMessage = "请输入图书类别名称!" return false; DataBase db = new DataBase(); string query_sql = "select * from t_class where class_id<>" + productClass.getClassId() + " and class_name = " + SqlString.GetQuotedString(productClass.getClassName(); System.Data.DataSet ds = db.GetDataSet(query_sql); if (ds.Tables0.Rows.Count > 0) this.errMessage = "你输入的图书类别名称已经存在!" return false; string sql = "update t_class set class_name=" + SqlString.GetQuotedString(productClass.getClassName() + " where class_id=" + productClass.getClassId(); return db.InsertOrUpdate(sql) > 0; /*删除某个图书类别*/ public bool DeleteProductClass(int classId) /*首先查询该图书类别下是否还存在图书信息*/ string querySql = "select * from t_product where class_id=" + classId; DataBase db = new DataBase(); DataSet ds = db.GetDataSet(querySql); if (ds.Tables0.Rows.Count > 0) this.errMessage = "对不起,还存在该类别的图书信息!" return false; /*如果该类别下已经没有图书信息了就开始执行删除操作*/ string deleteString = "delete from t_class where class_id=" + classId; if (db.InsertOrUpdate(deleteString) < 0) this.errMessage = "删除图书类别信息发生了错误!" return false; return true; /*查询所有的图书类别*/ public ArrayList QueryAllProductClass() ArrayList classList = new ArrayList(); string queryString = "select * from t_class" DataBase db = new DataBase(); DataSet classDs = db.GetDataSet(queryString);

    注意事项

    本文([高等教育]毕业设计附件封面.doc)为本站会员(sccc)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开