Ejemplo n.º 1
0
 private void ShowInfo(int SID)
 {
     Cao.WMS.BLL.caowms.Store   bll   = new Cao.WMS.BLL.caowms.Store();
     Cao.WMS.Model.caowms.Store model = bll.GetModel(SID);
     this.lblSID.Text       = model.SID.ToString();
     this.lblSGID.Text      = model.SGID;
     this.lblSWID.Text      = model.SWID.ToString();
     this.lblSTopLine.Text  = model.STopLine.ToString();
     this.lblSbaseLine.Text = model.SbaseLine.ToString();
     this.lblSQuantity.Text = model.SQuantity.ToString();
 }
Ejemplo n.º 2
0
        public 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;
            }
            int    SID       = int.Parse(this.lblSID.Text);
            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.SID       = SID;
            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.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }