public string Add(HttpContext context) { Model.BaseUser bu = (Model.BaseUser)context.Session["login"]; string fmsid = context.Request.Params["fmsid"].Trim(); string flow_name = context.Request.Params["flow_name"].Trim(); string rfsid = context.Request.Params["rfsid"].Trim(); string remark = context.Request.Params["remark"].Trim(); string isval = context.Request.Params["isval"].Trim(); string content = context.Server.HtmlEncode(context.Request.Params["content1"].Trim()); Model.application_form model = new Model.application_form(); model.fm_sid = fmsid; model.af_name = flow_name; model.rf_sid = int.Parse(rfsid); model.remark = remark; model.rfs_sid = int.Parse(isval); model.applicant = bu.UserName; model.af_content = content; return(new BLL.application_form().insert(model)); //Model.request_form model = new Model.request_form(); // model.form_name = formName; // model.rft_sid = int.Parse(formType); // model.rf_status = int.Parse(isVal); //model.remark = remark; //model.content_str = content; //return new BLL.request_form().Add(model); }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { sid = Request.Params["sid"].Trim(); rfsid = Request.Params["rfsid"] == null ? "" : Request.Params["rfsid"].Trim(); action = Request.Params["action"] == null ? "" : Request.Params["action"].Trim(); currNode = Request.Params["currNode"] == null ? "" : Request.Params["currNode"].Trim(); type = Request.Params["type"] == null ? "" : Request.Params["type"].Trim(); afModel = new BLL.application_form().GetModel(int.Parse(sid)); this.Label1.Text = Server.HtmlDecode(afModel.af_content); //type1.Value = type; Model.BaseUser bu = (Model.BaseUser)Session["login"]; GetNode(sid); string ntsid = Request.Params["ntsid"] == null ? "" : Request.Params["ntsid"].Trim(); Model.node_type ntModel = new BLL.node_type().GetModel(int.Parse(ntsid)); nodeType = ntModel.node_type_name; arrStr = ntModel.value1.Split('|'); } } catch { } }
public bool update(Model.application_form model) { SqlParameter[] parameters = { new SqlParameter("@ActionType", SqlDbType.NVarChar, 20), new SqlParameter("@af_name", SqlDbType.NVarChar, 50), new SqlParameter("@af_content", SqlDbType.Text), new SqlParameter("@applicant", SqlDbType.NVarChar, 50), new SqlParameter("@rf_sid", SqlDbType.Int, 4), new SqlParameter("@rfs_sid", SqlDbType.Int, 4), new SqlParameter("@fm_sid", SqlDbType.NVarChar, 50), new SqlParameter("@remark", SqlDbType.Text), new SqlParameter("@sid", SqlDbType.Int, 4), new SqlParameter("@Error", SqlDbType.NVarChar, 200), new SqlParameter("@RecordCount", SqlDbType.Int) }; parameters[0].Value = "Update1"; parameters[1].Value = model.af_name; parameters[2].Value = model.af_content; parameters[3].Value = model.applicant; parameters[4].Value = model.rf_sid; parameters[5].Value = model.rfs_sid; parameters[6].Value = model.fm_sid; parameters[7].Value = model.remark; parameters[8].Value = model.sid; parameters[9].Direction = ParameterDirection.Output; parameters[10].Direction = ParameterDirection.Output; DataSet ds = DbHelperSQL.RunProcedure("Proc_Application", parameters, ""); return(true); }
public string update(Model.application_form model) { try { if (dal.update(model)) { return("success"); } else { return("更改失败"); } } catch (Exception exc) { return(exc.Message); } }
/// <summary> /// 分页获取数据列表 /// </summary> //public DataSet GetList(int PageSize,int PageIndex,string strWhere) //{ //return dal.GetList(PageSize,PageIndex,strWhere); //} #endregion BasicMethod #region ExtensionMethod public string insert(Model.application_form model) { try { if (dal.insert(model)) { return("success"); } else { return("添加失败"); } } catch (Exception exc) { return(exc.Message); } }