Ejemplo n.º 1
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;
     }
 }
Ejemplo n.º 2
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;
     }
 }
Ejemplo n.º 3
0
        private void W_DEL_Click(object sender, EventArgs e)
        {
            //实例化仓库实体类
            HY_Model.HY_Warehouse hywar = new HY_Model.HY_Warehouse();
            hywar.C_ID = int.Parse(this.lbCK.SelectedValue.ToString());//选择仓库项值

            HY_BLL.HY_WarehouseBLL hydep = new HY_WarehouseBLL();
            int res = hydep.del_Warehouse(hywar);

            if (res > 0)
            {
                MessageBoxEx.Show("提示:成功删除仓库!");
                lbHYList_BM();
            }
        }
Ejemplo n.º 4
0
        private void W_ADD_Click(object sender, EventArgs e)
        {
            string ckName = this.ckName.Text.Trim();

            if (ckName == string.Empty)
            {
                MessageBoxEx.Show("提示:仓库名称不能为空!");
                this.ckName.Focus();
                return;
            }
            //实例化仓库实体类
            HY_Model.HY_Warehouse w = new HY_Model.HY_Warehouse();
            w.C_ckName = this.ckName.Text.Trim();

            HY_BLL.HY_WarehouseBLL hywar = new HY_WarehouseBLL();
            int res = hywar.com_Warehouse(w);

            if (res > 0)
            {
                MessageBoxEx.Show("提示:仓库添加成功!");
                this.ckName.Text = "";
                lbHYList_CK();
            }
        }