Exemple #1
0
 /// <summary>
 /// 验证登陆用户信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public DataTable userAuthentication(HY_Model.User model)
 {
     try
     {
         DataTable dt = new DataTable();
         string sql = "select h_UserName,h_yUserPwd,h_yUserPwd,h_Status from HY_User where h_UserName='******' and h_yUserPwd='" + model.PassWord + "'";
         dt = hy_help.ExecuteQuery(sql);
         return dt;
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
 /// <summary>
 /// 新增BOM物料
 /// </summary>
 /// <param name="model">BOM物料MODEL实体类</param>
 /// <returns></returns>
 public int com_HY_Bomlist(HY_Model.HY_Bomlist model)
 {
     try
     {
         string sql = "insert into HY_BomInfo(b_SKID,b_CID,b_CustomerID,b_No,b_Material,b_BomSize,b_Notes,b_Height,b_Tonnage,b_Name,b_ModClass,b_SPerson,b_Department,b_SDate) values('" + model.B_SKID + "','" + model.B_CID + "','" + model.B_CustomerID + "','" + model.B_No + "','" + model.B_Material + "','" + model.B_BomSize + "','" + model.B_Notes + "','" + model.B_Height + "','" + model.B_Tonnage + "','" + model.B_Name + "','" + model.B_ModClass + "','" + model.B_SPerson + "','" + model.B_Department + "','" + model.B_SDate + "')";
         HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
         int res = hy_help.insertEx(sql);
         return res;
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
Exemple #3
0
        /// <summary>
        /// 用户执行增加操作
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int userOperation(HY_Model.User model)
        {
            try
            {
                string sql = "insert into HY_user(h_UserName,h_yUserPwd,h_Status) values('" + model.UserName + "','" + model.PassWord + "','"+model.UserStatus+"')";
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
 /// <summary>
 /// 新增BOM物料明细
 /// </summary>
 /// <param name="model">BOM物料明细MODEL实体类</param>
 /// <returns></returns>
 public int com_HY_BomDetailslist(HY_Model.HY_BomDetails model)
 {
     try
     {
         string sql = "insert into HY_BomDetails(d_SKID,d_CID,d_PID,d_PName,d_Model,d_Specifications,d_Amount,d_Heat,d_Notes,d_SPerson,d_ModClass) values('" + model.D_SKID + "','" + model.D_CID + "','" + model.D_PID + "','" + model.D_PName + "','" + model.D_Model + "','" + model.D_Specifications + "','" + model.D_Amount + "','" + model.D_Heat + "','" + model.D_Notes + "','" + model.D_SPerson + "','" + model.ModClass+ "')";
         HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
         int res = hy_help.insertEx(sql);
         return res;
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
        /// <summary>
        /// 新增部门
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int com_Department(HY_Model.HY_Department model)
        {
            try
            {
                string sql = "insert into HY_Department(d_Name) values('" + model.D_Name + "')";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
        /// <summary>
        /// 系统信息基础设置
        /// </summary>
        /// <param name="model">Information实体类</param>
        /// <param name="I_ID">ID值</param>
        /// <returns></returns>
        public int com_Information(HY_Model.HY_Information model, int I_ID)
        {
            try
               {
               string sql = "update HY_Information set I_CompanyName='" + model.S_Company + "',I_Range='" + model.S_Range + "',I_Address='" + model.S_Address + "' where I_ID='" + I_ID + "'";
               HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
               int res = hy_help.insertEx(sql);
               return res;
               }
               catch (Exception EX)
               {

               throw EX;
               }
        }
        /// <summary>
        /// 新增供应商信息
        /// </summary>
        /// <param name="model">供应商信息实体层</param>
        /// <returns></returns>
        public int com_Supplier(HY_Model.HY_Supplier model)
        {
            try
            {
                string sql = "insert into HY_Supplier(s_gyName,s_jName,s_Area,s_cpName,s_Name,s_Tel) values('" + model.S_gyName + "','" + model.S_jName + "','" + model.S_Area + "','" + model.S_cpName + "','" + model.S_name + "','" + model.S_tel + "')";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
        /// <summary>
        ///删除部门
        /// </summary>
        /// <param name="model">部门实体类D_ID</param>
        /// <returns></returns>
        public int del_Department(HY_Model.HY_Department model)
        {
            try
            {
                string sql = "delete from HY_Department where d_ID='"+model.D_ID+"'";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
        /// <summary>
        /// 新增采购单信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int com_HY_Procurement(HY_Model.HY_Purchaseorder model)
        {
            try
            {
                string sql = "insert into HY_ProcurementInfo(c_DID,c_CID,c_Department,c_Person,c_Name,c_NameID,c_Supplier,c_Origin,c_QDate,c_XDate,c_Specifications,c_Units,c_Amount,c_Uses,c_Notes,c_Hot) values('" + model.C_DID + "','" + model.C_CID + "','" + model.C_Department + "','" + model.C_Person + "','" + model.C_Name + "','" + model.C_NameID + "','" + model.C_Supplier + "','" + model.C_Origin + "','" + model.C_QDate + "','" + model.C_XDate + "','" + model.C_Specifications + "','" + model.C_Units + "','" + model.C_Amount + "','" + model.C_Uses + "','" + model.C_Notes + "','" + model.C_Hot + "')";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
        /// <summary>
        ///删除仓库
        /// </summary>
        /// <param name="model">仓库实体类c_ID</param>
        /// <returns></returns>
        public int del_Warehouse(HY_Model.HY_Warehouse model)
        {
            try
            {
                string sql = "delete from HY_Warehouse where c_ID='" + model.C_ID+ "'";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
        /// <summary>
        /// 新增请购单信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int com_RequisitionInfo(HY_Model.HY_RequisitionInfo model)
        {
            try
            {
                string sql = "insert into HY_RequisitionInfo(r_DID,r_CID,r_NameID,r_Department,r_Person,r_Name,r_Supplier,r_Origin,r_QDate,r_XDate,r_Specifications,r_Units,r_Amount,r_Uses,r_Notes,r_Hot) values('" + model.R_DID + "','" + model.R_CID + "','" + model.R_NameID + "','" + model.R_Department + "','" + model.R_Person + "','" + model.R_Name + "','" + model.R_Supplier + "','" + model.R_Origin + "','" + model.R_QDate + "','" + model.R_XDate + "','" + model.R_Specifications + "','" + model.R_Units + "','" + model.R_Amount + "','" + model.R_Uses + "','" + model.R_Notes + "','" + model.R_Hot + "')";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
        /// <summary>
        /// 新增仓库
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int com_Warehouse(HY_Model.HY_Warehouse model)
        {
            try
            {
                string sql = "insert into HY_Warehouse(c_ckName) values('" +model.C_ckName + "')";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
        /// <summary>
        /// 新增物料价格信息
        /// </summary>
        /// <param name="model">物料信息实体层</param>
        /// <returns></returns>
        public int com_SupplierPrice(HY_Model.HY_SupplierPrice model)
        {
            try
            {
                string sql = "insert into HY_SupplierPrice(p_DID,p_PID,p_gyName,p_Date,p_PName,p_Price,p_Weight,p_Vray,p_SM,p_rPerson) values('" + model.P_DID + "','" + model.P_PID + "','" + model.P_gyName + "','" + model.P_Date + "','" + model.P_PName + "','" + model.P_Price + "','" + model.P_Weight + "','" + model.P_Vray + "','" + model.P_SM + "','" + model.P_rPerson + "')";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
Exemple #14
0
 /// <summary>
 /// 返回修改更新用户操作
 /// </summary>
 /// <param name="model">用户表实体</param>
 /// <param name="h_ID">需要修改用户编号(唯一)</param>
 /// <returns></returns>
 public int userOperationUpdate(HY_Model.User model, int h_ID)
 {
     return hyset.userOperationUpdate(model, h_ID);
 }
Exemple #15
0
 /// <summary>
 /// 返回添加用户操作
 /// </summary>
 /// <param name="model">Moldel实体对象</param>
 /// <returns></returns>
 public int userOperation(HY_Model.User model)
 {
     return hyset.userOperation(model);
 }
Exemple #16
0
 /// <summary>
 /// 查询后返回DataTable
 /// </summary>
 /// <param name="model">登陆用户实体类</param>
 /// <returns></returns>
 public DataTable userAuthentication(HY_Model.User model)
 {
     return hyset.userAuthentication(model);
 }
Exemple #17
0
 /// <summary>
 /// 更新权限
 /// </summary>
 /// <param name="model">用户权限实体类</param>
 /// <param name="user">用户</param>
 /// <returns></returns>
 public int userSecurityUpdate(HY_Model.User model, string user)
 {
     return hyset.userSecurityUpdate(model, user);
 }
 /// <summary>
 ///删除仓库
 /// </summary>
 /// <param name="model">仓库实体类c_ID</param>
 /// <returns></returns>
 public int del_Warehouse(HY_Model.HY_Warehouse model)
 {
     return hywar.del_Warehouse(model);
 }
 /// <summary>
 /// 更新公司基本信息设置
 /// </summary>
 /// <param name="model">Information实体类</param>
 /// <param name="I_ID">ID值</param>
 /// <returns></returns>
 public int com_Information(HY_Model.HY_Information model, int I_ID)
 {
     return hyinfo.com_Information(model, I_ID);
 }
Exemple #20
0
        /// <summary>
        /// 更新权限
        /// </summary>
        /// <param name="model">用户权限实体类</param>
        /// <param name="user">用户</param>
        /// <returns></returns>
        public int userSecurityUpdate(HY_Model.User model, string user)
        {
            try
            {
                string sql = "update HY_User set h_Security='" + model.Security + "' where h_UserName='******'";
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
 /// <summary>
 /// 新增部门
 /// </summary>
 /// <param name="model">HY_Department部门实体类</param>
 /// <returns></returns>
 public int com_Department(HY_Model.HY_Department model)
 {
     return hydep.com_Department(model);
 }
 /// <summary>
 /// 新增BOM物料明细
 /// </summary>
 /// <param name="model">BOM物料明细MODEL实体类</param>
 /// <returns></returns>
 public int com_HY_BomDetailslist(HY_Model.HY_BomDetails model)
 {
     return hybomdetal.com_HY_BomDetailslist(model);
 }
 /// <summary>
 /// 新增供应商信息
 /// </summary>
 /// <param name="model">供应商信息实体层</param>
 /// <returns></returns>
 public int com_Supplier(HY_Model.HY_Supplier model)
 {
     return hysp.com_Supplier(model);
 }
 /// <summary>
 /// 新增采购单信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int com_HY_Procurement(HY_Model.HY_Purchaseorder model)
 {
     return hypro.com_HY_Procurement(model);
 }
Exemple #25
0
 /// <summary>
 /// 该方法更新用户帐户信息
 /// </summary>
 /// <param name="model">用户表实体层</param>
 /// <returns></returns>
 public int userOperationUpdate(HY_Model.User model,int h_ID)
 {
     try
     {
         string sql = "update HY_User set h_UserName='******',h_yUserPwd='" + model.PassWord + "',h_Status='" + model.UserStatus + "' where h_ID='" + h_ID + "'";
         int res = hy_help.insertEx(sql);
         return res;
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
 /// <summary>
 ///删除部门
 /// </summary>
 /// <param name="model">部门实体类D_ID</param>
 /// <returns></returns>
 public int del_Department(HY_Model.HY_Department model)
 {
     return hydep.del_Department(model);
 }
 /// <summary>
 /// 新增BOM物料
 /// </summary>
 /// <param name="model">BOM物料MODEL实体类</param>
 /// <returns></returns>
 public int com_HY_Bomlist(HY_Model.HY_Bomlist model)
 {
     return hybom.com_HY_Bomlist(model);
 }
 /// <summary>
 /// 新增请购单信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int com_RequisitionInfo(HY_Model.HY_RequisitionInfo model)
 {
     return hyrepinfo.com_RequisitionInfo(model);
 }
 /// <summary>
 /// 新增物料价格信息
 /// </summary>
 /// <param name="model">物料信息实体层</param>
 /// <returns></returns>
 public int com_SupplierPrice(HY_Model.HY_SupplierPrice model)
 {
     return hysup.com_SupplierPrice(model);
 }
 /// <summary>
 /// 新增仓库
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int com_Warehouse(HY_Model.HY_Warehouse model)
 {
     return hywar.com_Warehouse(model);
 }