private void ShowInfo(decimal Wo_ID) { Maticsoft.BLL.Workstation bll = new Maticsoft.BLL.Workstation(); Maticsoft.Model.Workstation model = bll.GetModel(Wo_ID); this.lblWo_ID.Text = model.Wo_ID.ToString(); this.txtWorkstation.Text = model.Workstation; }
public void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (this.txtWorkstation.Text.Trim().Length == 0) { strErr += "Workstation不能为空!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } decimal Wo_ID = decimal.Parse(this.lblWo_ID.Text); string Workstation = this.txtWorkstation.Text; Maticsoft.Model.Workstation model = new Maticsoft.Model.Workstation(); model.Wo_ID = Wo_ID; model.Workstation = Workstation; Maticsoft.BLL.Workstation bll = new Maticsoft.BLL.Workstation(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx"); }
protected void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (this.txtWorkstation.Text.Trim().Length == 0) { strErr += "Workstation不能为空!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } string Workstation = this.txtWorkstation.Text; Maticsoft.Model.Workstation model = new Maticsoft.Model.Workstation(); model.Workstation = Workstation; Maticsoft.BLL.Workstation bll = new Maticsoft.BLL.Workstation(); bll.Add(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx"); }