예제 #1
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;
     }
 }
예제 #2
0
        private void toolStripSave_Click(object sender, EventArgs e)
        {
            HY_Model.HY_Supplier u = new HY_Model.HY_Supplier();
            u.S_gyName = this.gyName.Text.Trim();
            u.S_jName  = this.jName.Text.Trim();
            u.S_Area   = this.Area.Text.Trim();
            u.S_cpName = this.cpName.Text.Trim();
            u.S_name   = this.name.Text.Trim();
            u.S_tel    = this.tel.Text.Trim();

            //添加动作
            if (intFalg == 1)
            {
                bool isEmpty = UserInputCheck();
                if (isEmpty == true)
                {
                    HY_BLL.HY_SupplierBLL hysup = new HY_SupplierBLL();
                    int res = hysup.com_Supplier(u);
                    if (res > 0)
                    {
                        MessageBoxEx.Show("提示信息:供应商信息添加成功!");
                        this.Close();
                    }
                }
            }

            if (intFalg == 2)
            {
                bool isEmpty = UserInputCheck();
                if (isEmpty == true)
                {
                    string sql = "Update HY_Supplier set s_gyName='" + this.gyName.Text.Trim() + "',s_jName='" + this.jName.Text.Trim() + "',s_Area='" + this.Area.Text.Trim() + "',s_cpName='" + this.cpName.Text.Trim() + "',s_Name='" + this.name.Text.Trim() + "',s_Tel='" + this.tel.Text.Trim() + "' where s_ID='" + this.label1.Text.Trim() + "'";
                    int    res = hystorbll.com_HY_HY_Storagelslist(sql);
                    if (res > 0)
                    {
                        MessageBoxEx.Show("产品修改成功,确定后关闭窗口!", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.None);
                        requistionDate();
                        this.Close();
                    }
                }
            }
        }
예제 #3
0
 /// <summary>
 /// 新增供应商信息
 /// </summary>
 /// <param name="model">供应商信息实体层</param>
 /// <returns></returns>
 public int com_Supplier(HY_Model.HY_Supplier model)
 {
     return(hysp.com_Supplier(model));
 }
예제 #4
0
        private void toolStripSave_Click(object sender, EventArgs e)
        {
            HY_Model.HY_Supplier u = new HY_Model.HY_Supplier();
            u.S_gyName = this.gyName.Text.Trim();
            u.S_jName = this.jName.Text.Trim();
            u.S_Area = this.Area.Text.Trim();
            u.S_cpName = this.cpName.Text.Trim();
            u.S_name = this.name.Text.Trim();
            u.S_tel = this.tel.Text.Trim();

            //添加动作
            if (intFalg == 1)
            {
                bool isEmpty = UserInputCheck();
                if (isEmpty == true)
                {
                    HY_BLL.HY_SupplierBLL hysup = new HY_SupplierBLL();
                    int res = hysup.com_Supplier(u);
                    if (res > 0)
                    {
                        MessageBoxEx.Show("提示信息:供应商信息添加成功!");
                        this.Close();
                    }
                }
            }

            if (intFalg == 2)
            {
                bool isEmpty = UserInputCheck();
                if (isEmpty == true)
                {
                    string sql = "Update HY_Supplier set s_gyName='" + this.gyName.Text.Trim() + "',s_jName='" + this.jName.Text.Trim() + "',s_Area='" + this.Area.Text.Trim() + "',s_cpName='" + this.cpName.Text.Trim() + "',s_Name='" + this.name.Text.Trim() + "',s_Tel='" + this.tel.Text.Trim() + "' where s_ID='" + this.label1.Text.Trim() + "'";
                    int res = hystorbll.com_HY_HY_Storagelslist(sql);
                    if (res > 0)
                    {
                        MessageBoxEx.Show("产品修改成功,确定后关闭窗口!", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.None);
                        requistionDate();
                        this.Close();
                    }
                }
            }
        }