private void ShowInfo(int SchemeId) { NoName.NetShop.BLL.SuitSchemeModelBll bll = new NoName.NetShop.BLL.SuitSchemeModelBll(); NoName.NetShop.Model.SuitSchemeModel model = bll.GetModel(SchemeId); this.lblSchemeName.Text = model.SchemeName; this.lblCreateTime.Text = model.CreateTime.ToString(); this.lblStatus.Text = model.Status.ToString(); this.lblSchemeDesc.Text = model.SchemeDesc; }
private void ShowInfo(int SchemeId) { NoName.NetShop.BLL.SuitSchemeModelBll bll=new NoName.NetShop.BLL.SuitSchemeModelBll(); NoName.NetShop.Model.SuitSchemeModel model=bll.GetModel(SchemeId); this.lblSchemeName.Text=model.SchemeName; this.lblCreateTime.Text=model.CreateTime.ToString(); this.lblStatus.Text=model.Status.ToString(); this.lblSchemeDesc.Text=model.SchemeDesc; }
protected void btnAdd_Click(object sender, EventArgs e) { string strErr = ""; if (this.txtSchemeName.Text == "") { strErr += "SchemeName不能为空!\\n"; } if (!PageValidate.IsDateTime(txtCreateTime.Text)) { strErr += "CreateTime不是时间格式!\\n"; } if (!PageValidate.IsNumber(txtStatus.Text)) { strErr += "Status不是数字!\\n"; } if (this.txtSchemeDesc.Text == "") { strErr += "SchemeDesc不能为空!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } string SchemeName = this.txtSchemeName.Text; DateTime CreateTime = DateTime.Parse(this.txtCreateTime.Text); int Status = int.Parse(this.txtStatus.Text); string SchemeDesc = this.txtSchemeDesc.Text; NoName.NetShop.Model.SuitSchemeModel model = new NoName.NetShop.Model.SuitSchemeModel(); model.SchemeName = SchemeName; model.CreateTime = CreateTime; model.Status = Status; model.SchemeDesc = SchemeDesc; NoName.NetShop.BLL.SuitSchemeModelBll bll = new NoName.NetShop.BLL.SuitSchemeModelBll(); bll.Update(model); }
protected void btnAdd_Click(object sender, EventArgs e) { string strErr=""; if(this.txtSchemeName.Text =="") { strErr+="SchemeName����Ϊ�գ�\\n"; } if(!PageValidate.IsDateTime(txtCreateTime.Text)) { strErr+="CreateTime����ʱ���ʽ��\\n"; } if(!PageValidate.IsNumber(txtStatus.Text)) { strErr+="Status�������֣�\\n"; } if(this.txtSchemeDesc.Text =="") { strErr+="SchemeDesc����Ϊ�գ�\\n"; } if(strErr!="") { MessageBox.Show(this,strErr); return; } string SchemeName=this.txtSchemeName.Text; DateTime CreateTime=DateTime.Parse(this.txtCreateTime.Text); int Status=int.Parse(this.txtStatus.Text); string SchemeDesc=this.txtSchemeDesc.Text; NoName.NetShop.Model.SuitSchemeModel model=new NoName.NetShop.Model.SuitSchemeModel(); model.SchemeName=SchemeName; model.CreateTime=CreateTime; model.Status=Status; model.SchemeDesc=SchemeDesc; NoName.NetShop.BLL.SuitSchemeModelBll bll=new NoName.NetShop.BLL.SuitSchemeModelBll(); bll.Update(model); }