public void ReadValue() { int ID = Convert.ToInt32(Request.QueryString["id"]); WebModels.Tbl_Limit limit = WebBLL.Tbl_LimitManager.GetTbl_LimitById(ID); this.LimitName.Text = limit.LimitName; this.Remark.Text = limit.Remark; LimitInfoText = limit.LimitInfo; }
public void btn_submit_Click(object sender, EventArgs e) { WebModels.Tbl_Limit limit = new WebModels.Tbl_Limit(); limit.LimitName = this.LimitName.Text; limit.LimitInfo = Request.Form["LimitInfo"]; limit.Remark = this.Remark.Text; limit.DealUser = ""; int count = WebBLL.Tbl_LimitManager.AddTbl_Limit(limit); if (count > 0) { ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('添加成功!');window.external.reload();window.external.close();", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('添加失败!');", true); } }
public void btn_submit_Click(object sender, EventArgs e) { int ID = Convert.ToInt32(Request.QueryString["id"]); WebModels.Tbl_Limit limit = WebBLL.Tbl_LimitManager.GetTbl_LimitById(ID); limit.LimitName = this.LimitName.Text; limit.LimitInfo = Request.Form["LimitInfo"]; limit.Remark = this.Remark.Text; limit.DealTime = DateTime.Now; limit.DealUser = ""; int count = WebBLL.Tbl_LimitManager.UpdateTbl_Limit(limit); if (count > 0) { ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('修改成功!');window.external.reload();window.external.close();", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('修改失败!');", true); } }