Esempio n. 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtRejectCode.Text.Trim().Length == 0)
            {
                strErr += "RejectCode不能为空!\\n";
            }
            if (this.txtDisposeMethod.Text.Trim().Length == 0)
            {
                strErr += "DisposeMethod不能为空!\\n";
            }
            if (this.txtDescriptions.Text.Trim().Length == 0)
            {
                strErr += "Descriptions不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string RejectCode    = this.txtRejectCode.Text;
            string DisposeMethod = this.txtDisposeMethod.Text;
            string Descriptions  = this.txtDescriptions.Text;

            Maticsoft.Model.Dispose model = new Maticsoft.Model.Dispose();
            model.RejectCode    = RejectCode;
            model.DisposeMethod = DisposeMethod;
            model.Descriptions  = Descriptions;

            Maticsoft.BLL.Dispose bll = new Maticsoft.BLL.Dispose();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
Esempio n. 2
0
 /*********************  Method   ***********************/
 /// <summary>
 /// 保存重工信息
 /// </summary>
 private void SaveInfo_All()
 {
     //不良现象赋值
     _Rejected.RejectCode = txb_RejectCode.Text.Trim();
     _Rejected.Reject     = txb_Reject.Text.Trim();
     _Rejected.Picture    = imBytes;
     //保存不良现象
     _M_Rejected.Add(_Rejected);
     //保存处理方法
     foreach (Maticsoft.Model.Dispose disp in _Dispe)
     {
         _M_Dispose.Add(disp);
     }
     My_MessageBox.My_MessageBox_Message("保存完成!");
     ClearControlInfo();
 }