protected void btnAdd_Click(object sender, EventArgs e) { string strErr = ""; if (this.txtContent.Text == "") { strErr += "Content不能为空!\\n"; } if (!PageValidate.IsDateTime(txtLastModifyTime.Text)) { strErr += "LastModifyTime不是时间格式!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } string Content = this.txtContent.Text; DateTime LastModifyTime = DateTime.Parse(this.txtLastModifyTime.Text); NoName.NetShop.Model.ContentModel model = new NoName.NetShop.Model.ContentModel(); model.Content = Content; model.LastModifyTime = LastModifyTime; NoName.NetShop.BLL.ContentModelBll bll = new NoName.NetShop.BLL.ContentModelBll(); bll.Update(model); }
protected void btnAdd_Click(object sender, EventArgs e) { string strErr=""; if(this.txtContent.Text =="") { strErr+="Content����Ϊ�գ�\\n"; } if(!PageValidate.IsDateTime(txtLastModifyTime.Text)) { strErr+="LastModifyTime����ʱ���ʽ��\\n"; } if(strErr!="") { MessageBox.Show(this,strErr); return; } string Content=this.txtContent.Text; DateTime LastModifyTime=DateTime.Parse(this.txtLastModifyTime.Text); NoName.NetShop.Model.ContentModel model=new NoName.NetShop.Model.ContentModel(); model.Content=Content; model.LastModifyTime=LastModifyTime; NoName.NetShop.BLL.ContentModelBll bll=new NoName.NetShop.BLL.ContentModelBll(); bll.Update(model); }