Esempio n. 1
0
 /// <summary>
 /// 新增规则及当前货物
 /// </summary>
 public void ExistsGoodsGIDadnWarehousesWID()
 {
     addStore = bllStore.ExistsGoodsGIDadnWarehousesWID(this.txtRGID.Text, this.txtRWID.Text);
     if (!addStore)
     {
         modelStore.SGID      = this.txtRGID.Text.Trim();
         modelStore.SWID      = this.txtRWID.Text.Trim();
         modelStore.STopLine  = 1000; //默认上线 1000
         modelStore.SbaseLine = 1;    //默认下线 1
         modelStore.SQuantity = 0;    //当前数量 0
         modelStore.N_bak     = "自动创建规则";
         bllStore.Add(modelStore);
     }
 }
Esempio n. 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtSGID.Text.Trim().Length == 0)
            {
                strErr += "货物类型编号不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtSWID.Text))
            {
                strErr += "存放仓库编号格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtSTopLine.Text))
            {
                strErr += "货物存放下限格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtSbaseLine.Text))
            {
                strErr += "货物存放上限格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtSQuantity.Text))
            {
                strErr += "当前存储量格式错误!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string SGID      = this.txtSGID.Text;
            string SWID      = this.txtSWID.Text;
            int    STopLine  = int.Parse(this.txtSTopLine.Text);
            int    SbaseLine = int.Parse(this.txtSbaseLine.Text);
            int    SQuantity = int.Parse(this.txtSQuantity.Text);

            Cao.WMS.Model.caowms.Store model = new Cao.WMS.Model.caowms.Store();
            model.SGID      = SGID;
            model.SWID      = SWID;
            model.STopLine  = STopLine;
            model.SbaseLine = SbaseLine;
            model.SQuantity = SQuantity;

            Cao.WMS.BLL.caowms.Store bll = new Cao.WMS.BLL.caowms.Store();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }