Exemplo n.º 1
0
 private void ShowInfo()
 {
     MyERP.BLL.ORDER_WGDETAIL   bll   = new MyERP.BLL.ORDER_WGDETAIL();
     MyERP.Model.ORDER_WGDETAIL model = bll.GetModel();
     this.lblDetailID.Text         = model.DetailID.ToString();
     this.txtBillNO.Text           = model.BillNO;
     this.txtSequence.Text         = model.Sequence;
     this.txtItemInternalCode.Text = model.ItemInternalCode;
     this.txtZXBJNO.Text           = model.ZXBJNO;
     this.txtZXBJNAME.Text         = model.ZXBJNAME;
     this.txtQuantity.Text         = model.Quantity.ToString();
     this.txtFPqty.Text            = model.FPqty.ToString();
     this.txtCREATE_DATE.Text      = model.CREATE_DATE;
     this.txtCREATE_NAME.Text      = model.CREATE_NAME;
     this.txtREMARK.Text           = model.REMARK;
 }
Exemplo n.º 2
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtBillNO.Text.Trim().Length == 0)
            {
                strErr += "BillNO不能为空!\\n";
            }
            if (this.txtSequence.Text.Trim().Length == 0)
            {
                strErr += "Sequence不能为空!\\n";
            }
            if (this.txtItemInternalCode.Text.Trim().Length == 0)
            {
                strErr += "ItemInternalCode不能为空!\\n";
            }
            if (this.txtZXBJNO.Text.Trim().Length == 0)
            {
                strErr += "ZXBJNO不能为空!\\n";
            }
            if (this.txtZXBJNAME.Text.Trim().Length == 0)
            {
                strErr += "ZXBJNAME不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtQuantity.Text))
            {
                strErr += "Quantity格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtFPqty.Text))
            {
                strErr += "FPqty格式错误!\\n";
            }
            if (this.txtCREATE_DATE.Text.Trim().Length == 0)
            {
                strErr += "CREATE_DATE不能为空!\\n";
            }
            if (this.txtCREATE_NAME.Text.Trim().Length == 0)
            {
                strErr += "CREATE_NAME不能为空!\\n";
            }
            if (this.txtREMARK.Text.Trim().Length == 0)
            {
                strErr += "REMARK不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            Guid   DetailID         = new Guid(this.lblDetailID.Text);
            string BillNO           = this.txtBillNO.Text;
            string Sequence         = this.txtSequence.Text;
            string ItemInternalCode = this.txtItemInternalCode.Text;
            string ZXBJNO           = this.txtZXBJNO.Text;
            string ZXBJNAME         = this.txtZXBJNAME.Text;
            int    Quantity         = int.Parse(this.txtQuantity.Text);
            int    FPqty            = int.Parse(this.txtFPqty.Text);
            string CREATE_DATE      = this.txtCREATE_DATE.Text;
            string CREATE_NAME      = this.txtCREATE_NAME.Text;
            string REMARK           = this.txtREMARK.Text;


            MyERP.Model.ORDER_WGDETAIL model = new MyERP.Model.ORDER_WGDETAIL();
            model.DetailID         = DetailID;
            model.BillNO           = BillNO;
            model.Sequence         = Sequence;
            model.ItemInternalCode = ItemInternalCode;
            model.ZXBJNO           = ZXBJNO;
            model.ZXBJNAME         = ZXBJNAME;
            model.Quantity         = Quantity;
            model.FPqty            = FPqty;
            model.CREATE_DATE      = CREATE_DATE;
            model.CREATE_NAME      = CREATE_NAME;
            model.REMARK           = REMARK;

            MyERP.BLL.ORDER_WGDETAIL bll = new MyERP.BLL.ORDER_WGDETAIL();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }