protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } Model.SelectRecord selectRecord = new Model.SelectRecord("Role", "", "*", "where isState=1 order by id desc"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (table.Rows.Count > 0) { for (int i = 0; i < table.Rows.Count; i++) { ListItem li=new ListItem(table.Rows[i][1].ToString(),table.Rows[i][0].ToString()); this.selIsState.Items.Add(li); if (i == 0) { this.selIsState.SelectedValue = table.Rows[0][0].ToString(); } } } BLL.Organizational.BindToListBox(List_Organ, ""); } }
public string InitMenu() { StringBuilder builder = new StringBuilder(); Model.SelectRecord selectRecord = new Model.SelectRecord("view_UserPermissions", "", "name,url,id", "where parentid=0 and isState=1 and uid=" + this.Session["admin"].ToString() + " order by orderum"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; int num = table.Rows.Count; if (num > 0) { for (int i = 0; i < table.Rows.Count; i++) { if (i == 0) { builder.Append("<li class='first active'><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a>"); builder.Append(this.InitMenu(Convert.ToInt32(table.Rows[i]["id"]))); builder.Append("</li>"); } else if (i == num - 1) { builder.Append("<li class='last'><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a>"); builder.Append(this.InitMenu(Convert.ToInt32(table.Rows[i]["id"]))); builder.Append("</li>"); } else { builder.Append("<li><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a>"); builder.Append(this.InitMenu(Convert.ToInt32(table.Rows[i]["id"]))); builder.Append("</li>"); } } } return(builder.ToString()); }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } Model.SelectRecord selectRecord = new Model.SelectRecord("Role", "", "*", "where isState=1 order by id desc"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (table.Rows.Count > 0) { for (int i = 0; i < table.Rows.Count; i++) { ListItem li = new ListItem(table.Rows[i][1].ToString(), table.Rows[i][0].ToString()); this.selIsState.Items.Add(li); if (i == 0) { this.selIsState.SelectedValue = table.Rows[0][0].ToString(); } } } BLL.Organizational.BindToListBox(List_Organ, ""); } }
public void readSysTree(TreeView TV) { Model.SelectRecord selectRecord = new Model.SelectRecord("Menu", "", "*", "where 1=1"); DataSet set = BLL.SelectRecord.SelectRecordData(selectRecord); if (set != null) { DataTable table = set.Tables[0]; TV.Nodes.Clear(); DataView view3 = new DataView(table) { RowFilter = "parentid=0" }; DataView view = view3; foreach (DataRowView view2 in view) { TreeNode node2 = new TreeNode { Text = view2["name"].ToString(), Value = view2["id"].ToString() }; TreeNode child = node2; if (this.list.Contains(view2["id"].ToString())) { child.Checked = true; } TV.Nodes.Add(child); this.AddChildNode(table, child, view2["id"].ToString()); child.ExpandAll(); } } }
protected void Page_Load(object sender, EventArgs e) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } if (IsPostBack) { try { Model.SelectRecord selectRecord = new Model.SelectRecord("SystemInfo", "", "id,name,value", "where 1=1"); DataTable dt = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; for (int i = 1; i < 9; i++) { if (Request.Form["input_" + i.ToString()] != null && Request.Form["input_" + i.ToString()].ToString()!=dt.Rows[i-1]["value"].ToString()) { string value = Request.Form["input_" + i.ToString()].ToString(); BLL.SystemInfo.UpdateInfo(i.ToString(), value); } } Commons.MessageBox.Show(this.Page,"修改系统信息成功!"); } catch(Exception ex) { Commons.MessageBox.Show(this.Page, "修改系统信息失败!"); } } }
public string InitMenu() { StringBuilder builder = new StringBuilder(); Model.SelectRecord selectRecord = new Model.SelectRecord("view_UserPermissions", "", "name,url,id", "where parentid=0 and isState=1 and uid=" + this.Session["admin"].ToString() + " order by orderum"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; int num = table.Rows.Count; if (num > 0) { for (int i = 0; i < table.Rows.Count; i++) { if (i == 0) { builder.Append("<li class='first active'><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a>"); builder.Append(this.InitMenu(Convert.ToInt32(table.Rows[i]["id"]))); builder.Append("</li>"); } else if (i == num - 1) { builder.Append("<li class='last'><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a>"); builder.Append(this.InitMenu(Convert.ToInt32(table.Rows[i]["id"]))); builder.Append("</li>"); } else { builder.Append("<li><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a>"); builder.Append(this.InitMenu(Convert.ToInt32(table.Rows[i]["id"]))); builder.Append("</li>"); } } } return builder.ToString(); }
public string GetSystemInfo() { try { StringBuilder builder = new StringBuilder(); Model.SelectRecord selectRecord = new Model.SelectRecord("SystemInfo", "", "id,name,value", "where 1=1"); DataTable dt = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (dt.Rows.Count > 0) { builder.Append("<table>"); for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["id"].ToString() == "3" || dt.Rows[i]["id"].ToString() == "8") { builder.Append("<tr class='infotr'><td class='infoname'>" + dt.Rows[i]["name"].ToString() + ":</td><td><textarea name='input_" + dt.Rows[i]["id"].ToString() + "' id='input_" + dt.Rows[i]["id"].ToString() + "'>" + dt.Rows[i]["value"].ToString() + "</textarea></td></tr>"); } else { builder.Append("<tr class='infotr'><td class='infoname'>" + dt.Rows[i]["name"].ToString() + ":</td><td><input type='text' name='input_" + dt.Rows[i]["id"].ToString() + "' id='input_" + dt.Rows[i]["id"].ToString() + "' value='" + dt.Rows[i]["value"].ToString() + "' /></td></tr>"); } } } return(builder.ToString() + "</table>"); } catch (Exception e) { Commons.MessageBox.Show(this.Page, "读取系统信息出错"); return(""); } }
public string InitMenu(int parentid) { StringBuilder builder = new StringBuilder(); Model.SelectRecord selectRecord = new Model.SelectRecord("view_UserPermissions", "", "name,url", string.Concat(new object[] { "where parentid=", parentid, " and isState=1 and display=1 and uid=", this.Session["admin"].ToString(), "order by orderum" })); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; int num = table.Rows.Count; if (num > 0) { builder.Append("<ul>"); for (int i = 0; i < table.Rows.Count; i++) { if (i == 0) { builder.Append("<li class='first'><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a></li>"); } else if (i == num - 1) { builder.Append("<li class='last'><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a></li>"); } else { builder.Append("<li><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a></li>"); } } return (builder.ToString() + "</ul>"); } else { return ""; } }
protected void Page_Load(object sender, EventArgs e) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } if (IsPostBack) { try { Model.SelectRecord selectRecord = new Model.SelectRecord("SystemInfo", "", "id,name,value", "where 1=1"); DataTable dt = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; for (int i = 1; i < 9; i++) { if (Request.Form["input_" + i.ToString()] != null && Request.Form["input_" + i.ToString()].ToString() != dt.Rows[i - 1]["value"].ToString()) { string value = Request.Form["input_" + i.ToString()].ToString(); BLL.SystemInfo.UpdateInfo(i.ToString(), value); } } Commons.MessageBox.Show(this.Page, "修改系统信息成功!"); } catch (Exception ex) { Commons.MessageBox.Show(this.Page, "修改系统信息失败!"); } } }
public string GetSystemInfo() { try { StringBuilder builder = new StringBuilder(); Model.SelectRecord selectRecord = new Model.SelectRecord("SystemInfo", "", "id,name,value", "where 1=1"); DataTable dt = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (dt.Rows.Count > 0) { builder.Append("<table>"); for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["id"].ToString() == "3" || dt.Rows[i]["id"].ToString() == "8") { builder.Append("<tr class='infotr'><td class='infoname'>" + dt.Rows[i]["name"].ToString() + ":</td><td><textarea name='input_" + dt.Rows[i]["id"].ToString() + "' id='input_" + dt.Rows[i]["id"].ToString() + "'>" + dt.Rows[i]["value"].ToString() + "</textarea></td></tr>"); } else { builder.Append("<tr class='infotr'><td class='infoname'>" + dt.Rows[i]["name"].ToString() + ":</td><td><input type='text' name='input_" + dt.Rows[i]["id"].ToString() + "' id='input_" + dt.Rows[i]["id"].ToString() + "' value='" + dt.Rows[i]["value"].ToString() + "' /></td></tr>"); } } } return builder.ToString() + "</table>"; } catch (Exception e) { Commons.MessageBox.Show(this.Page, "读取系统信息出错"); return ""; } }
public string InitMenu(int parentid) { StringBuilder builder = new StringBuilder(); Model.SelectRecord selectRecord = new Model.SelectRecord("view_UserPermissions", "", "name,url", string.Concat(new object[] { "where parentid=", parentid, " and isState=1 and display=1 and uid=", this.Session["admin"].ToString(), "order by orderum" })); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; int num = table.Rows.Count; if (num > 0) { builder.Append("<ul>"); for (int i = 0; i < table.Rows.Count; i++) { if (i == 0) { builder.Append("<li class='first'><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a></li>"); } else if (i == num - 1) { builder.Append("<li class='last'><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a></li>"); } else { builder.Append("<li><a href='" + table.Rows[i]["url"].ToString() + "'>" + table.Rows[i]["name"].ToString() + "</a></li>"); } } return(builder.ToString() + "</ul>"); } else { return(""); } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } if (base.Request.QueryString["id"] != null) { id = base.Request.QueryString["id"].ToString(); Model.SelectRecord selectRecord = new Model.SelectRecord("WorkFlow", "", "*", "where id='" + id + "'"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (table.Rows.Count > 0) { this.txtName.Value = table.Rows[0][1].ToString(); this.isState.Value = table.Rows[0][4].ToString(); this.txtReMark.Value = table.Rows[0][3].ToString(); this.uploadurl.Value = table.Rows[0][2].ToString(); } } else { MessageBox.Show(this, "请选择要编辑的工作流!"); base.Response.Redirect("/workflow/WorkFlowList.aspx"); } } }
public void bindview() { Model.SelectRecord selectRecord = new Model.SelectRecord("Role", "", "*", "where 1=1"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; this.GridView1.DataSource = table; this.GridView1.DataBind(); }
//end protected void btnEdit_ServerClick(object sender, EventArgs e) { if (((this.txtName.Value.Length == 0) || (this.uploadurl.Value.Length == 0)) || (this.selWorkFlow.SelectedValue.Length == 0)) { MessageBox.Show(this, "请您填写完整的信息"); } else { Model.SelectRecord selectRecord = new Model.SelectRecord("WorkFlow", "", "*", "where id='" + this.selWorkFlow.SelectedValue + "'"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; string content = File.ReadAllText(System.Web.HttpContext.Current.Request.MapPath("../") + table.Rows[0]["URL"].ToString()); //ziyunhx add 2013-8-5 workflow Persistence //old code //WorkFlowTracking.instance = engineManager.createInstance(content, null, null); //WorkFlowTracking.instance.Run(); //new code instance = engineManager.createInstance(content, null, null); if (instanceStore == null) { instanceStore = new SqlWorkflowInstanceStore(SqlHelper.strconn); view = instanceStore.Execute(instanceStore.CreateInstanceHandle(), new CreateWorkflowOwnerCommand(), TimeSpan.FromSeconds(30)); instanceStore.DefaultInstanceOwner = view.InstanceOwner; } instance.InstanceStore = instanceStore; instance.Run(); //end Model.Document documents = new Model.Document { ID = id.Trim(), Name = this.txtName.Value.Trim(), URL = this.uploadurl.Value.Trim(), Remark = this.txtReMark.Value.Trim(), WID = this.selWorkFlow.SelectedValue, WStep = "0", Result = "0", UID = this.Session["admin"].ToString(), //ziyunhx add 2013-8-5 workflow Persistence //old code //FlowInstranceID = WorkFlowTracking.instance.Id, //new code FlowInstranceID = instance.Id, //end }; if (BLL.Document.DocumentUpdate(documents) == 1) { UserOperatingManager.InputUserOperating(this.Session["admin"].ToString(), "工作流管理", "编辑工作流" + documents.Name + "的信息成功"); MessageBox.ShowAndRedirect(this, "编辑公文成功!", "/document/DocumentList.aspx"); } else { UserOperatingManager.InputUserOperating(this.Session["admin"].ToString(), "工作流管理", "编辑工作流" + documents.Name + "的信息失败"); MessageBox.Show(this, "编辑工作流失败"); } } }
public static string ForMatRootName(string s) { Model.SelectRecord selectRecord = new Model.SelectRecord("Organizational", "", "ID,Name,PID", "where ID = '" + s + "'"); if (s != "0") { return BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0].Rows[0]["Name"].ToString(); } return "顶级"; }
public static DataSet SelectRecordData(Model.SelectRecord selectRecord) { SqlParameter[] pars = new SqlParameter[] { new SqlParameter("@tablename", SqlDbType.VarChar, 100), new SqlParameter("@record", SqlDbType.VarChar, 200), new SqlParameter("@columnlist", SqlDbType.VarChar, 300), new SqlParameter("@condition", SqlDbType.VarChar, 0x1f40) }; pars[0].Value = selectRecord.Stablename; pars[1].Value = selectRecord.Irecord; pars[2].Value = selectRecord.Scolumnlist; pars[3].Value = selectRecord.Scondition; return(SqlHelper.GetAllInfo(pars, "SelectRecord")); }
public static string ForMatRootName(string s) { Model.SelectRecord selectRecord = new Model.SelectRecord("Organizational", "", "ID,Name,PID", "where ID = '" + s + "'"); if (s != "0") { return(BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0].Rows[0]["Name"].ToString()); } return("顶级"); }
public ArrayList getMenuRIGHT(string id) { Model.SelectRecord selectRecord = new Model.SelectRecord("MenuRIGHT", "", "*", "where roleid=" + id); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; ArrayList list = new ArrayList(); for (int i = 0; i < table.Rows.Count; i++) { list.Add(table.Rows[i]["flowid"].ToString()); } return list; }
public ArrayList getMenuRIGHT(string id) { Model.SelectRecord selectRecord = new Model.SelectRecord("MenuRIGHT", "", "*", "where roleid=" + id); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; ArrayList list = new ArrayList(); for (int i = 0; i < table.Rows.Count; i++) { list.Add(table.Rows[i]["flowid"].ToString()); } return(list); }
public string Initsh() { if (!IsPostBack) { StringBuilder builder = new StringBuilder(); builder.Clear(); str.Clear(); Model.SelectRecord selectRecord = new Model.SelectRecord("WorkFlow", "", "*", "where id='" + id + "'"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; // 读取文件的源路径及其读取流 string strReadFilePath = System.Web.HttpContext.Current.Request.MapPath("/") + table.Rows[0][2].ToString(); StreamReader srReadFile = new StreamReader(strReadFilePath); Regex r = new Regex("<a:DocActivity"); Regex x = new Regex(@".*DisplayName=\""(?'name'[^\<]+)\""\s*sap.*StepID=\""(?'stepid'[^<]+)\"".*bookmarkName=\""(?'value'[^<]+)\""", RegexOptions.Compiled); // 读取流直至文件末尾结束 while (!srReadFile.EndOfStream) { string strReadLine = srReadFile.ReadLine(); //读取每行数据 Match m = r.Match(strReadLine); if (m.Success) { MatchCollection mc = x.Matches(strReadLine); ArrayList detail = new ArrayList(); foreach (Match ms in mc) { detail.Add(ms.Groups["name"].Value); detail.Add(ms.Groups["stepid"].Value); detail.Add(ms.Groups["value"].Value); } str.Add(detail); } } // 关闭读取流文件 srReadFile.Close(); for (int i = 0; i < str.Count; i++) { ArrayList content = (ArrayList)str[i]; builder.Append("<tr><td>" + content[0].ToString() + "</td></tr><tr><td>"); builder.Append("<select size=\"4\" name=\"contopt\" multiple=\"multiple\" id=\"" + content[2].ToString() + "\">"); builder.Append(BLL.Organizational.BindToListBox("") + "</select></td><td><input type=\"radio\" value=\"0\" checked name=\"myrad" + i.ToString() + "\">审批<input type=\"radio\" value=\"1\" name=\"myrad" + i.ToString() + "\">会签</td></tr>"); } return(builder.ToString()); } else { return(""); } }
public static string BindToListBox(string selectValue) { string str = ""; Model.SelectRecord record2 = new Model.SelectRecord { Irecord = "", Scolumnlist = "ID,Name", Stablename = "Organizational", Scondition = "where PID='0'" }; Model.SelectRecord selectRecord = record2; DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table != null) && (table.Rows.Count != 0)) { for (int i = 0; i < table.Rows.Count; i++) { string str2 = str; str = str2 + " <option Value='" + table.Rows[i]["ID"].ToString() + "'>" + table.Rows[i]["Name"].ToString() + "</option>\n\t\t"; selectRecord.Scondition = "where PID='" + table.Rows[i]["ID"].ToString() + "'"; DataTable table2 = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table2 != null) && (table2.Rows.Count != 0)) { for (int j = 0; j < table2.Rows.Count; j++) { string str3 = str; str = str3 + " <option Value='" + table2.Rows[j]["ID"].ToString() + "'> " + table2.Rows[j]["Name"].ToString() + "</option>\n\t\t"; selectRecord.Scondition = "where PID='" + table2.Rows[j]["ID"].ToString() + "'"; DataTable table3 = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table3 != null) && (table3.Rows.Count != 0)) { for (int k = 0; k < table3.Rows.Count; k++) { string str4 = str; str = str4 + " <option Value='" + table3.Rows[k]["ID"].ToString() + "'> " + table3.Rows[k]["Name"].ToString() + "</option>\n\t\t"; } table3.Clear(); table3.Dispose(); } } table2.Clear(); table2.Dispose(); } } table.Clear(); table.Dispose(); } if (selectValue == "0") { str = str + " <option Value='0' selected='True'>请选择岗位信息</option>\n\t\t"; } return str; }
public static string BindToDropDownList(string selectValue) { string str = ""; Model.SelectRecord record2 = new Model.SelectRecord { Irecord = "", Scolumnlist = "ID,Name", Stablename = "Organizational", Scondition = "where PID='0'" }; Model.SelectRecord selectRecord = record2; DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table != null) && (table.Rows.Count != 0)) { for (int i = 0; i < table.Rows.Count; i++) { string str2 = str; str = str2 + " <asp:ListItem Text='" + table.Rows[i]["Name"].ToString() + "' Value='" + table.Rows[i]["ID"].ToString() + "'></asp:ListItem>\n\t\t"; selectRecord.Scondition = "where PID='" + table.Rows[i]["ID"].ToString() + "'"; DataTable table2 = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table2 != null) && (table2.Rows.Count != 0)) { for (int j = 0; j < table2.Rows.Count; j++) { string str3 = str; str = str3 + " <asp:ListItem Text=' " + table2.Rows[j]["Name"].ToString() + "' Value='" + table2.Rows[j]["ID"].ToString() + "'></asp:ListItem>\n\t\t"; selectRecord.Scondition = "where PID='" + table2.Rows[j]["ID"].ToString() + "'"; DataTable table3 = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table3 != null) && (table3.Rows.Count != 0)) { for (int k = 0; k < table3.Rows.Count; k++) { string str4 = str; str = str4 + " <asp:ListItem Text=' " + table3.Rows[k]["Name"].ToString() + "' Value='" + table3.Rows[k]["ID"].ToString() + "'></asp:ListItem>\n\t\t"; } table3.Clear(); table3.Dispose(); } } table2.Clear(); table2.Dispose(); } } table.Clear(); table.Dispose(); } if (selectValue == "0") { str = str + " <asp:ListItem Text='请选择岗位信息' Value='0' Selected='True'></asp:ListItem>\n\t\t"; } return str; }
private void GetRoleInfo(string id) { Model.SelectRecord selectRecord = new Model.SelectRecord("Role", "", "*", " where id=" + id); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; this.rid.Value = table.Rows[0]["id"].ToString(); this.name.Value = table.Rows[0]["name"].ToString(); if (table.Rows[0]["isState"].ToString() == "1") { this.isState.SelectedIndex = 0; } else { this.isState.SelectedIndex = 1; } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } if (base.Request.QueryString["id"] != null) { id = base.Request.QueryString["id"].ToString(); Model.SelectRecord selectRecord = new Model.SelectRecord("Document", "", "*", "where id='" + id + "'"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (table.Rows.Count > 0) { this.txtName.Text = table.Rows[0][1].ToString(); this.txtReMark.Value = table.Rows[0][3].ToString(); } Model.SelectRecord selectRecords = new Model.SelectRecord("WorkFlowRole", "", "*", "where WID='" + table.Rows[0]["WID"].ToString() + "' AND WStep < '" + table.Rows[0]["WStep"].ToString() + "' and WStep > 0 order by id desc"); DataTable tb = BLL.SelectRecord.SelectRecordData(selectRecords).Tables[0]; ListItem litrue = new ListItem("同意", "true"); ListItem lifalse = new ListItem("不同意", "false"); this.DropDown_sp.Items.Add(litrue); this.DropDown_sp.Items.Add(lifalse); if (tb.Rows.Count > 0) { for (int i = 0; i < tb.Rows.Count; i++) { ListItem li = new ListItem("退回" + tb.Rows[i]["name"].ToString(), tb.Rows[i]["value"].ToString()); this.DropDown_sp.Items.Add(li); } } } else { MessageBox.Show(this, "请选择要审核的公文!"); base.Response.Redirect("/workflow/WorkFlowList.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } if (base.Request.QueryString["id"] != null) { id = base.Request.QueryString["id"].ToString(); DataSet set = BLL.Users.SelectForUserID(id); this.txtEmail.Value = set.Tables[0].Rows[0]["Email"].ToString(); this.txtTelephone.Value = set.Tables[0].Rows[0]["Telephone"].ToString(); this.txtUserID.Value = set.Tables[0].Rows[0]["UserID"].ToString(); this.txtUserName.Value = set.Tables[0].Rows[0]["UserName"].ToString(); this.TextBox1.Value = set.Tables[0].Rows[0]["QQ"].ToString(); this.selIsState.SelectedIndex = -1; Model.SelectRecord selectRecord = new Model.SelectRecord("Role", "", "*", "where isState=1 order by id desc"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (table.Rows.Count > 0) { for (int i = 0; i < table.Rows.Count; i++) { ListItem li = new ListItem(table.Rows[i][1].ToString(), table.Rows[i][0].ToString()); this.selIsState.Items.Add(li); Model.SelectRecord selectRecord2 = new Model.SelectRecord("RoleUsers", "", "*", "where userid=" + id); DataTable dt = BLL.SelectRecord.SelectRecordData(selectRecord2).Tables[0]; if (dt.Rows.Count > 0) { this.selIsState.SelectedValue = dt.Rows[0][1].ToString(); } } } BLL.Organizational.BindToListBox(List_Organ, set.Tables[0].Rows[0]["OID"].ToString()); } else { MessageBox.Show(this, "请选择要编辑的用户!"); base.Response.Redirect("/account/UserList.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } string where = "where State=1 AND (1=2 "; DataTable dt = BLL.Users.SelectForUserID(this.Session["admin"].ToString()).Tables[0]; string[] str = dt.Rows[0]["OID"].ToString().Split(new char[] { ',' }); for (int j = 0; j < str.Length; j++) { where += "OR OID like '%," + str[j].ToString() + ",%' "; } where += ") order by id desc"; Model.SelectRecord selectRecord = new Model.SelectRecord("view_AddDocument", "", "*", where); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (table.Rows.Count > 0) { for (int i = 0; i < table.Rows.Count; i++) { ListItem li = new ListItem(table.Rows[i][1].ToString(), table.Rows[i][0].ToString()); this.selWorkFlow.Items.Add(li); if (i == 0) { this.selWorkFlow.SelectedValue = table.Rows[0][0].ToString(); } } } else { MessageBox.ShowAndRedirect(this, "您不具有创建公文的权限", "/Index.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } if (base.Request.QueryString["id"] != null) { id = base.Request.QueryString["id"].ToString(); Model.SelectRecord selectRecords = new Model.SelectRecord("WorkFlow", "", "*", "where State=1 order by id desc"); DataTable tb = BLL.SelectRecord.SelectRecordData(selectRecords).Tables[0]; if (tb.Rows.Count > 0) { for (int i = 0; i < tb.Rows.Count; i++) { ListItem li = new ListItem(tb.Rows[i][1].ToString(), tb.Rows[i][0].ToString()); this.selWorkFlow.Items.Add(li); } } Model.SelectRecord selectRecord = new Model.SelectRecord("Document", "", "*", "where id='" + id + "'"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (table.Rows.Count > 0) { this.txtName.Value = table.Rows[0][1].ToString(); this.txtReMark.Value = table.Rows[0][3].ToString(); this.uploadurl.Value = table.Rows[0][2].ToString(); this.selWorkFlow.SelectedValue = table.Rows[0][4].ToString(); } } else { MessageBox.Show(this, "请选择要编辑的公文!"); base.Response.Redirect("/workflow/WorkFlowList.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } if ((base.Request.QueryString["pid"] != null) && (base.Request.QueryString["pid"].Trim() != "")) { this.pid = base.Request.QueryString["pid"].Trim(); } Model.SelectRecord selectRecord = new Model.SelectRecord("Organizational", "", "ID,Name,PID", "where pid = '" + pid + "'"); DataTable dt = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; this.gvClass.DataSource = dt; this.gvClass.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } if ((base.Request.QueryString["id"].ToString() != null) && (base.Request.QueryString["id"].ToString().Trim().Length > 0)) { id = base.Request.QueryString["id"].ToString(); } Model.SelectRecord selectRecord = new Model.SelectRecord("Organizational", "", "*", "where ID=" + id); DataSet set = BLL.SelectRecord.SelectRecordData(selectRecord); this.txtClassName.Text = set.Tables[0].Rows[0]["Name"].ToString(); BLL.Organizational.BindToDropDownList(this.ddlRootID, set.Tables[0].Rows[0]["PID"].ToString()); } }
protected void Page_Load(object sender, EventArgs e) { try { Model.SelectRecord selectRecord = new Model.SelectRecord("SystemInfo", "", "value", "where 1=1"); DataTable dt = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (dt.Rows.Count > 0) { this.lab_address.Text = dt.Rows[3][0].ToString(); this.lab_phone.Text = dt.Rows[4][0].ToString(); this.lab_website.Text = dt.Rows[5][0].ToString(); this.lab_email.Text = dt.Rows[6][0].ToString(); this.lab_remark.Text = dt.Rows[7][0].ToString(); this.email.HRef = "mailto:" + dt.Rows[6][0].ToString(); this.website.HRef = "http://" + dt.Rows[5][0].ToString(); } } catch (Exception ex) { //数据库连接错误,无法读取信息 base.Response.Write(ex.ToString()); } }
public static DataSet SelectRecordData(Model.SelectRecord selectRecord) { return(DAL.SelectRecord.SelectRecordData(selectRecord)); }
public static void BindToDropDownList(DropDownList ddlID, string selectValue) { Model.SelectRecord selectRecord = new Model.SelectRecord { Irecord = "", Scolumnlist = "ID,Name", Stablename = "Organizational", Scondition = "where PID='0'" }; DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table != null) && (table.Rows.Count != 0)) { for (int i = 0; i < table.Rows.Count; i++) { ListItem item6 = new ListItem { Value = table.Rows[i]["ID"].ToString(), Text = table.Rows[i]["Name"].ToString() }; ListItem item = item6; ddlID.Items.Add(item); selectRecord.Scondition = "where PID='" + item.Value + "'"; DataTable table2 = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table2 != null) && (table2.Rows.Count != 0)) { for (int j = 0; j < table2.Rows.Count; j++) { ListItem item5 = new ListItem { Value = table2.Rows[j]["ID"].ToString(), Text = " " + table2.Rows[j]["Name"].ToString() }; ListItem item2 = item5; ddlID.Items.Add(item2); selectRecord.Scondition = "where PID='" + item2.Value + "'"; DataTable table3 = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table3 != null) && (table3.Rows.Count != 0)) { for (int k = 0; k < table3.Rows.Count; k++) { ListItem item4 = new ListItem { Value = table3.Rows[k]["ID"].ToString(), Text = " " + table3.Rows[k]["Name"].ToString() }; ListItem item3 = item4; ddlID.Items.Add(item3); } table3.Clear(); table3.Dispose(); } } table2.Clear(); table2.Dispose(); } } table.Clear(); table.Dispose(); } ListItem item8 = new ListItem { Text = "请选择岗位信息", Value = "0" }; ddlID.Items.Add(item8); ddlID.DataBind(); ddlID.Items.FindByValue(selectValue).Selected = true; }
//end protected void btnEdit_ServerClick(object sender, EventArgs e) { if (this.DropDown_sp.SelectedValue.Length == 0) { MessageBox.Show(this, "请您选择审核结果"); } else { Model.SelectRecord selectRecords = new Model.SelectRecord("view_DocumentInfo", "", "*", "where id='" + id + "'"); DataTable dt = BLL.SelectRecord.SelectRecordData(selectRecords).Tables[0]; //ziyunhx add 2013-8-5 workflow Persistence if (dt == null) { return; } Model.SelectRecord selectRecord = new Model.SelectRecord("WorkFlow", "", "*", "where id='" + dt.Rows[0]["WorkFlowID"].ToString() + "'"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; string content = File.ReadAllText(System.Web.HttpContext.Current.Request.MapPath("../") + table.Rows[0]["URL"].ToString()); instance = engineManager.createInstance(content, null, null); if (instanceStore == null) { instanceStore = new SqlWorkflowInstanceStore(SqlHelper.strconn); view = instanceStore.Execute(instanceStore.CreateInstanceHandle(), new CreateWorkflowOwnerCommand(), TimeSpan.FromSeconds(30)); instanceStore.DefaultInstanceOwner = view.InstanceOwner; } instance.InstanceStore = instanceStore; Guid guid = new Guid(dt.Rows[0]["FlowInstranceID"].ToString()); instance.Load(guid); //end if (this.DropDown_sp.SelectedValue == "true") { string[] s = dt.Rows[0]["OID"].ToString().Split(new char[] { ',' }); if (s[s.Length - 1] == "1") { Model.SelectRecord selectExecut = new Model.SelectRecord("WorkFlowExecution", "", "*", "where DID='" + id + "' and step ='" + dt.Rows[0]["WStep"].ToString() + "' and UID='"+this.Session["admin"].ToString()+"'"); DataTable executdt = BLL.SelectRecord.SelectRecordData(selectExecut).Tables[0]; if (executdt.Rows.Count > 0) { MessageBox.ShowAndRedirect(this, "该公文您已审核,请等待其他人审核!", "/document/DocumentList.aspx"); } else { Model.SelectRecord selectExecutCount = new Model.SelectRecord("WorkFlowExecution", "", "distinct UID", "where DID='" + id + "' and step ='" + dt.Rows[0]["WStep"].ToString() + "'"); DataTable dtcount = BLL.SelectRecord.SelectRecordData(selectExecutCount).Tables[0]; string where = "where IsState=2 AND (1=2 "; string[] str = dt.Rows[0]["OID"].ToString().Split(new char[] { ',' }); for (int j = 1; j < str.Length-1; j++) { where += "OR OID like '%" + str[j].ToString() + "%' "; } where += ") order by id desc"; Model.SelectRecord selectUserCount = new Model.SelectRecord("Users", "", "ID", where); DataTable usercount = BLL.SelectRecord.SelectRecordData(selectUserCount).Tables[0]; if (dtcount.Rows.Count + 1 == usercount.Rows.Count) { if (instance.GetBookmarks().Count(p => p.BookmarkName == dt.Rows[0]["value"].ToString()) == 1) { instance.ResumeBookmark(dt.Rows[0]["value"].ToString(), this.DropDown_sp.SelectedValue.ToString()); } } } } else { //一旦审批未通过,删除该公文当前流转步骤信息 BLL.GeneralMethods.GeneralDelDB("WorkFlowExecution", "where DID ='" + id + "' and step='" + dt.Rows[0]["WStep"].ToString() + "'"); if (instance.GetBookmarks().Count(p => p.BookmarkName == dt.Rows[0]["value"].ToString()) == 1) { instance.ResumeBookmark(dt.Rows[0]["value"].ToString(), this.DropDown_sp.SelectedValue.ToString()); } } Model.WorkFlowExecution workexe = new Model.WorkFlowExecution { DID = dt.Rows[0]["ID"].ToString(), UID = this.Session["admin"].ToString(), step = dt.Rows[0]["WStep"].ToString(), Remark = this.txtSP.Value.Trim(), Result = "1", }; BLL.WorkFlowExecution.Add(workexe); } else { Model.WorkFlowExecution workexe = new Model.WorkFlowExecution { DID = dt.Rows[0]["ID"].ToString(), UID = this.Session["admin"].ToString(), step = dt.Rows[0]["WStep"].ToString(), Remark = this.txtSP.Value.Trim(), Result = "2", }; BLL.WorkFlowExecution.Add(workexe); if (instance.GetBookmarks().Count(p => p.BookmarkName == dt.Rows[0]["value"].ToString()) == 1) { instance.ResumeBookmark(dt.Rows[0]["value"].ToString(), this.DropDown_sp.SelectedValue.ToString()); } } UserOperatingManager.InputUserOperating(this.Session["admin"].ToString(), "公文管理", "公文审核" + dt.Rows[0]["Name"].ToString() + "的信息成功"); MessageBox.ShowAndRedirect(this, "审核公文成功!", "/document/DocumentList.aspx"); instance.Unload(); } }
public string Initsh() { if (!IsPostBack) { StringBuilder builder = new StringBuilder(); builder.Clear(); str.Clear(); Model.SelectRecord selectRecord = new Model.SelectRecord("WorkFlow", "", "*", "where id='" + id + "'"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; // 读取文件的源路径及其读取流 string strReadFilePath = System.Web.HttpContext.Current.Request.MapPath("/") + table.Rows[0][2].ToString(); StreamReader srReadFile = new StreamReader(strReadFilePath); Regex r = new Regex("<a:DocActivity"); Regex x = new Regex(@".*DisplayName=\""(?'name'[^\<]+)\""\s*sap.*StepID=\""(?'stepid'[^<]+)\"".*bookmarkName=\""(?'value'[^<]+)\""", RegexOptions.Compiled); // 读取流直至文件末尾结束 while (!srReadFile.EndOfStream) { string strReadLine = srReadFile.ReadLine(); //读取每行数据 Match m = r.Match(strReadLine); if (m.Success) { MatchCollection mc = x.Matches(strReadLine); ArrayList detail = new ArrayList(); foreach (Match ms in mc) { detail.Add(ms.Groups["name"].Value); detail.Add(ms.Groups["stepid"].Value); detail.Add(ms.Groups["value"].Value); } str.Add(detail); } } // 关闭读取流文件 srReadFile.Close(); for (int i = 0; i < str.Count; i++) { ArrayList content = (ArrayList)str[i]; builder.Append("<tr><td>" + content[0].ToString() + "</td></tr><tr><td>"); builder.Append("<select size=\"4\" name=\"contopt\" multiple=\"multiple\" id=\"" + content[2].ToString() + "\">"); builder.Append(BLL.Organizational.BindToListBox("") + "</select></td><td><input type=\"radio\" value=\"0\" checked name=\"myrad" + i.ToString() + "\">审批<input type=\"radio\" value=\"1\" name=\"myrad" + i.ToString() + "\">会签</td></tr>"); } return builder.ToString(); } else return ""; }
public DataTable BindData(string whereSql) { Model.SelectRecord selectRecord = new Model.SelectRecord("WorkFlow", "", "*", whereSql); this.dt = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; return(this.dt); }
public DataTable BindData(string whereSql) { Model.SelectRecord selectRecord = new Model.SelectRecord("WorkFlow", "", "*", whereSql); this.dt = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; return this.dt; }
public DataTable BindData(string whereSql) { Model.SelectRecord selectRecord = new Model.SelectRecord("view_DocumentInfo", "", "*", whereSql); this.dt = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; return(this.dt); }
public DataTable BindData(string whereSql) { Model.SelectRecord selectRecord = new Model.SelectRecord("view_DocumentInfo", "", "*", whereSql); this.dt = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; return this.dt; }
public static void BindToListBox(ListBox ddlID, string selectValue) { Model.SelectRecord selectRecord = new Model.SelectRecord { Irecord = "", Scolumnlist = "ID,Name", Stablename = "Organizational", Scondition = "where PID='0'" }; DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table != null) && (table.Rows.Count != 0)) { for (int i = 0; i < table.Rows.Count; i++) { ListItem item6 = new ListItem { Value = table.Rows[i]["ID"].ToString(), Text = table.Rows[i]["Name"].ToString() }; ListItem item = item6; ddlID.Items.Add(item); selectRecord.Scondition = "where PID='" + item.Value + "'"; DataTable table2 = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table2 != null) && (table2.Rows.Count != 0)) { for (int j = 0; j < table2.Rows.Count; j++) { ListItem item5 = new ListItem { Value = table2.Rows[j]["ID"].ToString(), Text = " " + table2.Rows[j]["Name"].ToString() }; ListItem item2 = item5; ddlID.Items.Add(item2); selectRecord.Scondition = "where PID='" + item2.Value + "'"; DataTable table3 = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if ((table3 != null) && (table3.Rows.Count != 0)) { for (int k = 0; k < table3.Rows.Count; k++) { ListItem item4 = new ListItem { Value = table3.Rows[k]["ID"].ToString(), Text = " " + table3.Rows[k]["Name"].ToString() }; ListItem item3 = item4; ddlID.Items.Add(item3); } table3.Clear(); table3.Dispose(); } } table2.Clear(); table2.Dispose(); } } table.Clear(); table.Dispose(); } ddlID.DataBind(); if (selectValue != null && selectValue != "") { string[] s = selectValue.Split(new char[] { ',' }); for (int i = 0; i < s.Length; i++) { for (int j = 0; j < ddlID.Items.Count; j++) { if (ddlID.Items[j].Value == s[i]) { ddlID.Items[j].Selected = true; } } } } }
//end protected void btnEdit_ServerClick(object sender, EventArgs e) { if (this.DropDown_sp.SelectedValue.Length == 0) { MessageBox.Show(this, "请您选择审核结果"); } else { Model.SelectRecord selectRecords = new Model.SelectRecord("view_DocumentInfo", "", "*", "where id='" + id + "'"); DataTable dt = BLL.SelectRecord.SelectRecordData(selectRecords).Tables[0]; //ziyunhx add 2013-8-5 workflow Persistence if (dt == null) { return; } Model.SelectRecord selectRecord = new Model.SelectRecord("WorkFlow", "", "*", "where id='" + dt.Rows[0]["WorkFlowID"].ToString() + "'"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; string content = File.ReadAllText(System.Web.HttpContext.Current.Request.MapPath("../") + table.Rows[0]["URL"].ToString()); instance = engineManager.createInstance(content, null, null); if (instanceStore == null) { instanceStore = new SqlWorkflowInstanceStore(SqlHelper.strconn); view = instanceStore.Execute(instanceStore.CreateInstanceHandle(), new CreateWorkflowOwnerCommand(), TimeSpan.FromSeconds(30)); instanceStore.DefaultInstanceOwner = view.InstanceOwner; } instance.InstanceStore = instanceStore; Guid guid = new Guid(dt.Rows[0]["FlowInstranceID"].ToString()); instance.Load(guid); //end if (this.DropDown_sp.SelectedValue == "true") { string[] s = dt.Rows[0]["OID"].ToString().Split(new char[] { ',' }); if (s[s.Length - 1] == "1") { Model.SelectRecord selectExecut = new Model.SelectRecord("WorkFlowExecution", "", "*", "where DID='" + id + "' and step ='" + dt.Rows[0]["WStep"].ToString() + "' and UID='" + this.Session["admin"].ToString() + "'"); DataTable executdt = BLL.SelectRecord.SelectRecordData(selectExecut).Tables[0]; if (executdt.Rows.Count > 0) { MessageBox.ShowAndRedirect(this, "该公文您已审核,请等待其他人审核!", "/document/DocumentList.aspx"); } else { Model.SelectRecord selectExecutCount = new Model.SelectRecord("WorkFlowExecution", "", "distinct UID", "where DID='" + id + "' and step ='" + dt.Rows[0]["WStep"].ToString() + "'"); DataTable dtcount = BLL.SelectRecord.SelectRecordData(selectExecutCount).Tables[0]; string where = "where IsState=2 AND (1=2 "; string[] str = dt.Rows[0]["OID"].ToString().Split(new char[] { ',' }); for (int j = 1; j < str.Length - 1; j++) { where += "OR OID like '%" + str[j].ToString() + "%' "; } where += ") order by id desc"; Model.SelectRecord selectUserCount = new Model.SelectRecord("Users", "", "ID", where); DataTable usercount = BLL.SelectRecord.SelectRecordData(selectUserCount).Tables[0]; if (dtcount.Rows.Count + 1 == usercount.Rows.Count) { if (instance.GetBookmarks().Count(p => p.BookmarkName == dt.Rows[0]["value"].ToString()) == 1) { instance.ResumeBookmark(dt.Rows[0]["value"].ToString(), this.DropDown_sp.SelectedValue.ToString()); } } } } else { //一旦审批未通过,删除该公文当前流转步骤信息 BLL.GeneralMethods.GeneralDelDB("WorkFlowExecution", "where DID ='" + id + "' and step='" + dt.Rows[0]["WStep"].ToString() + "'"); if (instance.GetBookmarks().Count(p => p.BookmarkName == dt.Rows[0]["value"].ToString()) == 1) { instance.ResumeBookmark(dt.Rows[0]["value"].ToString(), this.DropDown_sp.SelectedValue.ToString()); } } Model.WorkFlowExecution workexe = new Model.WorkFlowExecution { DID = dt.Rows[0]["ID"].ToString(), UID = this.Session["admin"].ToString(), step = dt.Rows[0]["WStep"].ToString(), Remark = this.txtSP.Value.Trim(), Result = "1", }; BLL.WorkFlowExecution.Add(workexe); } else { Model.WorkFlowExecution workexe = new Model.WorkFlowExecution { DID = dt.Rows[0]["ID"].ToString(), UID = this.Session["admin"].ToString(), step = dt.Rows[0]["WStep"].ToString(), Remark = this.txtSP.Value.Trim(), Result = "2", }; BLL.WorkFlowExecution.Add(workexe); if (instance.GetBookmarks().Count(p => p.BookmarkName == dt.Rows[0]["value"].ToString()) == 1) { instance.ResumeBookmark(dt.Rows[0]["value"].ToString(), this.DropDown_sp.SelectedValue.ToString()); } } UserOperatingManager.InputUserOperating(this.Session["admin"].ToString(), "公文管理", "公文审核" + dt.Rows[0]["Name"].ToString() + "的信息成功"); MessageBox.ShowAndRedirect(this, "审核公文成功!", "/document/DocumentList.aspx"); instance.Unload(); } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } if (base.Request.QueryString["id"] != null) { id = base.Request.QueryString["id"].ToString(); Model.SelectRecord selectRecord = new Model.SelectRecord("Document", "", "*", "where id='" + id + "'"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (table.Rows.Count > 0) { this.txtName.Text = table.Rows[0][1].ToString(); this.txtReMark.Value = table.Rows[0][3].ToString(); } Model.SelectRecord selectRecords = new Model.SelectRecord("WorkFlowRole", "", "*", "where WID='" + table.Rows[0]["WID"].ToString() + "' AND WStep < '" + table.Rows[0]["WStep"].ToString() + "' and WStep > 0 order by id desc"); DataTable tb = BLL.SelectRecord.SelectRecordData(selectRecords).Tables[0]; ListItem litrue = new ListItem("同意" , "true"); ListItem lifalse = new ListItem("不同意", "false"); this.DropDown_sp.Items.Add(litrue); this.DropDown_sp.Items.Add(lifalse); if (tb.Rows.Count > 0) { for (int i = 0; i < tb.Rows.Count; i++) { ListItem li = new ListItem("退回" + tb.Rows[i]["name"].ToString(), tb.Rows[i]["value"].ToString()); this.DropDown_sp.Items.Add(li); } } } else { MessageBox.Show(this, "请选择要审核的公文!"); base.Response.Redirect("/workflow/WorkFlowList.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } string where = "where State=1 AND (1=2 "; DataTable dt = BLL.Users.SelectForUserID(this.Session["admin"].ToString()).Tables[0]; string[] str = dt.Rows[0]["OID"].ToString().Split(new char[]{','}); for (int j = 0; j < str.Length; j++) { where += "OR OID like '%,"+str[j].ToString()+",%' "; } where += ") order by id desc"; Model.SelectRecord selectRecord = new Model.SelectRecord("view_AddDocument", "", "*", where); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (table.Rows.Count > 0) { for (int i = 0; i < table.Rows.Count; i++) { ListItem li = new ListItem(table.Rows[i][1].ToString(), table.Rows[i][0].ToString()); this.selWorkFlow.Items.Add(li); if (i == 0) { this.selWorkFlow.SelectedValue = table.Rows[0][0].ToString(); } } } else { MessageBox.ShowAndRedirect(this, "您不具有创建公文的权限", "/Index.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (this.Session["admin"] == null) { base.Response.Redirect("/account/Login.aspx"); } if (GeneralMethods.GetPermissions(HttpContext.Current.Request.Url.ToString(), this.Session["admin"].ToString())) { base.Response.Redirect("/Index.aspx"); } if (base.Request.QueryString["id"] != null) { id = base.Request.QueryString["id"].ToString(); Model.SelectRecord selectRecord = new Model.SelectRecord("WorkFlow", "", "*", "where id='"+id+"'"); DataTable table = BLL.SelectRecord.SelectRecordData(selectRecord).Tables[0]; if (table.Rows.Count > 0) { this.txtName.Value=table.Rows[0][1].ToString(); this.isState.Value=table.Rows[0][4].ToString(); this.txtReMark.Value=table.Rows[0][3].ToString(); this.uploadurl.Value = table.Rows[0][2].ToString(); } } else { MessageBox.Show(this, "请选择要编辑的工作流!"); base.Response.Redirect("/workflow/WorkFlowList.aspx"); } } }