public void Bind() { int ID = Convert.ToInt32(Request.QueryString["id"]); WebModels.Tbl_FlowForm iso = WebBLL.Tbl_FlowFormManager.GetTbl_FlowFormById(ID); this.IF_Name.Value = iso.IF_Name; this.IF_Type.SelectedValue = iso.IF_Type; this.IF_Content.Value = iso.IF_Content; }
protected void btn_submit_Click(object sender, EventArgs e) { WebModels.Tbl_FlowForm iso = new WebModels.Tbl_FlowForm(); iso.IF_Name = this.IF_Name.Value; iso.IF_Type = this.IF_Type.SelectedValue; iso.IF_Content = this.IF_Content.Value; iso.DealUser = WebCommon.Public.GetUserName(); int count = WebBLL.Tbl_FlowFormManager.AddTbl_FlowForm(iso); 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); } }
protected void btn_submit_Click(object sender, EventArgs e) { int ID = Convert.ToInt32(Request.QueryString["id"]); WebModels.Tbl_FlowForm iso = WebBLL.Tbl_FlowFormManager.GetTbl_FlowFormById(ID); iso.IF_Name = this.IF_Name.Value; iso.IF_Type = this.IF_Type.SelectedValue; iso.IF_Content = this.IF_Content.Value; int count = WebBLL.Tbl_FlowFormManager.UpdateTbl_FlowForm(iso); 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); } }