Esempio n. 1
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();
 }
Esempio n. 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txttb_RejectCode.Text.Trim().Length == 0)
            {
                strErr += "tb_RejectCode不能为空!\\n";
            }
            if (this.txtReject.Text.Trim().Length == 0)
            {
                strErr += "Reject不能为空!\\n";
            }
            if (this.txtDescriptions.Text.Trim().Length == 0)
            {
                strErr += "Descriptions不能为空!\\n";
            }
            if (this.txtNotes.Text.Trim().Length == 0)
            {
                strErr += "Notes不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string tb_RejectCode = this.txttb_RejectCode.Text;
            string Reject        = this.txtReject.Text;
            string Descriptions  = this.txtDescriptions.Text;

            byte[] Picture = new UnicodeEncoding().GetBytes(this.txtPicture.Text);
            string Notes   = this.txtNotes.Text;

            Maticsoft.Model.Rejected model = new Maticsoft.Model.Rejected();
            model.tb_RejectCode = tb_RejectCode;
            model.Reject        = Reject;
            model.Descriptions  = Descriptions;
            model.Picture       = Picture;
            model.Notes         = Notes;

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