/// <summary>
 /// 增删改BOM明细
 /// </summary>
 /// <param name="sql">SQL</param>
 /// <returns></returns>
 public int f_HYBomDetailslist(string sql)
 {
     try
     {
         HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
         int res = hy_help.insertEx(sql);
         return(res);
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
 /// <summary>
 /// 采购单增删改
 /// </summary>
 /// <param name="sql">SQL语句</param>
 /// <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;
     }
 }
Beispiel #3
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;
     }
 }
 /// <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="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;
     }
 }
Beispiel #6
0
 /// <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;
     }
 }
Beispiel #7
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;
     }
 }
Beispiel #8
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;
     }
 }
Beispiel #9
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;
     }
 }
 /// <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>
 /// 新增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_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="sql">SQL</param>
 /// <returns></returns>
 public int com_HY_CustomerInfo(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>
 /// 新增采购单信息
 /// </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;
     }
 }
Beispiel #15
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;
     }
 }
Beispiel #16
0
 /// <summary>
 /// 删除用户操作
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void toolStripDel_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("确认删除此账户", "删除提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         string rowIndex = this.dataGridView_user.SelectedRows[0].Cells[0].Value.ToString();
         string sql      = "delete from HY_user where h_ID='" + rowIndex + "'";
         HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
         int res = hy_help.insertEx(sql);
         if (res > 0)
         {
             MessageBox.Show("删除成功!");
             dgv_User();
         }
     }
 }
        //添加部门名称
        private void dnADD_Click(object sender, EventArgs e)
        {
            string dName = this.d_Name.Text.Trim();

            if (dName == string.Empty)
            {
                MessageBox.Show("部门名称不能为空!");
                this.d_Name.Focus();
            }
            string sql = "insert into HY_Department(d_Name) values('" + dName + "')";

            HY_DbSqlHelp.DBsqlHelp hy_help = new DBsqlHelp();
            int res = hy_help.insertEx(sql);

            if (res > 0)
            {
                MessageBox.Show("添加成功!");
                lbHYList();
            }
        }