private void ShowInfo(decimal ID) { Maticsoft.BLL.Rework bll = new Maticsoft.BLL.Rework(); Maticsoft.Model.Rework model = bll.GetModel(ID); this.lblID.Text = model.ID.ToString(); this.lblSN.Text = model.SN; this.lblPigtailType.Text = model.PigtailType; this.lblCount.Text = model.Count; this.lblRejectID.Text = model.RejectID; this.lblRejectDescribe.Text = model.RejectDescribe; this.lblDisposeID.Text = model.DisposeID; this.lblDisposeDescribe.Text = model.DisposeDescribe; this.lblLength.Text = model.Length; this.lblResult.Text = model.Result; this.lblReworkID.Text = model.ReworkID; this.lblVerifyID.Text = model.VerifyID; }
public void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (this.txtSN.Text.Trim().Length == 0) { strErr += "SN不能为空!\\n"; } if (this.txtPigtailType.Text.Trim().Length == 0) { strErr += "PigtailType不能为空!\\n"; } if (this.txtCount.Text.Trim().Length == 0) { strErr += "Count不能为空!\\n"; } if (this.txtRejectID.Text.Trim().Length == 0) { strErr += "RejectID不能为空!\\n"; } if (this.txtRejectDescribe.Text.Trim().Length == 0) { strErr += "RejectDescribe不能为空!\\n"; } if (this.txtDisposeID.Text.Trim().Length == 0) { strErr += "DisposeID不能为空!\\n"; } if (this.txtDisposeDescribe.Text.Trim().Length == 0) { strErr += "DisposeDescribe不能为空!\\n"; } if (this.txtLength.Text.Trim().Length == 0) { strErr += "Length不能为空!\\n"; } if (this.txtResult.Text.Trim().Length == 0) { strErr += "Result不能为空!\\n"; } if (this.txtReworkID.Text.Trim().Length == 0) { strErr += "ReworkID不能为空!\\n"; } if (this.txtVerifyID.Text.Trim().Length == 0) { strErr += "VerifyID不能为空!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } decimal ID = decimal.Parse(this.lblID.Text); string SN = this.txtSN.Text; string PigtailType = this.txtPigtailType.Text; string Count = this.txtCount.Text; string RejectID = this.txtRejectID.Text; string RejectDescribe = this.txtRejectDescribe.Text; string DisposeID = this.txtDisposeID.Text; string DisposeDescribe = this.txtDisposeDescribe.Text; string Length = this.txtLength.Text; string Result = this.txtResult.Text; string ReworkID = this.txtReworkID.Text; string VerifyID = this.txtVerifyID.Text; Maticsoft.Model.Rework model = new Maticsoft.Model.Rework(); model.ID = ID; model.SN = SN; model.PigtailType = PigtailType; model.Count = Count; model.RejectID = RejectID; model.RejectDescribe = RejectDescribe; model.DisposeID = DisposeID; model.DisposeDescribe = DisposeDescribe; model.Length = Length; model.Result = Result; model.ReworkID = ReworkID; model.VerifyID = VerifyID; Maticsoft.BLL.Rework bll = new Maticsoft.BLL.Rework(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx"); }