Esempio n. 1
0
 private void lbHYList()
 {
     string sql = "select d_Name from HY_Department";
     HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
     this.lbHY.DataSource = hy_help.ExecuteQuery(sql);
     this.lbHY.DisplayMember = "d_Name";
 }
Esempio n. 2
0
 private void dgv_User()
 {
     string sql = "select h_ID,h_UserName,h_yUserPwd,h_Status,h_Department  from HY_user";
     HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
     this.dataGridView_user.AutoGenerateColumns = false;// 关闭自动创建列
     this.dataGridView_user.DataSource = hy_help.ExecuteQuery(sql);
 }
Esempio n. 3
0
 /// <summary>
 /// 返回BOM信息列表
 /// </summary>
 /// <returns></returns>
 public DataTable ExecuteQuery(string sql)
 {
     //string sql = "select * from HY_BomInfo order by b_ID desc";
     HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
     DataTable ds = new DataTable();
     ds = hy_help.ExecuteQuery(sql);
     return ds;
 }
Esempio n. 4
0
 /// <summary>
 /// 返回仓库列表
 /// </summary>
 /// <returns></returns>
 public DataTable ExecuteQuery()
 {
     string sql = "select * from HY_Warehouse";
     HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
     DataTable ds = new DataTable();
     ds = hy_help.ExecuteQuery(sql);
     return ds;
 }
 /// <summary>
 /// 请购单抛转采购单
 /// </summary>
 /// <returns></returns>
 public int com_ExecuteQuery(string sql)
 {
     try
     {
         HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
         int res = hy_help.insertEx(sql);
         return res;
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
Esempio n. 6
0
 /// <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;
     }
 }
Esempio n. 7
0
 /// <summary>
 /// 返DataSet数据集
 /// </summary>
 /// <returns></returns>
 public DataSet ExecuteQueryDataSet(string sql)
 {
     try
     {
         HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
         DataSet ds = new DataSet();
         ds = hy_help.DataSetSearch(sql);
         return ds;
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
        /// <summary>
        /// 返回SqlDataReader生产排程明细表信息
        /// </summary>
        /// <returns></returns>
        public SqlDataReader f_ProductionPlanningslist(string sql)
        {
            try
            {

                HY_DbSqlHelp.DBsqlHelp hysqlhelp = new DBsqlHelp();
                sdr = hysqlhelp.reder(sql);
                return sdr;
            }
            catch (Exception EX)
            {
                throw EX;
            }
        }
Esempio n. 9
0
        /// <summary>
        /// 返回SqlDataReader人员信息列表
        /// </summary>
        /// <param name="sql">sql</param>
        /// <returns></returns>
        public SqlDataReader f_SupplierLiset(string sql)
        {
            try
            {
                HY_DbSqlHelp.DBsqlHelp hysqlhelp = new DBsqlHelp();
                sdr = hysqlhelp.reder(sql);
                return sdr;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 增删该物料价格
        /// </summary>
        /// <param name="sql">SQL</param>
        /// <returns></returns>
        public int f_SupplierPrice(string sql)
        {
            try
            {
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
Esempio n. 11
0
 /// <summary>
 /// 删除、更新BOM信息
 /// </summary>
 /// <param name="sql">SQL</param>
 /// <returns></returns>
 public int com_HY_BomlistX(string sql)
 {
     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_SPerson,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_SPerson + "','" + model.B_SDate + "')";
         HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
         int res = hy_help.insertEx(sql);
         return res;
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
 /// <summary>
 /// 返回选择后SqlDataReaderBOM表信息
 /// </summary>
 /// <returns></returns>
 public SqlDataReader f_HY_RequisitionsTOProcurement(string d_SKID)
 {
     try
     {
         string sql = "select b_ID,b_SKID,b_CID,b_CustomerID,b_SPerson,b_SDate from HY_BomInfo where b_SKID='" + d_SKID + "'";
         HY_DbSqlHelp.DBsqlHelp hysqlhelp = new DBsqlHelp();
         sdr = hysqlhelp.reder(sql);
         return sdr;
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
Esempio n. 13
0
 /// <summary>
 /// 返回SqlDataReader表信息
 /// </summary>
 /// <returns></returns>
 public SqlDataReader f_CustomerInfolist(string sql)
 {
     try
     {
         //string sql = "select b_ID,b_SKID,b_CID from HY_BomInfo order by b_ID desc";
         HY_DbSqlHelp.DBsqlHelp hysqlhelp = new DBsqlHelp();
         sdr = hysqlhelp.reder(sql);
         return sdr;
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
 /// <summary>
 /// 增删改排程生产计划
 /// </summary>
 /// <param name="model">排程生产计划MODEL实体类</param>
 /// <returns></returns>
 public int com_HY_ProductionPlanninglist(string sql)
 {
     try
     {
         //string sql = "insert into HY_ProductionPlanning(p_DID,p_KID,p_CID,p_Engineering,p_Design) values('"+model.P_DID+"','"+model.P_KID+"','"+model.P_CID+"','"+model.P_Engineering+"','"+model.P_Design+"')";
         HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
         int res = hy_help.insertEx(sql);
         return res;
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
Esempio n. 15
0
        /// <summary>
        /// 增删改操作(仓库)
        /// </summary>
        /// <param name="model">BOM物料明细MODEL实体类</param>
        /// <returns></returns>
        public int com_HY_HY_Storagelslist(string sql)
        {
            try
            {

                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                int res = hy_help.insertEx(sql);
                return res;
            }
            catch (Exception EX)
            {
                throw EX;
            }
        }
Esempio n. 16
0
        /// <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;
            }
        }
Esempio n. 17
0
        /// <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;
            }
        }
Esempio n. 18
0
        /// <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;
            }
        }
Esempio n. 19
0
        /// <summary>
        ///  增删改
        /// </summary>
        /// <param name="sql">SQL</param>
        /// <returns></returns>
        public int com_DepartmentZSG(string sql)
        {
            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;
            }
        }
Esempio n. 20
0
        /// <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;
               }
        }
Esempio n. 21
0
        /// <summary>
        /// 返回采购单列表
        /// </summary>
        /// <returns></returns>
        public DataTable ExecuteQuery(string sql)
        {
            try
            {
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                DataTable ds = new DataTable();
                ds = hy_help.ExecuteQuery(sql);
                return ds;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
Esempio n. 22
0
        /// <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;
            }
        }
Esempio n. 23
0
        /// <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;
            }
        }
Esempio n. 24
0
        /// <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"></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;
            }
        }
Esempio n. 26
0
        /// <summary>
        /// 返回一条公司基本信息记录
        /// </summary>
        /// <param name="I_ID">ID编号</param>
        /// <returns></returns>
        public DataTable comf_Information(int I_ID)
        {
            try
               {
               DataTable dt = new DataTable();
               string sql = "select * from HY_Information where I_ID='" + I_ID + "'";
               HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
               dt = hy_help.ExecuteQuery(sql);
               return dt;
               }
               catch (Exception EX)
               {

               throw EX;
               }
        }
Esempio n. 27
0
        /// <summary>
        /// 返回检索后BOM明细信息列表
        /// </summary>
        /// <returns></returns>
        public DataTable ExecuteQuerySelect(string d_SKID)
        {
            try
            {
                string sql = "select * from HY_BomDetails where d_SKID='"+d_SKID+"'";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                DataTable ds = new DataTable();
                ds = hy_help.ExecuteQuery(sql);
                return ds;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
Esempio n. 28
0
        /// <summary>
        /// 返回BOM明细信息列表
        /// </summary>
        /// <returns></returns>
        public DataTable ExecuteQuery()
        {
            try
            {
                string sql = "select * from HY_BomDetails order by d_ID desc";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                DataTable ds = new DataTable();
                ds = hy_help.ExecuteQuery(sql);
                return ds;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
Esempio n. 29
0
        /// <summary>
        /// 返回供应商物料价格信息列表
        /// </summary>
        /// <returns></returns>
        public DataTable back_SupplierPrice()
        {
            try
            {
                DataTable dt = new DataTable();
                string sql = "select * from HY_SupplierPrice order by p_ID desc";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                dt = hy_help.ExecuteQuery(sql);
                return dt;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
Esempio n. 30
0
        /// <summary>
        /// 返回供应商信息列表
        /// </summary>
        /// <returns></returns>
        public DataTable back_Supplier()
        {
            try
            {
                DataTable dt = new DataTable();
                string sql = "select s_ID,s_gyName,s_jName from HY_Supplier";
                HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
                dt = hy_help.ExecuteQuery(sql);
                return dt;
            }
            catch (Exception EX)
            {

                throw EX;
            }
        }
Esempio n. 31
0
 public HY_Set()
 {
     hy_help = new DBsqlHelp();
 }