Example #1
0
 private void ShowInfo(decimal ID_Key)
 {
     Maticsoft.BLL.tb_PrintRecord   bll   = new Maticsoft.BLL.tb_PrintRecord();
     Maticsoft.Model.tb_PrintRecord model = bll.GetModel(ID_Key);
     this.lblSN.Text         = model.SN;
     this.lblStaff.Text      = model.Staff;
     this.lblDataTime.Text   = model.DataTime;
     this.lblLabellMode.Text = model.LabellMode;
     this.lblBatchNo.Text    = model.BatchNo;
     this.lblOrderID.Text    = model.OrderID;
     this.lblID_Key.Text     = model.ID_Key.ToString();
 }
Example #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtSN.Text.Trim().Length == 0)
            {
                strErr += "SN不能为空!\\n";
            }
            if (this.txtStaff.Text.Trim().Length == 0)
            {
                strErr += "Staff不能为空!\\n";
            }
            if (this.txtDataTime.Text.Trim().Length == 0)
            {
                strErr += "DataTime不能为空!\\n";
            }
            if (this.txtLabellMode.Text.Trim().Length == 0)
            {
                strErr += "LabellMode不能为空!\\n";
            }
            if (this.txtBatchNo.Text.Trim().Length == 0)
            {
                strErr += "BatchNo不能为空!\\n";
            }
            if (this.txtOrderID.Text.Trim().Length == 0)
            {
                strErr += "OrderID不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string SN         = this.txtSN.Text;
            string Staff      = this.txtStaff.Text;
            string DataTime   = this.txtDataTime.Text;
            string LabellMode = this.txtLabellMode.Text;
            string BatchNo    = this.txtBatchNo.Text;
            string OrderID    = this.txtOrderID.Text;

            Maticsoft.Model.tb_PrintRecord model = new Maticsoft.Model.tb_PrintRecord();
            model.SN         = SN;
            model.Staff      = Staff;
            model.DataTime   = DataTime;
            model.LabellMode = LabellMode;
            model.BatchNo    = BatchNo;
            model.OrderID    = OrderID;

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