public void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (!PageValidate.IsNumber(txtInvoiceCode.Text)) { strErr += "InvoiceCode格式错误!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } int InvoiceID = int.Parse(this.lblInvoiceID.Text); int InvoiceCode = int.Parse(this.txtInvoiceCode.Text); WebDemo.Model.WebDemo.InvoiceLog model = new WebDemo.Model.WebDemo.InvoiceLog(); model.InvoiceID = InvoiceID; model.InvoiceCode = InvoiceCode; WebDemo.BLL.WebDemo.InvoiceLog bll = new WebDemo.BLL.WebDemo.InvoiceLog(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx"); }
private void ShowInfo(int InvoiceID) { WebDemo.BLL.WebDemo.InvoiceLog bll = new WebDemo.BLL.WebDemo.InvoiceLog(); WebDemo.Model.WebDemo.InvoiceLog model = bll.GetModel(InvoiceID); this.lblInvoiceID.Text = model.InvoiceID.ToString(); this.txtInvoiceCode.Text = model.InvoiceCode.ToString(); }