private void BindDatas(int id) { M_Flow mf = bf.GetFlowById(Convert.ToInt32(id)); this.txtName.Value = mf.FlowName.ToString(); this.txtFlowDepict.Value = mf.FlowDepict.ToString(); }
public M_Flow GetFlowById(int id) { foreach (DataRow row in Sel(id).Rows) { M_Flow mf = new M_Flow(); mf.Id = Convert.ToInt32(row["id"]); mf.FlowName = row["flowName"].ToString(); mf.FlowDepict = row["flowDepict"].ToString(); return(mf); } return(null); }
public bool ModifyFlowById(M_Flow flows) { string strSql = "update ZL_Flow set flowName=@flowName,flowDepict=@flowDepict where id=@id"; SqlParameter[] sp = new SqlParameter[] { new SqlParameter("@flowName", flows.FlowName), new SqlParameter("@flowDepict", flows.FlowDepict), new SqlParameter("@id", flows.Id) }; int result = SqlHelper.ExecuteNonQuery(CommandType.Text, strSql, sp); if (result > 0) { return(true); } else { return(false); } }
protected void btnSave_Click(object sender, EventArgs e) { string id = Request.QueryString["id"]; string name = this.txtName.Value.Trim(); string depict = this.txtFlowDepict.Value.Trim(); if (name != "" && !"".Equals(depict)) { if (id != null && !"".Equals(id)) { M_Flow flow = new M_Flow(); flow.Id = Convert.ToInt32(id); flow.FlowName = name; flow.FlowDepict = depict; if (bf.ModifyFlowById(flow)) { function.WriteSuccessMsg("流程修改成功!", customPath2 + "Content/FlowManager.aspx"); } } } }
protected void Page_Load(object sender, EventArgs e) { if (SiteConfig.SiteOption.ContentConfig == 1) { if (!IsPostBack) { string action = Request.QueryString["Action"]; string id = Request.QueryString["id"]; if (action == "copy") { M_Flow mf = bf.GetFlowById(Convert.ToInt32(id)); if (mf != null) { bf.AddFlow(mf.FlowName + "复制", mf.FlowDepict); } } } } Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='../Config/SiteOption.aspx'>系统设置</a></li><li class='active'>流程管理<a href='AddFlow.aspx'>[添加流程]</a></li>"); //Call.SetBreadCrumb(Master, "<li>系统设置</li><li><a href='FlowManager.aspx'>流程管理</a></li>"); }
public int insert(M_Flow model) { return(Sql.insert(strTableName, model.GetParameters(model), BLLCommon.GetParas(model), BLLCommon.GetFields(model))); }
public bool UpdateByID(M_Flow model) { return(Sql.UpdateByIDs(strTableName, PK, model.Id.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters(model))); }
public int insert(M_Flow model) { return(DBCenter.Insert(model)); }
public bool UpdateByID(M_Flow model) { return(DBCenter.UpdateByID(model, model.Id)); }