public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; int formId = Convert.ToInt32(context.Request.QueryString["form_Id"]); //此处获取编号context.Request["FORM_ID"]的表单并反回列数; try { WX.Flow.Model.Form.MODEL model = WX.Flow.Model.Form.GetCache(formId); //WX.Flow.Model.Form.GetModel("select * from FL_Forms where ID=" + context.Request["FORM_ID"]); if (model != null && model.Items_FormFieldCollection != null) { int max = 0; int nowid = 0; foreach (WX.Flow.FormField ff in model.Items_FormFieldCollection) { nowid = int.Parse(ff.Id.Split('_')[1]); if (nowid > max) { max = nowid; } } context.Response.Write(max + 1); context.Response.End(); return; } } catch { } context.Response.Write("1"); }
protected void Page_Load(object sender, EventArgs e) { WX.Flow.Model.Form.MODEL fm = WX.Request.rForm; if (fm != null) { WX.Flow.FormFieldCollection ffedit = new WX.Flow.FormFieldCollection(); //ffedit.Add(new WX.Flow.FormField("DATA_1", "item10")); //ffedit.Add(new WX.Flow.FormField("DATA_2", "item8")); //ffedit.Add(new WX.Flow.FormField("DATA_3", "item9")); WX.Flow.FormFieldCollection ffhidden = new WX.Flow.FormFieldCollection(); //ffhidden.Add(new WX.Flow.FormField("DATA_1", "item7")); //ffhidden.Add(new WX.Flow.FormField("DATA_2", "item8")); //ffhidden.Add(new WX.Flow.FormField("DATA_3", "item9")); if (Request["sub_add"] != null && Request["sub_add"] != "") { WX.Flow.FormFieldCollection ffc = new WX.Flow.FormFieldCollection(); foreach (WX.Flow.FormField ff in fm.Items_FormFieldCollection) { ff.Value = Request[ff.Id] == null ? "" : Request[ff.Id]; ffc.Add(ff); } fm.Items_FormFieldCollection = ffc; Literal1.Text = fm.GenerateHtmls(ffc, ffedit, ffhidden, "").Replace("-SYS_IP-", getIp()); } else { Literal1.Text = fm.GenerateHtmls(fm.Items_FormFieldCollection, ffedit, ffhidden, "").Replace("-SYS_IP-", getIp()); } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Master.A_Edit) { Response.Write("你没有权限访问此功能!"); Response.End(); return; } if (!IsPostBack) { WX.Flow.Model.Flow.MODEL flowmodel = WX.Flow.Model.Flow.GetCache(Convert.ToInt32(Request["flowid"])); //WX.Flow.Model.Flow.GetModel("select * from FL_Flows where ID=" + Request["flowid"]); flowmodel.LoadForm(false); WX.Flow.Model.Form.MODEL formmodel = flowmodel.Form; //WX.Flow.Model.Form.GetModel("select * from FL_Forms where ID=" + flowmodel.FormId.value.ToString()); WX.Flow.FormFieldCollection ffc = formmodel.Items_FormFieldCollection; if (ffc != null) { foreach (WX.Flow.FormField ff in ffc) { select1.Items.Add(new ListItem(ff.Text, ff.Id)); } } WX.Flow.Model.Process.MODEL model = WX.Flow.Model.Process.GetCache(Convert.ToInt32(Request.QueryString["Id"])); //WX.Flow.Model.Process.GetModel("select * from FL_Process where ID=" + Request["id"]); Literal1.Text = model.StepNo.value + ":" + model.Name.value; WX.Flow.FormFieldCollection edit = model.Editable_FormFieldCollection; if (edit != null) { foreach (WX.Flow.FormField ff in edit) { select2.Items.Add(new ListItem(ff.Text, ff.Id)); select1.Items.Remove(select1.Items.FindByValue(ff.Id)); } } } }
protected void Page_Load(object sender, EventArgs e) { //1.验证当前用户页面权限 if (!this.Master.A_Edit) { Response.Write("你没有权限访问此功能!"); Response.End(); return; } fid = WX.Request.rFormID; if (!IsPostBack) { if (fid > 0) { WX.Flow.Model.Form.MODEL model = WX.Request.rForm;//WX.Flow.Model.Form.GetModel("select * from FL_Forms where ID=" + fid); if (model != null && model.Module.value != null) { FORM_CONTENT.Value = model.Module.value.ToString(); return; } } else { Response.Redirect("Form_List.aspx"); } } }
protected void Button1_Click(object sender, EventArgs e) { WX.Flow.Model.Form.MODEL model = WX.Request.rForm; //WX.Flow.Model.Form.GetModel("select * from FL_Forms where ID=" + Request["id"]); model.Module.value = FORM_CONTENT.Value; model.Module_Short.value = model.GetShortModule(); model.UpdateItems(); model.Update(); //Response.Redirect("Form_List.aspx"); }
private void LoadData() { int id = WX.Request.rFormID; WX.Flow.Model.Form.MODEL f = WX.Request.rForm; //WX.Flow.Model.Form.NewDataModel(id); //填充控件 this.Name.Text = f.Name.ToString(); WX.Data.Dict.BindListCtrl_FormCatagory(this.ddlCatagory, null, null, f.CatagoryId.ToString()); WX.Data.Dict.BindListCtrl_DeptList(this.ddlDept, null, null, f.DepartmentId.ToString()); }
protected void ReBuildFile(object sender, EventArgs e) { int id = WX.Request.rFormID; WX.Flow.Model.Form.MODEL f = WX.Request.rForm; string file = String.Format("/UploadFiles/Forms/{0}.html", f.Name); ULCode.TextFile tf = new ULCode.TextFile(Server.MapPath(file)); tf.Save(f.Module.ToString(), false); tf = null; f = null; this.BindDownLoadFile(); }
protected void SubmitData(object sender, EventArgs e) { //1.验证用户权限 if (!this.Master.A_Edit) { Response.Write("你没有权限访问此功能!"); Response.End(); return; } //2.取得用户变量 int id = WX.Request.rFormID; String name = Convert.ToString(this.Name.Text); string catagoryId = this.ddlCatagory.SelectedValue; string deptId = this.ddlDept.SelectedValue; //下面语句是UI开发人员的语句,后台开发人员需删除掉。 //ULCode.Debug.we(String.Format("已经收到<br/>name:{0}<br/>type:{1}<br/>dept:{2}", name, catagoryId, deptId)); //return; //以下代码由后台开发人员填写 //3.验证用户变量,包含Request.QueryString及Request.Form //4.业务处理过程 //填写主要业务逻辑代码 WX.Flow.Model.Form.MODEL f = WX.Request.rForm; //WX.Flow.Model.Form.NewDataModel(id); f.Name.set(name); f.DepartmentId.set(deptId); f.CatagoryId.set(catagoryId); int iR = f.Update(); //5.(用户及业务对象)统计与状态 //6.登记日志 if (iR != 0) { WX.Main.AddLog(LogType.Default, "修改表单信息成功!", String.Format("{0}-{1}", id, name)); } //7.返回处理结果或返回其它页面。 if (iR > 0) { ULCode.Debug.Confirm(this, "表单修改成功!是否返回列表?", "Form_List.aspx", this.Request.RawUrl); } else { ULCode.Debug.Alert(this, "表单修改失败!"); } }
protected void DownloadFile(object sender, EventArgs e) { int id = WX.Request.rFormID; WX.Flow.Model.Form.MODEL f = WX.Request.rForm; string url = String.Format("/UploadFiles/Forms/{0}.html", f.Name); if (System.IO.File.Exists(Server.MapPath(url))) { WX.Main.DownloadFile(url, null); } else { ULCode.Debug.Alert(this, "没有找到下载文件!"); } f = null; }
protected void btnUpload_Click(object sender, EventArgs e) { if (fuForm.HasFile) { int id = WX.Request.rFormID; WX.Flow.Model.Form.MODEL f = WX.Request.rForm;//WX.Flow.Model.Form.NewDataModel(id); //上传 string file = String.Format("/UploadFiles/Forms/{0}.html", f.Name); fuForm.SaveAs(Server.MapPath(file)); //替换 ULCode.TextFile tf = new ULCode.TextFile(Server.MapPath(file)); f.Module.value = tf.Text(); f.Module_Short.value = f.GetShortModule(); f.UpdateItems(); f.Update(); } }
protected void SubmitData(object sender, EventArgs e) { //1.验证用户权限 if (!this.Master.A_Edit) { Response.Write("你没有权限访问此功能!"); Response.End(); return; } //2.取得用户变量 String name = Convert.ToString(this.Name.Text); string catagoryId = this.ddlCatagory.SelectedValue; string deptId = this.ddlDept.SelectedValue; //以下代码由后台开发人员填写 //3.验证用户变量,包含Request.QueryString及Request.Form //4.业务处理过程 //填写主要业务逻辑代码 WX.Flow.Model.Form.MODEL f = WX.Flow.Model.Form.NewDataModel(); f.Name.set(name); f.DepartmentId.set(deptId); f.CatagoryId.set(catagoryId); int newId = f.Insert(true); //5.(用户及业务对象)统计与状态 //6.登记日志 if (newId > 0) { WX.Main.AddLog(WX.LogType.Default, "添加用户信息成功!", String.Format("{0}-{1}", newId, name)); } //7.返回处理结果或返回其它页面。 if (newId > 0) { f.SaveIntoCaches(); Response.Redirect(String.Format("Form_Module.aspx?id={0}", newId)); //ULCode.Debug.Confirm(this, "添加用户成功!是否继续添加?", this.Request.RawUrl, "List.aspx"); } else { ULCode.Debug.Alert(this, "添加用户失败!"); } }
private string[] Replacevalue(string[] wherelist) { WX.Flow.Model.Form.MODEL form = fm; WX.Flow.FormField ff = null; for (int i = 0; i < wherelist.Length; i++) { if (wherelist[i] != "") { string[] tjlist = wherelist[i].Split('\''); if (tjlist[1].Substring(0, 1) == "@") { tjlist[1] = tjlist[1].Substring(1); ff = form.Items_FormFieldCollection.FindItemByTitle(tjlist[1]); if (ff != null) { tjlist[1] = ff.Value; } } else if (tjlist[1].Substring(0, 1) == "[") { tjlist[1] = tjlist[1].Substring(1, tjlist[1].Length - 2); tjlist[1] = GetSysVariable(tjlist[1]); } if (tjlist[3].Substring(0, 1) == "@") { tjlist[3] = tjlist[3].Substring(1); ff = form.Items_FormFieldCollection.FindItemByTitle(tjlist[3]); if (ff != null) { tjlist[3] = ff.Value; } } else if (tjlist[3].Substring(0, 1) == "[") { tjlist[3] = tjlist[3].Substring(1, tjlist[3].Length - 2); tjlist[3] = GetSysVariable(tjlist[3]); } wherelist[i] = "'" + tjlist[1] + "'" + tjlist[2] + "'" + tjlist[3] + "'"; } } return(wherelist); }
private void BindDownLoadFile() { int id = WX.Request.rFormID; WX.Flow.Model.Form.MODEL f = WX.Request.rForm; //WX.Flow.Model.Form.NewDataModel(id); string url = String.Format("/UploadFiles/Forms/{0}.html", f.Name); if (System.IO.File.Exists(Server.MapPath(url))) { System.IO.FileInfo file = new System.IO.FileInfo(Server.MapPath(url)); DateTime dt = file.LastWriteTime; this.liLastUpdateTime.Text = String.Format("{0:yyyy年MM月dd日 hh:mm}", dt); btnDownLoadFile.Enabled = true; } else { btnDownLoadFile.Enabled = false; } f = null; }
protected void Page_Load(object sender, EventArgs e) { WX.Flow.Model.Form.MODEL fm = null; if (!IsPostBack && Request["FORM_CONTENT"] != null && Request["FORM_CONTENT"] != "") { fm.Module.value = Request["FORM_CONTENT"].Replace("<", "<").Replace(">", ">").Replace("&", "&"); fm.Module_Short.value = fm.GetShortModule(); fm.UpdateItems(); Session["formmodel"] = fm; } else { fm = (WX.Flow.Model.Form.MODEL)Session["formmodel"]; } WX.Flow.FormFieldCollection oldffc = fm.FetchItems(); WX.Flow.FormFieldCollection ffedit = new WX.Flow.FormFieldCollection(); //ffedit.Add(new WX.Flow.FormField("DATA_1", "item10")); //ffedit.Add(new WX.Flow.FormField("DATA_2", "item8")); //ffedit.Add(new WX.Flow.FormField("DATA_3", "item9")); WX.Flow.FormFieldCollection ffhidden = new WX.Flow.FormFieldCollection(); //ffhidden.Add(new WX.Flow.FormField("DATA_1", "item7")); //ffhidden.Add(new WX.Flow.FormField("DATA_2", "item8")); //ffhidden.Add(new WX.Flow.FormField("DATA_3", "item9")); if (Request["sub_add"] != null && Request["sub_add"] != "") { WX.Flow.FormFieldCollection ffc = new WX.Flow.FormFieldCollection(); foreach (WX.Flow.FormField ff in oldffc) { ff.Value = Request[ff.Id] == null?"":Request[ff.Id]; ffc.Add(ff); } fm.Items_FormFieldCollection = ffc; Session["formmodel"] = fm; Literal1.Text = fm.GenerateHtmls(ffc, ffedit, ffhidden, "").Replace("-SYS_IP-", getIp()); } else { Literal1.Text = fm.GenerateHtmls(oldffc, ffedit, ffhidden, "").Replace("-SYS_IP-", getIp()); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Master.A_Edit) { Response.Write("你没有权限访问此功能!"); Response.End(); return; } if (!IsPostBack) { WX.Flow.Model.Flow.MODEL flow = WX.Flow.Model.Flow.GetCache(Convert.ToInt32(Request["flowId"]));//WX.Flow.Model.Flow.GetModel("select * from FL_Flows where ID=" + Request["flowId"]); if (flow != null) { flow.LoadForm(false); fm = flow.Form;// WX.Flow.Model.Form.GetModel("select * from FL_Forms where ID=" + flow.FormId.value); ITEM_VALUE2.Items.Add(new ListItem("常量", "")); if (fm.Items_FormFieldCollection != null) { foreach (WX.Flow.FormField ff in fm.Items_FormFieldCollection) { ListItem li = new ListItem(); li.Text = ff.Text; li.Value = "@" + ff.Text; ITEM_NAME.Items.Add(li); ITEM_VALUE2.Items.Add(li); } } DataTable dt = ULCode.QDA.XSql.GetDataTable("SELECT [Name],[Title],[Value],[Type] FROM [TE_VarDefine]"); for (int i = 0; i < dt.Rows.Count; i++) { ListItem li = new ListItem(); li.Text = "[" + dt.Rows[i]["title"].ToString() + "]"; li.Value = "[" + dt.Rows[i]["title"].ToString() + "]"; ITEM_VALUE2.Items.Add(li); li.Value = "[" + dt.Rows[i]["title"].ToString() + "]"; ITEM_NAME.Items.Add(li); } WX.Flow.Model.Process.MODEL prcs = WX.Flow.Model.Process.GetCache(Convert.ToInt32(Request.QueryString["Id"]));//WX.Flow.Model.Process.GetModel("select * from FL_Process where ID=" + Request["id"]); if (prcs != null) { if (prcs.Condition_In.value != null && prcs.Condition_In.value.ToString() != "") { string[] inarray = prcs.Condition_In.value.ToString().Split('|'); string[] prcsinlist = inarray[0].Split(new string[] { "\n" }, StringSplitOptions.None); for (int i = 0; i < prcsinlist.Length; i++) { if (prcsinlist[i].Trim() != "") { prcsinstr += String.Format("<tr class=\"TableLine1\">\n" + " <td align=\"center\">[{0}]</td>" + " <td>{1}</td>" + " <td align=\"center\">" + " <image style=\"cursor:pointer\" src=\"/images/edit.gif\" align=\"absmiddle\" onclick=\"upedit(this,1);\">" + " <image style=\"cursor:pointer\" src=\"/images/delete.gif\" align=\"absmiddle\" onclick=\"delRule(this,1)\">" + " </td>" + " </tr> ", (i + 1).ToString(), prcsinlist[i].Replace("`", "'")); } } PRCS_IN_SET.Value = inarray[1]; PRCS_IN_DESC.Value = inarray[2]; } if (prcs.Condition_Out.value != null && prcs.Condition_Out.value.ToString() != "") { string[] outarray = prcs.Condition_Out.value.ToString().Split('|'); string[] prcsoutlist = outarray[0].Split(new string[] { "\n" }, StringSplitOptions.None); for (int i = 0; i < prcsoutlist.Length; i++) { if (prcsoutlist[i].Trim() != "") { prcsoutstr += String.Format("<tr class=\"TableLine1\">\n" + " <td align=\"center\">[{0}]</td>" + " <td>{1}</td>" + " <td align=\"center\">" + " <image style=\"cursor:pointer\" src=\"/images/edit.gif\" align=\"absmiddle\" onclick=\"upedit(this,0)\">" + " <image style=\"cursor:pointer\" src=\"/images/delete.gif\" align=\"absmiddle\" onclick=\"delRule(this,0)\">" + " </td>" + " </tr> ", (i + 1).ToString(), prcsoutlist[i].Replace("`", "'")); } } PRCS_OUT_SET.Value = outarray[1]; PRCS_OUT_DESC.Value = outarray[2]; } } } /* * WX.Flow.Model.Process.MODEL prcsmodel = WX.Flow.Model.Process.GetCache(Convert.ToInt32(Request.QueryString["Id"])) ;//WX.Flow.Model.Process.GetModel("select * from FL_Process where ID=" + Request["id"]); * if (prcsmodel.Condition_In.value != null) * { * Response.Write("转入:" + checkin(prcsmodel.Condition_In.value.ToString().Replace("`", "'")) + "<br/>"); * } * if (prcsmodel.Condition_Out.value != null) * { * Response.Write("转出:" + checkin(prcsmodel.Condition_Out.value.ToString().Replace("`", "'"))); * }*/ } //if (prcsmodel != null) //{ // object obj = ULCode.QDA.XSql.GetValue("select top 1 ID from FL_Process where " + checkin(prcsmodel.Condition_In.value.ToString().Replace("`", "'"))); // if (obj != null) // { // Response.Write("正在进入流程。。。。。"); // } // else // { // Response.Write(prcsmodel.Condition_In.value.ToString().Split('|')[2]); // } // object objout = ULCode.QDA.XSql.GetValue("select top 1 ID from FL_Process where " + checkin(prcsmodel.Condition_Out.value.ToString().Replace("`", "'"))); // if (objout != null) // { // Response.Write("正在转出流程。。。。。"); // } // else // { // Response.Write(prcsmodel.Condition_In.value.ToString().Split('|')[2]); // } //} }
protected void Page_Load(object sender, EventArgs e) { if (!this.Master.A_Edit) { Response.Write("你没有权限访问此功能!"); Response.End(); return; } if (Request["flowid"] != null) { try { fid = Convert.ToInt32(Request["flowid"]); } catch { } if (!IsPostBack) { WX.Flow.Model.Flow.MODEL model = WX.Flow.Model.Flow.GetCache(fid); //WX.Flow.Model.Flow.GetModel("select * from FL_Flows where ID=" + fid); if (model != null) { model.LoadForm(false); WX.Flow.Model.Form.MODEL formmodel = model.Form; //WX.Flow.Model.Form.GetModel("select * from FL_Forms where ID=" + model.FormId.value); foreach (WX.Flow.FormField ff in formmodel.Items_FormFieldCollection) { drop_items.Items.Add(new ListItem(ff.Text, ff.Id)); } } //DataTable dt = ULCode.QDA.XSql.GetDataTable("select Name,StepNo from FL_Process where FlowId=" + fid); //for (int i = 0; i < dt.Rows.Count; i++) model.LoadProcessList(false); if (model.ProcessList != null) { foreach (WX.Flow.Model.Process.MODEL prcs in model.ProcessList) { AUTO_PRCS_USER.Items.Add(new ListItem(prcs.Name.ToString(), prcs.StepNo.ToString())); } } AUTO_PRCS_USER.SelectedValue = Request["id"]; WX.Flow.Model.Process.MODEL procss = WX.Flow.Model.Process.GetCache(Convert.ToInt32(Request["id"]));//WX.Flow.Model.Process.GetModel("select * from FL_Process where Id="+Request["id"]); if (procss != null) { WX.Data.Dict.BindListCtrl_enum_AutoOpMode(this.TOP_DEFAULT, null, null, procss.Auto_OPMode.ToString()); USER_LOCK.SelectedValue = procss.Auto_OpChangeMode.ToString(); WX.Data.Dict.BindListCtrl_enum_AutoSelOpFilter(this.USER_FILTER, null, null, procss.Auto_FilterMode.ToString()); WX.Data.Dict.BindListCtrl_enum_AutoSelOpType(this.AUTO_TYPE, null, null, procss.Auto_Type.ToString()); AUTO_PRCS_USER.SelectedValue = procss.Auto_BaseUnit.ToString(); drop_items.SelectedValue = procss.Auto_Item.ToString(); AUTO_USER.Value = procss.Auto_UserList.ToString(); if (procss.Auto_UserList.ToString() != "") { AUTO_USER_NAME.Text = ULCode.QDA.XSql.GetXDataTable("SELECT RealName FROM TU_Employees WHERE UserID in('" + procss.Auto_UserList.ToString().Replace(",", "','") + "')").ToColValueList(); } AUTO_USER_OP.Value = procss.Auto_UserOP.ToString(); if (procss.Auto_UserOP.ToString() != "") { AUTO_USER_OP_NAME.Text = ULCode.QDA.XSql.GetXDataTable("SELECT RealName FROM TU_Employees WHERE UserID in('" + procss.Auto_UserOP.ToString().Replace(",", "','") + "')").ToColValueList(); } } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //进入条件 if (Request["Flow_Id"] != null && Request["Flow_Id"] != "") { flow = WX.Flow.Model.Flow.GetCache(rFlowId); //WX.Flow.Model.Flow.NewDataModel(rFlowId); this.FormId = flow.FormId.ToInt32(); MenuBar1.Param1 = this.rFlowId.ToString(); bool b = flow.GetProcessByStep(1).GetInAccess(null); if (b == false || flow.IsVisible.ToInt32() == 1) { this.btnSubmit.Enabled = false; this.tooltip.InnerText = flow.GetProcessByStep(1).GetInMsg(null); } //填充流程信息及新工作流水号 flow.LoadNumberRule(false); string name = flow.Name.value.ToString(); //表单 WX.Flow.Model.Form.MODEL formmodel = WX.Flow.Model.Form.NewDataModel(flow.FormId); //WX.Flow.Model.Run.MODEL runmodel; //runmodel = WX.Flow.Model.Run.NewDataModel(); //runmodel.FlowId.value = flow.Id.value; ////2.装载Form表单 //runmodel.LoadMyFlow(false); //runmodel.LoadMyForm(false); WX.Flow.FormFieldCollection ffedit = new WX.Flow.FormFieldCollection(); WX.Flow.FormFieldCollection ffhidden = new WX.Flow.FormFieldCollection(); Literal1.Text = formmodel.GenerateHtmls(formmodel.Items_FormFieldCollection, ffedit, ffhidden, WX.Main.CurUser.UserID).Replace("-SYS_IP-", getIp()); } if (Request["RunID"] != null && Request["RunID"] != "") { WX.Flow.Model.Run.MODEL runmodel; runmodel = WX.Flow.Model.Run.GetModel("select * from FL_Run where Id=" + Request["RunID"]); MenuBar1.Param1 = runmodel.FlowId.ToString(); flow = WX.Flow.Model.Flow.NewDataModel(runmodel.FlowId.ToInt32()); //2.装载Form表单 runmodel.LoadMyForm(false); Literal1.Text = runmodel.GenerateHtmls(runmodel.Id.ToInt32()); this.txtSerialNumber.Text = runmodel.Name.ToString(); //String.Format("{0}({1})", name, number); btnSubmit.Visible = false; } else { this.txtSerialNumber.Text = String.Format("{0}({1})", flow.Name.ToString(), WX.Flow.Model.Run.GetFileCode(rFlowId)); } this.labDescription.Text = flow.Description.value.ToString(); //填充流程步骤列表 System.Data.DataTable query; if (Request["RunID"] != null) { query = ULCode.QDA.XSql.GetDataTable("select A.StepNo,A.Name,A.Next_Nodes,emp.RealName+':'+C.Content username from FL_Process A Left join FL_Run B on A.FlowID=B.FlowID left join FL_RunFeedBack C on B.ID=C.RunID and A.StepNo=C.StepNo left join TU_Users emp on C.CheckUserID=emp.UserId where A.FlowId=" + flow.Id.ToString() + " and B.ID=" + Request["RunID"] + " order by A.StepNo asc"); } else { query = ULCode.QDA.XSql.GetDataTable("select StepNo,Name,Next_Nodes,'' username from FL_Process where FlowId=" + flow.Id.ToString() + " order by StepNo asc"); } this.ProcessRepeater.DataSource = query; this.ProcessRepeater.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request["TrainID"] != null && Request["TrainID"] != "") { WX.XZ.Train.MODEL trainmodel = WX.XZ.Train.NewDataModel(Request["TrainID"]); li_title.Text = trainmodel.Title.ToString(); drop_type.SelectedValue = trainmodel.Type.ToString(); li_addr.Text = trainmodel.Addr.ToString(); li_runtime.Text = trainmodel.RunTime.ToString(); li_usersname.Text = trainmodel.UsersName.ToString(); li_content.Text = trainmodel.Content.ToString(); string userid = WX.Main.CurUser.UserID; if (Request["UserID"] != null && Request["UserID"] != "") { userid = Request["UserID"]; } WX.XZ.TrainUsers.MODEL tusermodel = WX.XZ.TrainUsers.GetModelToTrainID(trainmodel.ID.ToInt32(), userid); if (tusermodel != null) { if (tusermodel.RunID.ToString() != "") { WX.Flow.Model.Run.MODEL runmodel = WX.Flow.Model.Run.GetModel("select * from FL_Run where Id=" + tusermodel.RunID.ToString()); //2.装载Form表单 runmodel.LoadMyForm(false); li_formcontent.Text = runmodel.GenerateHtmls(runmodel.Id.ToInt32()); } else if (trainmodel.FlowID.ToString() != "") { WX.Flow.Model.Flow.MODEL flow = WX.Flow.Model.Flow.GetCache(trainmodel.FlowID.ToInt32()); WX.Flow.Model.Form.MODEL formmodel = WX.Flow.Model.Form.NewDataModel(flow.FormId); WX.Flow.FormFieldCollection ffedit = new WX.Flow.FormFieldCollection(); WX.Flow.FormFieldCollection ffhidden = new WX.Flow.FormFieldCollection(); li_formcontent.Text = formmodel.GenerateHtmls(formmodel.Items_FormFieldCollection, ffedit, ffhidden, WX.Main.CurUser.UserID).Replace("-SYS_IP-", getIp()); if (Request["UserID"] == null || Request["UserID"].ToString() == "") { Button1.Visible = true; if (tusermodel.State.ToInt32() == 0) { tusermodel.State.value = 1; tusermodel.Update(); } } } if (Request["UserID"] == null || Request["UserID"].ToString() == "") { try { WX.Main.MessageToHistory_where(String.Format("SendToUserId='{0}' and RedirectToUrl like'%?TrainID={1}%'", WX.Main.CurUser.UserID, Request["TrainID"])); } catch { } } if (li_formcontent.Text != "") { Literal1.Text = "学习心得"; } } } } }