private void ShowInfo() { MyERP.BLL.CL_ITEM_STOCK_DETAIL_BEGIN_RECORD bll = new MyERP.BLL.CL_ITEM_STOCK_DETAIL_BEGIN_RECORD(); MyERP.Model.CL_ITEM_STOCK_DETAIL_BEGIN_RECORD model = bll.GetModel(); this.lblCOMPANY_CODE.Text = model.COMPANY_CODE; this.lblCOMPANY_NAME.Text = model.COMPANY_NAME; this.lblCREATE_DATE.Text = model.CREATE_DATE.ToString(); this.lblCREATE_NAME.Text = model.CREATE_NAME; }
public void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (this.txtCOMPANY_CODE.Text.Trim().Length == 0) { strErr += "COMPANY_CODE不能为空!\\n"; } if (this.txtCOMPANY_NAME.Text.Trim().Length == 0) { strErr += "COMPANY_NAME不能为空!\\n"; } if (!PageValidate.IsDateTime(txtCREATE_DATE.Text)) { strErr += "CREATE_DATE格式错误!\\n"; } if (this.txtCREATE_NAME.Text.Trim().Length == 0) { strErr += "CREATE_NAME不能为空!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } string COMPANY_CODE = this.txtCOMPANY_CODE.Text; string COMPANY_NAME = this.txtCOMPANY_NAME.Text; DateTime CREATE_DATE = DateTime.Parse(this.txtCREATE_DATE.Text); string CREATE_NAME = this.txtCREATE_NAME.Text; MyERP.Model.CL_ITEM_STOCK_DETAIL_BEGIN_RECORD model = new MyERP.Model.CL_ITEM_STOCK_DETAIL_BEGIN_RECORD(); model.COMPANY_CODE = COMPANY_CODE; model.COMPANY_NAME = COMPANY_NAME; model.CREATE_DATE = CREATE_DATE; model.CREATE_NAME = CREATE_NAME; MyERP.BLL.CL_ITEM_STOCK_DETAIL_BEGIN_RECORD bll = new MyERP.BLL.CL_ITEM_STOCK_DETAIL_BEGIN_RECORD(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx"); }