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"); }
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; }
// //窗体初始化 // private void Window_Loaded(object sender, RoutedEventArgs e) { // DataSet temds = PressMaterialList(_WTT_MaterialList ); dgv_Source.ItemsSource = MaterialList.Tables[0].DefaultView; //加载站别 Maticsoft.BLL.Workstation _M_Workstation = new Maticsoft.BLL.Workstation(); cmb_Workstation_Receive.ItemsSource = _M_Workstation.GetListModel(""); txb_OrderID.Text = OrderID; }
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"); }