//查询 protected void Button_Save_Click(object sender, EventArgs e) { string ls_return = ""; if (txtsql.Value == "") { ls_return = "请填写查询语句"; } if (ddldbconn.SelectedValue == "") { ls_return = "请选择连接"; } HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); DataTable dt = new DataTable(); if (ddldbconn.SelectedValue == "base") { dt = Hyoa_global.GetDataTable_BASE(txtsql.Value); } if (ddldbconn.SelectedValue == "pro") { dt = Hyoa_global.GetDataTable(txtsql.Value); } if (ddldbconn.SelectedValue == "user") { dt = Hyoa_global.GetDataTable_USER(txtsql.Value); } if (dt.Rows.Count > 0) { ls_return += "<table border=1 width='100%'>"; ls_return += "<tr>"; for (int j = 0; j < dt.Columns.Count; j++) { ls_return += "<td>" + dt.Columns[j].ToString() + "</td>"; } ls_return += "</tr>"; for (int i = 0; i < dt.Rows.Count; i++) { ls_return += "<tr>"; for (int j = 0; j < dt.Columns.Count; j++) { ls_return += "<td>"+dt.Rows[i][dt.Columns[j].ToString()].ToString()+"</td>"; } ls_return += "</tr>"; } ls_return += "</table>"; } lbljg.Text = ls_return; }
protected void Page_Load(object sender, EventArgs e) { if (this.Session["hyuid"].ToString() == "") this.Response.Redirect("../login.aspx"); if (!IsPostBack) { String lstableid = ""; String lsmid = ""; String lsstartdate = ""; String lsenddate = ""; string strSql = ""; if (this.Request.QueryString["strSql"] != null) { strSql = Request.QueryString["strSql"].ToString(); } if (this.Request.QueryString["tableid"] != null) { lstableid = Request.QueryString["tableid"].ToString(); } if (this.Request.QueryString["mid"] != null) { lsmid = Request.QueryString["mid"].ToString(); } if (this.Request.QueryString["startdate"] != null) { lsstartdate = Request.QueryString["startdate"].ToString(); } if (this.Request.QueryString["enddate"] != null) { lsenddate = Request.QueryString["enddate"].ToString(); } HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); //得到这个模块对应有哪些字段 //if (field_type == "文本" || field_type == "多行文本" || field_type == "文本加按钮" || field_type == "多行文本加按钮" || field_type == "日期" || field_type == "数值" || field_type == "对话框列表" || field_type == "复选框" || field_type == "单选框" || field_type == "口令" || field_type == "编辑器") String lssqlfield = "select * from hyt_flowfield where hy_tableid='" + lstableid + "' and hy_mudelid='" + lsmid + "' and hy_ifhiddle='否' and (hy_fieldtype='文本' or hy_fieldtype='多行文本' or hy_fieldtype='文本加按钮' or hy_fieldtype='多行文本加按钮' or hy_fieldtype='日期' or hy_fieldtype='数值' or hy_fieldtype='对话框列表' or hy_fieldtype='复选框' or hy_fieldtype='单选框' or hy_fieldtype='口令' or hy_fieldtype='编辑器') order by hy_sort"; //Response.Write(lssqlfield); //return; DataTable dtfield = Hyoa_global.GetDataTable_BASE(lssqlfield); String lsfieldid = ""; String lsfieldname = ""; String lsfieldidsub = ""; String lsfieldnamesub = ""; String lstableidsub = ""; String lsmudelidsub = ""; if (dtfield.Rows.Count > 0) { for (int i = 0; i < dtfield.Rows.Count; i++) { if (lsfieldid == "") { lsfieldid = "hyc_" + dtfield.Rows[i]["hy_fieldid"].ToString(); lsfieldname = dtfield.Rows[i]["hy_fieldname"].ToString(); } else { lsfieldid += "," + "hyc_" + dtfield.Rows[i]["hy_fieldid"].ToString(); lsfieldname += "," + dtfield.Rows[i]["hy_fieldname"].ToString(); } } } else { this.Response.Write("<script>alert('目录配置有问题,请联系管理员!');window.close();</script>"); return; } if (lsfieldid != "") { //判断当前表中是否有子表如果有的话,就将对应的表得到。只能输出一个子表,不考虑二个及以上的情况。 String lssqlsub = "select * from hyt_flowfield where hy_tableid='" + lstableid + "' and hy_mudelid='" + lsmid + "' and hy_fieldtype='IFRAME列表'"; DataTable dtsub = Hyoa_global.GetDataTable_BASE(lssqlsub); String ls_defaultvalue = ""; if (dtsub.Rows.Count > 0) { ls_defaultvalue = dtsub.Rows[0]["hy_defaultvalue"].ToString(); lstableidsub = ls_defaultvalue.Substring(ls_defaultvalue.IndexOf("tableid=") + 8, ls_defaultvalue.IndexOf("&listid=") - ls_defaultvalue.IndexOf("tableid=") - 8); lsmudelidsub = ls_defaultvalue.Substring(ls_defaultvalue.IndexOf("mid=") + 4, ls_defaultvalue.IndexOf("&tableid") - ls_defaultvalue.IndexOf("mid=") - 4); String lssqlsubfield = "select * from hyt_flowfield where hy_tableid='" + lstableidsub + "' and hy_mudelid='" + lsmudelidsub + "' order by hy_sort"; DataTable dtsubfield = Hyoa_global.GetDataTable_BASE(lssqlsubfield); for (int ii = 0; ii < dtsubfield.Rows.Count; ii++) { if (lsfieldidsub == "") { lsfieldidsub = "hyc_" + dtsubfield.Rows[ii]["hy_fieldid"].ToString(); lsfieldnamesub = dtsubfield.Rows[ii]["hy_fieldname"].ToString(); } else { lsfieldidsub += "," + "hyc_" + dtsubfield.Rows[ii]["hy_fieldid"].ToString(); lsfieldnamesub += "," + dtsubfield.Rows[ii]["hy_fieldname"].ToString(); } } } } //得到应用数据 String lssqldata = ""; lssqldata = "select " + lsfieldid + ",docid" + " from hyc_" + lstableid + " where 1=1 "; //if (Hyoa_global.isHaveRole("Roleldqx", this.Session["hyuid"].ToString())) //{ // //领导的话,条件就不用加了,可以导出所有记录 //} //else //{ // //部门负责人只能导出本部门的记录 // if (Hyoa_global.isHaveRole("Rolebmldqx", this.Session["hyuid"].ToString())) // { // lssqldata += " and hy_djrbmid='" + this.Session["hydeptid"].ToString() + "'"; // } // else // { // //一般能人只能导出自己的记录 // lssqldata += " and hy_djrid='" + this.Session["hyuid"].ToString() + "'"; // } //} if (lsstartdate != "") { lssqldata += " and CONVERT(varchar(10), hy_djsj, 120) >= '" + lsstartdate + "'"; } if (lsenddate != "") { lssqldata += " and CONVERT(varchar(10), hy_djsj, 120) <= '" + lsenddate + "'"; } lssqldata += "order by hy_djsj"; if (strSql != "") { lssqldata = strSql; } lsfieldid += ",DOCID"; if (lssqldata.Contains("*")) { lssqldata = lssqldata.Replace("*", lsfieldid); } if (lssqldata.Contains("top 20")) { lssqldata = lssqldata.Replace("top 20", lsfieldid); } DataTable dtdate = Hyoa_global.GetDataTable(lssqldata); String lsdisplay = ""; string[] lv_colname; string[] lv_colnamesub; lv_colnamesub = lsfieldnamesub.Split(','); lv_colname = lsfieldname.Split(','); if (dtdate.Rows.Count > 0) { lsdisplay += "<TR bgcolor=\"#ABBCEF\" class=\"style1\" id=\"row\">"; for (int m = 0; m < lv_colname.Length; m++) { lsdisplay += "<td align=center>" + lv_colname[m] + "</td>"; } for (int mm = 0; mm < lv_colnamesub.Length; mm++) { lsdisplay += "<td align=center>" + lv_colnamesub[mm] + "</td>"; } lsdisplay += "</tr>"; for (int j = 0; j < dtdate.Rows.Count; j++) { lsdisplay += "<TR bgcolor=\"#ABBCEF\" class=\"style1\" >"; for (int n = 0; n < lv_colname.Length; n++) { lsdisplay += "<td align=center>" + dtdate.Rows[j][n].ToString() + "</td>"; } //将主表数据后面的列补齐 for (int nnn = 0; nnn < lv_colnamesub.Length; nnn++) { lsdisplay += "<td align=center> </td>"; } //得到子表的数据并输出 String lssqloutsub = "select " + lsfieldidsub + " from hyc_" + lstableidsub + " where 1=1 and hy_motherid='" + dtdate.Rows[j]["docid"].ToString() + "'"; DataTable dtoutsub = Hyoa_global.GetDataTable(lssqloutsub); if (dtoutsub.Rows.Count > 0) { for (int liout = 0; liout < dtoutsub.Rows.Count; liout++) { lsdisplay += "<TR bgcolor=\"#ABBCEF\" class=\"style1\" >"; //输出主表中对应的空列 for (int n = 0; n < lv_colname.Length; n++) { lsdisplay += "<td align=center> </td>"; } //输出子表的数据 for (int lioutcol = 0; lioutcol < lv_colnamesub.Length; lioutcol++) { lsdisplay += "<td align=center>" + dtoutsub.Rows[liout][lioutcol].ToString() + "</td>"; } lsdisplay += "</tr>"; } } lsdisplay += "</tr>"; } } else { this.Response.Write("<script>alert('暂无数据!');window.close();</script>"); return; } this.lbldisplay.Text = lsdisplay; } }
//合同办理状态 完成 protected void btn_wc_Click(object sender, EventArgs e) { HyoaClass.Hyoa_global db = new HyoaClass.Hyoa_global(); string sql = ""; DataTable dt = new DataTable(); sql = "update hyt_blzt set hy_state='已完成' where DOCID='" + this.txtdocid.Value + "'"; db.ExcuteSQL(sql); string sqlSelect = " select * from hyt_listconfig where hy_mudelid='" + this.hy_mudelid.Text + "' and hy_tableid='" + this.hy_tableid.Text + "' "; dt.Clear(); dt = db.GetDataTable_BASE(sqlSelect); string url = ""; if (dt.Rows.Count > 0) { url = "list_flc.aspx?mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&listid=" + dt.Rows[0]["id"].ToString() + "&rnd=" + System.Guid.NewGuid().ToString(); Response.Write("<script>alert('已完成');window.location='" + this.txturl.Value + "'</script>"); } }
public string Gethy_field(string ls_num) { string ls_return = ""; string ls_show = ""; //这个区域的内容 string ls_temp = ""; string lstitle = ""; string ls_url = ""; string ls_sql = ""; HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel(); HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); //得到待办事宜 if (ls_num == "1") { ls_show = "待办事宜"; //这个区域的内容 HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy(); DataTable dt = Hyoa_dbsy.Getdbsys_dbanddy(this.Session["hyuid"].ToString()); int i = 5; //显示条数 if (dt.Rows.Count < i) i = dt.Rows.Count; for (int j = 0; j < i; j++) { string ls_mudelid = dt.Rows[j]["hy_mudelid"].ToString(); string ls_mudelname = ""; DataTable dt_getmudel = Hyoa_mudel.Getmudel(ls_mudelid); if (dt_getmudel.Rows.Count > 0) ls_mudelname = dt_getmudel.Rows[0]["hy_mudelname"].ToString(); lstitle = "[" + ls_mudelname + "]" + dt.Rows[j]["hy_subbt"].ToString() + "-" + dt.Rows[j]["hy_bt"].ToString(); if (lstitle.Length > 20) lstitle = lstitle.Substring(0, 20) + "..."; ls_url = "ggdy/Hy_DbToYb.aspx?id=" + dt.Rows[j]["ID"].ToString() + "&pop=1&rnd=" + System.Guid.NewGuid().ToString(); ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"72%\"> <a title=\"" + "[" + ls_mudelname + "]" + dt.Rows[j]["hy_subbt"].ToString() + "-" + dt.Rows[j]["hy_bt"].ToString() + "\" onclick=\"window.open('" + ls_url + "')\" href=\"javascript:\"><b>" + lstitle + "</b></a></td>"; ls_temp += "<td width=\"28%\" align=\"right\">"; ls_temp += "<font color=\"#056ea5\">" + System.DateTime.Parse(dt.Rows[j]["hy_createtime"].ToString()).ToShortDateString().ToString() + "</font> </td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; } if (ls_temp == "") { ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"100%\"> 暂无记录!</td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; } ls_return += "<div style=\"position: relative; padding-bottom: 0px\" id=\"module_1\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"height: 160px;border-bottom: 1px solid #cccccc\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td height=\"25\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td style=\"cursor: move; color: #262d33; font-weight: bold\" id=\"module_1_head\" class=\"Navigation\" width=\"72%\"> <img align=\"absMiddle\" src=\"hyhtml/images/ico/FUNC20029.gif\"> " + ls_show + "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += ls_temp; ls_return += "<tr>"; ls_return += "<td height=\"22\" align=\"right\">"; ls_return += "<a href=\"#\" onclick=\"window.open('system/list_dbsy.aspx')\"><font color=\"red\">"; ls_return += " 更多>>..</font></a>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "<tr>"; ls_return += "<td>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</div>"; ls_return += "<div>"; ls_return += "</div>"; } //得到电子邮件 if (ls_num == "2") { ls_show = "最新客户"; //这个区域的内容 ls_sql = "select * from hyc_Tablekhda order by hy_djsj desc "; DataTable dt = Hyoa_global.GetDataTable(ls_sql); int i = 5; //显示条数 if (dt.Rows.Count < i) i = dt.Rows.Count; for (int j = 0; j < i; j++) { lstitle = dt.Rows[j]["hyc_dwmc"].ToString(); if (lstitle.Length > 20) lstitle = lstitle.Substring(0, 20) + "..."; ls_url = "main_look.aspx?op=modify&mid=Mudelkhda&tableid=Tablekhda&pop=1&docid=" + dt.Rows[j]["DOCID"].ToString(); ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"72%\"> <a title=\"" + lstitle + "\" onclick=\"window.open('" + ls_url + "&rnd='+Math.random())\" href=\"javascript:\">· " + lstitle + "</a></td>"; ls_temp += "<td width=\"28%\" align=\"right\"></td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; } if (ls_temp == "") { ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"100%\"> 暂无记录!</td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; } ls_return += "<div style=\"position: relative; padding-bottom: 0px\" id=\"module_2\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"height: 160px;border-bottom: 1px solid #cccccc\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td height=\"25\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td style=\"cursor: move; color: #262d33; font-weight: bold\" id=\"module_2_head\" class=\"Navigation\" width=\"72%\"> <img align=\"absMiddle\" src=\"hyhtml/images/ico/FUNC20029.gif\"> " + ls_show + "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += ls_temp; ls_return += "<tr>"; ls_return += "<td height=\"22\" align=\"right\">"; ls_return += "<a href=\"#\" onclick=\"window.open('list_flc.aspx?mid=Mudelkhda&tableid=Tablekhda&listid=d3044ced-8273-4e7a-83b2-870580dde7a1&rnd='+Math.random())\"><font color=\"red\">"; ls_return += " 更多>>..</font></a>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "<tr>"; ls_return += "<td>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</div>"; ls_return += "<div>"; ls_return += "</div>"; } //得到日程安排 if (ls_num == "3") { ls_show = "最新客户故障"; //这个区域的内容 ls_sql = "select * from hyc_Tablekhgzdj where hy_djrid='" + Session["hyuid"].ToString() + "' order by hy_djsj desc "; DataTable dt = Hyoa_global.GetDataTable(ls_sql); int i = 5; //显示条数 if (dt.Rows.Count < i) i = dt.Rows.Count; for (int j = 0; j < i; j++) { lstitle = dt.Rows[j]["hyc_dwmc"].ToString(); if (lstitle.Length > 20) lstitle = lstitle.Substring(0, 20) + "..."; ls_url = "main_look.aspx?op=modify&mid=Mudelkhda&tableid=Tablekhgzdj&pop=1&docid=" + dt.Rows[j]["DOCID"].ToString(); ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"72%\"> <a title=\"" + dt.Rows[j]["hyc_dwmc"].ToString() + "\" onclick=\"window.open('" + ls_url + "&rnd='+Math.random())\" href=\"javascript:\">" + lstitle + "</a></td>"; ls_temp += "<td width=\"28%\" align=\"right\">"; ls_temp += "<font color=\"#056ea5\">" + System.DateTime.Parse(dt.Rows[j]["hy_djsj"].ToString()).ToShortDateString().ToString() + "</font> </td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; } if (ls_temp == "") { ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"100%\"> 暂无记录!</td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; } ls_return += "<div style=\"position: relative; padding-bottom: 0px\" id=\"module_3\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"height: 160px;border-bottom: 1px solid #cccccc\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td height=\"25\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td style=\"cursor: move; color: #262d33; font-weight: bold\" id=\"module_3_head\" class=\"Navigation\" width=\"72%\"> <img align=\"absMiddle\" src=\"hyhtml/images/ico/FUNC20029.gif\"> " + ls_show + "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += ls_temp; ls_return += "<tr>"; ls_return += "<td height=\"22\" align=\"right\">"; ls_return += "<a href=\"#\" onclick=\"window.open('list_flc.aspx?mid=Mudelkhda&tableid=Tablekhgzdj&listid=afbdf289-c511-4b91-a2c7-bdb4d510ca78&rnd='+Math.random())\"><font color=\"red\">"; ls_return += " 更多>>..</font></a>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "<tr>"; ls_return += "<td>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</div>"; ls_return += "<div>"; ls_return += "</div>"; } //得到通知公告 if (ls_num == "4") { ls_show = "最新合同"; //这个区域的内容 Dictionary<string, DateTime> dic = new Dictionary<string, DateTime>(); string sqlSelect = ""; //合同表单id string[] arryStr = new string[] { "Tablesyyhfwxy", "Tablejdhazfwht", "TableVODfwxy", "Tableffpdfwht", "TableDVBazfwdght", "Tablejwdsjsxy", "Tablejwdscsxy", "Tablekdjrht", "Tablesjcsfwht", "Tablesjgdcsfwht", "Tablesjtxyyhzxy", "Tablezdyht" }; //将所有表单的登记时间和DOCID Tableid放入集合中 for (int i = 0; i < arryStr.Length; i++) { sqlSelect = " select docid,hy_djsj from hyc_" + arryStr[i] + " order by hy_djsj desc "; DataTable dt = Hyoa_global.GetDataTable(sqlSelect); //获取每个表单一个的表单id 表名 和登记时间 if (dt.Rows.Count > 0) { dic.Add(dt.Rows[0]["docid"].ToString() + "#" + arryStr[i], Convert.ToDateTime(dt.Rows[0]["hy_djsj"].ToString())); } } //开始对登记时间进行排序 string[] arrayName = new string[dic.Count]; DateTime[] arrayValue = new DateTime[dic.Count]; dic.Keys.CopyTo(arrayName, 0); dic.Values.CopyTo(arrayValue, 0); //会根据arrayValue的值进行升序排序,arrayName对应的会进行位置调整 Array.Sort(arrayValue, arrayName); //降序 Array.Reverse(arrayValue); Array.Reverse(arrayName); //重新将值放到新的集合中 IDictionary<string, DateTime> dicSorted = new Dictionary<string, DateTime>(); for (int i = 0; i < arrayName.Length; i++) { dicSorted.Add(arrayName[i], dic[arrayName[i]]); } //定义一个数组 通过循环 将key放入数组中 string[] Docid = new string[dicSorted.Count]; int j = 0; foreach (string lsDocid in dicSorted.Keys) { Docid[j] = lsDocid; j++; } //取集合前六个的值 通过数组中存储的key对集合进行删除操作 if (Docid.Length > 5) { for (int i = 5; i < Docid.Length; i++) { dicSorted.Remove(Docid[i]); } } //对集合前六个合同进行数据加工 输出到前台 foreach (string lsDocid in dicSorted.Keys) { string lsTitle = ""; string[] lsData = lsDocid.Split('#'); sqlSelect = " select * from hyc_" + lsData[1] + " where docid ='" + lsData[0] + "' "; DataTable dt = Hyoa_global.GetDataTable(sqlSelect); sqlSelect = " select hy_name from hyt_tableconfig where id='" + lsData[1] + "' "; DataTable dt2 = Hyoa_global.GetDataTable_BASE(sqlSelect); if (dt.Rows.Count > 0 && dt2.Rows.Count > 0) { lsTitle = "[" + dt2.Rows[0]["hy_name"].ToString() + "]-" + dt.Rows[0]["hyc_jfmc"].ToString(); if (lsTitle.Length > 20) lsTitle = lsTitle.Substring(0, 20) + "..."; ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"72%\"> <a href=\"#\" onclick=\" var path='main_look.aspx?op=modify&mid=" + dt.Rows[0]["hy_mudelid"].ToString() + "&tableid=" + dt.Rows[0]["hy_tableid"].ToString() + "&docid=" + dt.Rows[0]["docid"].ToString() + " ';window.open(path) \" >·" + lsTitle + "</a></td>"; ls_temp += "<td width=\"28%\" align=\"right\">"; ls_temp += "<font color=\"#056ea5\">" + System.DateTime.Parse(dt.Rows[0]["hy_djsj"].ToString()).ToShortDateString().ToString() + "</font> </td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; } } if (ls_temp == "") { ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"100%\"> 暂无记录!</td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; } ls_return += "<div style=\"position: relative; padding-bottom: 0px\" id=\"module_4\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"height: 160px;border-bottom: 1px solid #cccccc\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td height=\"25\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td style=\"cursor: move; color: #262d33; font-weight: bold\" id=\"module_4_head\" class=\"Navigation\" width=\"72%\"> <img align=\"absMiddle\" src=\"hyhtml/images/ico/FUNC20029.gif\"> " + ls_show + "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += ls_temp; ls_return += "<tr>"; ls_return += "<td height=\"22\" align=\"right\">"; //ls_return += "<a href=\"#\" onclick=\"window.open('list_fl.aspx?key=%u5DF2%u53D1%u5E03&mid=Mudeltzgg&tableid=Tabletzgg&listid=fe10af45-e302-4e56-911e-e73fae37cf5a&rnd=c70a7237-f92f-4d9d-8bd3-e343efba54e3&rnd='+Math.random())\"><font color=\"red\">"; //ls_return += " 更多>>..</font></a>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "<tr>"; ls_return += "<td>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</div>"; ls_return += "<div>"; ls_return += "</div>"; } //得到会议动态 if (ls_num == "5") { ls_show = "即将过期合同"; //这个区域的内容 int j = 0; string sqlSelect = ""; //合同表单id string[] arryStr = new string[] { "Tablesyyhfwxy", "Tablejdhazfwht", "TableVODfwxy", "Tableffpdfwht", "TableDVBazfwdght", "Tablejwdsjsxy", "Tablejwdscsxy", "Tablekdjrht", "Tablesjcsfwht", "Tablesjgdcsfwht", "Tablesjtxyyhzxy" }; for (int i = 0; i < arryStr.Length; i++) { sqlSelect = " select * from hyc_" + arryStr[i] + " "; DataTable dt = Hyoa_global.GetDataTable(sqlSelect); string lsTitle = ""; if (dt.Rows.Count > 0) { if (dt.Rows[0]["hyc_htzzsj"].ToString() != "") { if ((Convert.ToDateTime(dt.Rows[0]["hyc_htzzsj"].ToString()).AddDays(-5) >= Convert.ToDateTime(DateTime.Now))) { sqlSelect = " select hy_name from hyt_tableconfig where id='" + arryStr[i] + "' "; DataTable dt2 = Hyoa_global.GetDataTable_BASE(sqlSelect); if (dt2.Rows.Count > 0) { lsTitle = "[" + dt2.Rows[0]["hy_name"].ToString() + "]-" + dt.Rows[0]["hyc_jfmc"].ToString(); if (lsTitle.Length > 20) lsTitle = lsTitle.Substring(0, 20) + "..."; ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"72%\"> <a href=\"#\" onclick=\" var path='main_look.aspx?op=modify&mid=" + dt.Rows[0]["hy_mudelid"].ToString() + "&tableid=" + dt.Rows[0]["hy_tableid"].ToString() + "&docid=" + dt.Rows[0]["docid"].ToString() + " ';window.open(path) \" >·" + lsTitle + "</a></td>"; ls_temp += "<td width=\"28%\" align=\"right\">"; ls_temp += "<font color=\"#056ea5\">" + System.DateTime.Parse(dt.Rows[0]["hy_djsj"].ToString()).ToShortDateString().ToString() + "</font> </td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; j++; } } } } if (j == 5) { break; } } if (ls_temp == "") { ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"100%\"> 暂无记录!</td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; } ls_return += "<div style=\"position: relative; padding-bottom: 0px\" id=\"module_5\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"height: 160px;border-bottom: 1px solid #cccccc\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td height=\"25\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td style=\"cursor: move; color: #262d33; font-weight: bold\" id=\"module_5_head\" class=\"Navigation\" width=\"72%\"> <img align=\"absMiddle\" src=\"hyhtml/images/ico/FUNC20029.gif\"> " + ls_show + "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += ls_temp; ls_return += "<tr>"; ls_return += "<td height=\"22\" align=\"right\">"; //ls_return += "<a href=\"#\" onclick=\"window.open('list.aspx?mid=Mudelhydt&tableid=Tablehydt&listid=72aeaf0e-5387-46c1-a329-654147c634f0&rnd='+Math.random())\"><font color=\"red\">"; //ls_return += " 更多>>..</font></a>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "<tr>"; ls_return += "<td>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</div>"; ls_return += "<div>"; ls_return += "</div>"; } //得到公文库 if (ls_num == "6") { ls_show = "已过期合同"; //这个区域的内容 string sqlSelect = ""; int j = 0; //合同表单id string[] arryStr = new string[] { "Tablesyyhfwxy", "Tablejdhazfwht", "TableVODfwxy", "Tableffpdfwht", "TableDVBazfwdght", "Tablejwdsjsxy", "Tablejwdscsxy", "Tablekdjrht", "Tablesjcsfwht", "Tablesjgdcsfwht", "Tablesjtxyyhzxy" }; for (int i = 0; i < arryStr.Length; i++) { sqlSelect = " select * from hyc_" + arryStr[i] + " order by hyc_htzzsj desc "; DataTable dt = Hyoa_global.GetDataTable(sqlSelect); string lsTitle = ""; if (dt.Rows.Count > 0) { if (dt.Rows[0]["hyc_htzzsj"].ToString() != "") { if ((Convert.ToDateTime(dt.Rows[0]["hyc_htzzsj"].ToString()) < Convert.ToDateTime(DateTime.Now))) { sqlSelect = " select hy_name from hyt_tableconfig where id='" + arryStr[i] + "' "; DataTable dt2 = Hyoa_global.GetDataTable_BASE(sqlSelect); if (dt2.Rows.Count > 0) { lsTitle = "[" + dt2.Rows[0]["hy_name"].ToString() + "]-" + dt.Rows[0]["hyc_jfmc"].ToString(); if (lsTitle.Length > 20) lsTitle = lsTitle.Substring(0, 20) + "..."; ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"72%\"> <a href=\"#\" onclick=\" var path='main_look.aspx?op=modify&mid=" + dt.Rows[0]["hy_mudelid"].ToString() + "&tableid=" + dt.Rows[0]["hy_tableid"].ToString() + "&docid=" + dt.Rows[0]["docid"].ToString() + " ';window.open(path) \" >·" + lsTitle + "</a></td>"; ls_temp += "<td width=\"28%\" align=\"right\">"; ls_temp += "<font color=\"#056ea5\">" + Convert.ToDateTime(dt.Rows[0]["hy_djsj"].ToString()).ToString("yyyy/MM/dd") + "</font> </td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; j++; } } } } if (j == 5) { break; } } if (ls_temp == "") { ls_temp += "<tr>"; ls_temp += "<td height=\"22\" background=\"hyhtml/desk/line.gif\">"; ls_temp += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_temp += "<tbody>"; ls_temp += "<tr>"; ls_temp += "<td width=\"100%\"> 暂无记录!</td>"; ls_temp += "</tr>"; ls_temp += "</tbody>"; ls_temp += "</table>"; ls_temp += "</td>"; ls_temp += "</tr>"; } ls_return += "<div style=\"position: relative; padding-bottom: 0px\" id=\"module_6\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"height: 160px;border-bottom: 1px solid #cccccc\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td height=\"25\">"; ls_return += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"; ls_return += "<tbody>"; ls_return += "<tr>"; ls_return += "<td style=\"cursor: move; color: #262d33; font-weight: bold\" id=\"module_6_head\" class=\"Navigation\" width=\"72%\"> <img align=\"absMiddle\" src=\"hyhtml/images/ico/FUNC20029.gif\"> " + ls_show + "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += ls_temp; ls_return += "<tr>"; ls_return += "<td height=\"22\" align=\"right\">"; //ls_return += "<a href=\"#\" onclick=\"window.open('gwk/index.aspx?rnd='+Math.random())\"><font color=\"red\">"; //ls_return += " 更多>>..</font></a>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "<tr>"; ls_return += "<td>"; ls_return += "</td>"; ls_return += "</tr>"; ls_return += "</tbody>"; ls_return += "</table>"; ls_return += "</div>"; ls_return += "<div>"; ls_return += "</div>"; } return ls_return; }
//合同办理状态 完成 protected void btn_wc_Click(object sender, EventArgs e) { bool flag = false; HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); string sqlUpdate = ""; DataTable dt = new DataTable(); //将该文档至为已完成 sqlUpdate = "update hyc_" + this.hy_tableid.Text + " set hy_ifconfirm='1' where docid ='" + this.txtdocid.Value + "'"; flag = Hyoa_global.ExcuteSQL(sqlUpdate); //写已完成记录 sqlUpdate = "update hyt_blzt set hy_state='已完成' where DOCID='" + this.txtdocid.Value + "'"; if (flag) { flag = Hyoa_global.ExcuteSQL(sqlUpdate); } //依据模块id和表单id 得到listid string sqlSelect = " select * from hyt_listconfig where hy_mudelid='" + this.hy_mudelid.Text + "' and hy_tableid='" + this.hy_tableid.Text + "' "; dt.Clear(); dt = Hyoa_global.GetDataTable_BASE(sqlSelect); string url = ""; if (dt.Rows.Count > 0) { if (flag) { url = "list_flc.aspx?mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&listid=" + dt.Rows[0]["id"].ToString() + "&rnd=" + System.Guid.NewGuid().ToString(); Response.Write("<script>alert('已完成');window.location='" + url + "'</script>"); } else { url = "list_flc.aspx?mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&listid=" + dt.Rows[0]["id"].ToString() + "&rnd=" + System.Guid.NewGuid().ToString(); Response.Write("<script>alert('对不起,文档完成失败,请联系管理员!');window.location='" + url + "'</script>"); } } }
private void DataPlay() { //label清空 int count = 1; string[] lsTableId = new string[] { "Tablesyyhfwxy", "Tablejdhazfwht", "TableVODfwxy", "Tableffpdfwht", "TableDVBazfwdght", "Tablejwdsjsxy", "Tablejwdscsxy", "Tablekdjrht", "Tablesjcsfwht", "Tablesjgdcsfwht", "Tablesjtxyyhzxy" }; for (int i = 0; i < lsTableId.Length; i++) { string sqlSelect = " select * from hyc_" + lsTableId[i] + " where 1=1 "; if (this.txt_tjz_s.Value != "") { sqlSelect += " and hy_djsj >= '" + this.txt_tjz_s.Value + "' "; } if (this.txt_tjz_e.Value != "") { sqlSelect += " and hy_djsj <='" + this.txt_tjz_e.Value + "' "; } sqlSelect += " order by hy_djsj desc "; HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); DataTable dt = Hyoa_global.GetDataTable(sqlSelect); if (dt.Rows.Count > 0) { for (int j = 0; j < dt.Rows.Count; j++) { sqlSelect = " select * from hyc_Tablefpbd where hyc_fptt='" + dt.Rows[j]["hyc_jfmc"].ToString() + "' "; if (this.txt_tjz_s.Value != "") { sqlSelect += " and hy_djsj >= '" + this.txt_tjz_s.Value + "' "; } if (this.txt_tjz_e.Value != "") { sqlSelect += " and hy_djsj <='" + this.txt_tjz_e.Value + "' "; } DataTable dt2 = Hyoa_global.GetDataTable(sqlSelect); sqlSelect = " select hy_name from hyt_tableconfig where id='" + lsTableId[i] + "' "; DataTable dt3 = Hyoa_global.GetDataTable_BASE(sqlSelect); strShow.Append("<tr onmouseover=\"this.className='tr-over'\" onmouseout=\"this.className='TrList'\" class=\"TrList\">"); strShow.Append("<td width=\"5%\" class=\"TdcellHead\"><p align=\"center\">" + count + "</p></td>"); if (dt3.Rows.Count > 0) { strShow.Append("<td width=\"25%\" class=\"TdcellHead\"><p align=\"center\">" + dt3.Rows[0]["hy_name"].ToString() + "</p></td>"); } else { strShow.Append("<td width=\"25%\" class=\"TdcellHead\"><p align=\"center\"></p></td>"); } strShow.Append("<td width=\"30%\" class=\"TdcellHead\"><p align=\"center\">" + dt.Rows[j]["hyc_jfmc"].ToString() + "</p></td>"); strShow.Append("<td width=\"10%\" class=\"TdcellHead\"><p align=\"center\">" + dt.Rows[j]["hyc_htje"].ToString() + "</p></td>"); if (dt.Rows[j]["hyc_htje"].ToString() !="") { htjeTotal += Convert.ToDouble(dt.Rows[j]["hyc_htje"].ToString()); } strShow.Append("</tr>"); count++; } } } strShow.Append("<tr onmouseover=\"this.className='tr-over'\" onmouseout=\"this.className='TrList'\" class=\"TrList\">"); strShow.Append("<td width=\"5%\" class=\"TdcellHead\"><p align=\"center\">合计</p></td>"); strShow.Append("<td width=\"25%\" class=\"TdcellHead\"><p align=\"center\">"+(count-1)+"个合同</p></td>"); strShow.Append("<td width=\"30%\" class=\"TdcellHead\"><p align=\"center\"></p></td>"); strShow.Append("<td width=\"10%\" class=\"TdcellHead\"><p align=\"left\">合同金额合计:" + htjeTotal + "</p></td></tr>"); this.lb_show.Text += strShow.ToString(); }
//////////置为文档已读状态 ////////private void UpdateReadFlag() ////////{ //////// HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain(); //////// Hyoa_flowmain.UpdateReadFlag(this.txtdocid.Value, Session["hyuid"].ToString()); ////////} //保存 protected void Button_Save_Click(object sender, EventArgs e) { if (this.Session["hyuid"].ToString() == "") this.Response.Redirect("../login.aspx"); string ls_tip = "保存成功!"; //新文档时 //新建时先进行一次保存 HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); //HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain(); if (this.txtop.Value == "add") { //Hyoa_flowmain.DOCID = this.txtdocid.Value; //Hyoa_flowmain.hy_mudelid = this.hy_mudelid.Text; //Hyoa_flowmain.hy_tableid = this.hy_tableid.Text; //Hyoa_flowmain.hy_flowid = this.hy_flowid.Text; //Hyoa_flowmain.hy_flowname = this.hy_flowname.Text; //Hyoa_flowmain.hy_curtacheid = this.hy_curtacheid.Text; //Hyoa_flowmain.hy_curtachename = this.hy_curtachename.Text; //Hyoa_flowmain.hy_curclrid = this.hy_curclrid.Text; //Hyoa_flowmain.hy_curclrname = this.hy_curclrname.Text; //Hyoa_flowmain.hy_djrid = this.hy_djrid.Text; //Hyoa_flowmain.hy_djrname = this.hy_djrname.Text; //Hyoa_flowmain.hy_djrbmid = this.hy_djrbmid.Text; //Hyoa_flowmain.hy_djrbmname = this.hy_djrbmname.Text; //Hyoa_flowmain.hy_djsj = this.hy_djsj.Text; //Hyoa_flowmain.hy_bt = this.hy_bt.Text; //Hyoa_flowmain.hy_iftx = this.hy_iftx.Text; //Hyoa_flowmain.hy_zhtxsj = this.hy_zhtxsj.Text; //Hyoa_flowmain.hy_readuserlist = this.hy_readuserlist.Text; //Hyoa_flowmain.Insert(); //动态插入数据 //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); string lssqlfield = "SELECT * FROM hyt_flowfield WHERE (hy_tableid = 'Tabledcxt') AND (hy_mudelid = 'Mudeldcxt')"; DataTable dtfield = Hyoa_global.GetDataTable_BASE(lssqlfield); //得到所有配置域 string lssqlinsert = ""; string lssqlinsert1 = ""; string lssqlinsert2 = ""; string lssqlinsert3 = ""; string lssqlinsert4 = ""; string lssqlinsert5 = ""; lssqlinsert1 = "insert into hyc_" + this.hy_tableid.Text + "("; lssqlinsert2 = "DOCID,hy_mudelid,hy_tableid,hy_flowid,hy_flowname,hy_curtacheid,hy_curtachename,hy_curclrid,hy_curclrname,hy_djrid,hy_djrname,hy_djrbmid,hy_djrbmname,hy_djsj,hy_bt,hy_iftx,hy_zhtxsj,hy_readuserlist"; lssqlinsert3 = ") values ("; lssqlinsert4 = "'" + this.txtdocid.Value + "'"; lssqlinsert4 += ",'" + this.hy_mudelid.Text + "'"; lssqlinsert4 += ",'" + this.hy_tableid.Text + "'"; lssqlinsert4 += ",'" + this.hy_flowid.Text + "'"; lssqlinsert4 += ",'" + this.hy_flowname.Text + "'"; lssqlinsert4 += ",'" + this.hy_curtacheid.Text + "'"; lssqlinsert4 += ",'" + this.hy_curtachename.Text + "'"; lssqlinsert4 += ",'" + this.hy_curclrid.Text + "'"; lssqlinsert4 += ",'" + this.hy_curclrname.Text + "'"; lssqlinsert4 += ",'" + this.hy_djrid.Text + "'"; lssqlinsert4 += ",'" + this.hy_djrname.Text + "'"; lssqlinsert4 += ",'" + this.hy_djrbmid.Text + "'"; lssqlinsert4 += ",'" + this.hy_djrbmname.Text + "'"; if (Session["conntype"].ToString() == "SQL") { lssqlinsert4 += ",'"+this.hy_djsj.Text + "'"; } if (Session["conntype"].ToString() == "ORACLE") { lssqlinsert4 += ",to_date('" + this.hy_djsj.Text + "','YYYY-MM-DD HH24:MI:SS')"; } lssqlinsert4 += ",'" + this.hy_bt.Text + "'"; lssqlinsert4 += ",'" + this.hy_iftx.Text + "'"; lssqlinsert4 += ",'" + this.hy_zhtxsj.Text + "'"; lssqlinsert4 += ",'" + this.hy_readuserlist.Text+"'"; lssqlinsert5 = ")"; for (int ii = 0; ii < dtfield.Rows.Count; ii++) { lssqlinsert2 += "," + "hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString(); if (dtfield.Rows[ii]["hy_fieldtype"].ToString() == "文本" || dtfield.Rows[ii]["hy_fieldtype"].ToString() == "多行文本") { TextBox txt1 = (TextBox)this.FindControl("txthyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()); lssqlinsert4 += ",'" + txt1.Text + "'"; } if (dtfield.Rows[ii]["hy_fieldtype"].ToString() == "日期") { TextBox txt1 = (TextBox)this.FindControl("txthyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()); if (Session["conntype"].ToString() == "SQL") { lssqlinsert4 += ",'" + txt1.Text + "'"; } if (Session["conntype"].ToString() == "ORACLE") { lssqlinsert4 += ",to_date('" + txt1.Text + "','YYYY-MM-DD HH24:MI:SS')"; } } if (dtfield.Rows[ii]["hy_fieldtype"].ToString() == "对话框列表") { DropDownList ddl1 = (DropDownList)this.FindControl("txthyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()); lssqlinsert4 += ",'" + ddl1.SelectedValue + "'"; } } lssqlinsert = lssqlinsert1 + lssqlinsert2 + lssqlinsert3 + lssqlinsert4 + lssqlinsert5; //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); //Response.Write(lssqlinsert); Hyoa_global.ExcuteSQL(lssqlinsert); //插入历史处理表 HyoaClass.Hyoa_global Hyoa_global_add = new HyoaClass.Hyoa_global(); Hyoa_global_add.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.hy_curtacheid.Text, this.hy_curtachename.Text, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "", "", "", this.hy_djsj.Text, ""); } //更新内容 //Hyoa_flowmain.DOCID = this.txtdocid.Value; //Hyoa_flowmain.hy_curtacheid = this.hy_curtacheid.Text; //Hyoa_flowmain.hy_curtachename = this.hy_curtachename.Text; //Hyoa_flowmain.hy_curclrid = this.hy_curclrid.Text; //Hyoa_flowmain.hy_curclrname = this.hy_curclrname.Text; //Hyoa_flowmain.hy_bt = this.hy_bt.Text; //Hyoa_flowmain.hy_iftx = this.hy_iftx.Text; //Hyoa_flowmain.hy_zhtxsj = this.hy_zhtxsj.Text; //Hyoa_flowmain.hy_readuserlist = this.hy_readuserlist.Text; string lssqlfield2 = "SELECT * FROM hyt_flowfield WHERE (hy_tableid = 'Tabledcxt') AND (hy_mudelid = 'Mudeldcxt')"; DataTable dtfield2 = Hyoa_global.GetDataTable_BASE(lssqlfield2); //得到所有配置域 string lssqlupdate1 = "update hyc_" + this.hy_tableid.Text + " set hy_curtacheid = '" + this.hy_curtacheid.Text + "'"; lssqlupdate1 += ",hy_curtachename='" + this.hy_curtachename.Text + "'"; lssqlupdate1 += ",hy_curclrid='" + this.hy_curclrid.Text + "'"; lssqlupdate1 += ",hy_curclrname='" + this.hy_curclrname.Text + "'"; lssqlupdate1 += ",hy_bt='" + this.hy_bt.Text + "'"; for (int ii = 0; ii < dtfield2.Rows.Count; ii++) { if (dtfield2.Rows[ii]["hy_fieldtype"].ToString() == "文本" || dtfield2.Rows[ii]["hy_fieldtype"].ToString() == "多行文本" || dtfield2.Rows[ii]["hy_fieldtype"].ToString() == "日期") { TextBox txt1 = (TextBox)this.FindControl("txthyc_" + dtfield2.Rows[ii]["hy_fieldid"].ToString()); lssqlupdate1 += ",hyc_" + dtfield2.Rows[ii]["hy_fieldid"].ToString() + "='" + txt1.Text + "'"; } if (dtfield2.Rows[ii]["hy_fieldtype"].ToString() == "对话框列表") { DropDownList ddl1 = (DropDownList)this.FindControl("txthyc_" + dtfield2.Rows[ii]["hy_fieldid"].ToString()); lssqlupdate1 += ",hyc_" + dtfield2.Rows[ii]["hy_fieldid"].ToString() + "='" + ddl1.SelectedValue + "'"; } } lssqlupdate1 += " where DOCID='" + this.txtdocid.Value + "'"; Hyoa_global.ExcuteSQL(lssqlupdate1); //更新hy_bt字段 string sql_updatebt = ""; if (Session["conntype"].ToString() == "SQL") { sql_updatebt = "update hyc_" + this.hy_tableid.Text + " set hy_bt = '['+hyc_nf+']'+hyc_bh+'号' where DOCID='" + this.txtdocid.Value + "'"; } if (Session["conntype"].ToString() == "ORACLE") { sql_updatebt = "update hyc_" + this.hy_tableid.Text + " set hy_bt = CONCAT(CONCAT(CONCAT(CONCAT('[',hyc_nf),']'),hyc_bh),'号') where DOCID='" + this.txtdocid.Value + "'"; } Hyoa_global.ExcuteSQL(sql_updatebt); sql_updatebt = "select * from hyc_" + this.hy_tableid.Text + " where DOCID='" + this.txtdocid.Value + "' "; DataTable dt_updatebt = Hyoa_global.GetDataTable(sql_updatebt); if (dt_updatebt.Rows.Count > 0) this.hy_bt.Text = dt_updatebt.Rows[0]["hy_bt"].ToString(); //保存 if (this.txtwhichoperation.Value == "1") { hylcbctscl();//特殊处理 } //提交 if (this.txtwhichoperation.Value == "2") { //更新主文档 lssqlupdate1 = "update hyc_" + this.hy_tableid.Text +" set hy_curtacheid='" + this.txtnexttacheid.Value + "'"; lssqlupdate1 += ",hy_curtachename='" + this.txtnexttachename.Value + "'"; lssqlupdate1 += ",hy_curclrid='" + this.txtnextclrid.Value + "'"; lssqlupdate1 += ",hy_curclrname='" + this.txtnextclrname.Value + "'"; lssqlupdate1 += " where DOCID='" + this.txtdocid.Value + "'"; Hyoa_global.ExcuteSQL(lssqlupdate1); //Hyoa_flowmain.hy_curtacheid = this.txtnexttacheid.Value; //Hyoa_flowmain.hy_curtachename = this.txtnexttachename.Value; //Hyoa_flowmain.hy_curclrid = this.txtnextclrid.Value; //Hyoa_flowmain.hy_curclrname = this.txtnextclrname.Value; //---- 添加当前环节的处理时间 ---- start HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl(); //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocidtacheid(this.txtdocid.Value, this.hy_curtacheid.Text); if (dt_clinfo.Rows.Count > 0) { string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString(); //当前处理的记录ID Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc; if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "") { Hyoa_flowhistoryinfo_cl.hy_clsj = System.DateTime.Now.ToString(); } else { Hyoa_flowhistoryinfo_cl.hy_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString(); } Hyoa_flowhistoryinfo_cl.Update(); } //---- 添加当前环节的处理时间 ---- end //--- 创建后续处理的处理记录+建立处理人待办事宜 ---- start Hyoa_global.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, this.txtnextclrid.Value, this.txtnextclrname.Value, "", this.txtnextcyrid.Value, this.txtnextcyrname.Value, System.DateTime.Now.ToString(), ""); //待办事宜、短信、即时消息 HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy(); string[] lv_dbrid = this.txtnextclrid.Value.Split(new Char[] { ',' }); string[] lv_dbrname = this.txtnextclrname.Value.Split(new Char[] { ',' }); for (var i = 0; i < lv_dbrid.Length; i++) { if (lv_dbrid[i].ToString() != "") { //得到当前用户手机号 HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user(); string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString()); //得到后续处理人手机号 string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString()); string ls_sendbt; if (this.txtnexttacheid.Value == "tache0002") { //ls_sendbt = "有督查件:《区政府政务督查通知单〔" + this.hy_field36.Text + "〕" + this.hy_field37.Text + "号》,请在区政府信息督查系统查收并于" + this.hy_field34.Text.ToString() + "前按要求及时反馈。"; if (this.txthyc_lb.SelectedValue == "办件") { ls_sendbt = "《督查通知单〔" + this.txthyc_nf.Text + "〕" + this.txthyc_bh.Text + "号》已发,请尽快查收并于" + this.txthyc_cbqx.Text.ToString() + "前按要求反馈。"; //《区政府督查通知单〔2012〕235号》已发,请尽快查收并于2012-08-10前按要求反馈。 } else { ls_sendbt = "有" + this.txthyc_lb.SelectedValue + ":《督查通知单〔" + this.txthyc_nf.Text + "〕" + this.txthyc_bh.Text + "号》已发,请及时查收并转交领导。"; //有重要阅件:《区政府督查通知单〔2012〕235号》已发,请及时查收并转交领导。 } } else { ls_sendbt = this.hy_bt.Text; } //给后续处理人发送一个新的待办事宜(提醒) Hyoa_global.Senddbsy_global(this.txtdocid.Value, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "zwdc/main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待办", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请办理", 0, this.hy_flowid.Text, this.txtnexttacheid.Value, this.hy_tableid.Text); //给后续处理人发送即时消息(提醒) if (this.txtisSendjstx_clr.Value == "1") { Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.hy_mudelid.Text, ls_sendbt, 0, this.hy_tableid.Text); } //给后续处理人发送短信(提醒) if (this.txtisSendsms_clr.Value == "1") { Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, this.hy_mudelid.Text, ls_sendbt, 1, "", "", 0, this.hy_tableid.Text); } } } //--- 创建后续处理的处理记录+建立处理人待办事宜 ---- end //--- 创建后续传阅记录+建立待办事宜 ---- start string[] lv_cyrid = this.txtnextcyrid.Value.Split(new Char[] { ',' }); string[] lv_cyrname = this.txtnextcyrname.Value.Split(new Char[] { ',' }); for (var i = 0; i < lv_cyrid.Length; i++) { if (lv_cyrid[i].ToString() != "") { //建立传阅数据 Hyoa_global.Saveflowhistoryinfo_cy_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), "", System.DateTime.Now.ToString()); //待办事宜、短信、即时消息 //得到当前用户手机号 HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user(); string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString()); //得到后续传阅人手机号 string cb_cyrsjh = Hyoa_user.GetMobilebyuserid(lv_cyrid[i].ToString()); string ls_sendbt; if (this.txtnexttacheid.Value == "tache0002") { if (this.txthyc_lb.SelectedValue == "办件") { ls_sendbt = "《督查通知单〔" + this.txthyc_nf.Text + "〕" + this.txthyc_bh.Text + "号》已发,请尽快查收并于" + this.txthyc_cbqx.Text.ToString() + "前按要求反馈。"; //《区政府督查通知单〔2012〕235号》已发,请尽快查收并于2012-08-10前按要求反馈。 } else { ls_sendbt = "有" + this.txthyc_lb.SelectedValue + ":《督查通知单〔" + this.txthyc_nf.Text + "〕" + this.txthyc_bh.Text + "号》已发,请及时查收并转交领导。"; //有重要阅件:《区政府督查通知单〔2012〕235号》已发,请及时查收并转交领导。 } } else { ls_sendbt = this.txthyc_dcsx.Text; } //给后续处理人发送一个新的待办事宜(提醒) Hyoa_global.Senddbsy_global(this.txtdocid.Value, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "zwdc/main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待阅", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请阅读", 0, this.hy_flowid.Text, this.txtnexttacheid.Value, this.hy_tableid.Text); //给后续处理人发送即时消息(提醒) if (this.txtisSendjstx_cyr.Value == "1") { Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), this.hy_mudelid.Text, ls_sendbt, 0, this.hy_tableid.Text); } //给后续处理人发送短信(提醒) if (this.txtisSendsms_cyr.Value == "1") { Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), cb_cyrsjh, this.hy_mudelid.Text, ls_sendbt, 1, "", "", 0, this.hy_tableid.Text); } } } //--- 创建后续传阅记录+建立待办事宜 ---- end //--- 当前处理人的待办事宜转已办 ---- start Hyoa_dbsy.Dbsytoybbydocidtacheiduserid(this.txtdocid.Value, this.hy_curtacheid.Text, this.Session["hyuid"].ToString()); //--- 当前处理人的待办事宜转已办 ---- end ls_tip = "文档已成功发送到[" + this.txtnexttachename.Value + "]环节"; hylctjtscl();//特殊处理 } //收回 if (this.txtwhichoperation.Value == "3") { //得到上个环节处理人 HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl(); DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value); if (dt_clinfo.Rows.Count > 1) { //删除当前处理人员的待办事宜 HyoaClass.Hyoa_dbsy Hyoa_dbsy_sh = new HyoaClass.Hyoa_dbsy(); Hyoa_dbsy_sh.DeleteByDocid_flowid_tacheid_userid(this.txtdocid.Value, dt_clinfo.Rows[0]["hy_flowid"].ToString(), dt_clinfo.Rows[0]["hy_tacheid"].ToString(), dt_clinfo.Rows[0]["hy_clrid"].ToString()); string ls_lastclrid = dt_clinfo.Rows[1]["hy_clrid"].ToString(); //上个环节处理人ID string ls_lastclrname = dt_clinfo.Rows[1]["hy_clrname"].ToString(); //上个环节处理人中文名 string ls_lastcldoc = dt_clinfo.Rows[1]["ID"].ToString(); //上个环节处理的记录ID string ls_lasttacheid = dt_clinfo.Rows[1]["hy_tacheid"].ToString(); //上个环节处理环节ID string ls_lasttachename = dt_clinfo.Rows[1]["hy_tachename"].ToString(); //上个环节处理环节名称 string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString(); //当前处理的记录ID dt_clinfo.Clear(); //删除当前处理的记录 Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc; Hyoa_flowhistoryinfo_cl.Delete(); //清空上个环节处理时间,更新创建时间 Hyoa_flowhistoryinfo_cl.ID = ls_lastcldoc; Hyoa_flowhistoryinfo_cl.hy_clsj = ""; Hyoa_flowhistoryinfo_cl.hy_createtime = System.DateTime.Now.ToString(); Hyoa_flowhistoryinfo_cl.Update_sh(); //更新主文档中的当前环节ID、当前环节名称、当前处理人ID和中文名 lssqlupdate1 = "update hyc_" + this.hy_tableid.Text + " set hy_curtacheid='" + ls_lasttacheid + "'"; lssqlupdate1 += ",hy_curtachename='" + ls_lasttachename + "'"; lssqlupdate1 += ",hy_curclrid='" + ls_lastclrid + "'"; lssqlupdate1 += ",hy_curclrname='" + ls_lastclrname + "'"; lssqlupdate1 += " where DOCID='" + this.txtdocid.Value + "'"; Hyoa_global.ExcuteSQL(lssqlupdate1); //Hyoa_flowmain.hy_curtacheid = ls_lasttacheid; //Hyoa_flowmain.hy_curtachename = ls_lasttachename; //Hyoa_flowmain.hy_curclrid = ls_lastclrid; //Hyoa_flowmain.hy_curclrname = ls_lastclrname; ls_tip = "文档已成功收回到[" + ls_lasttachename + "]环节"; hylcshtscl();//特殊处理 } } //退回 if (this.txtwhichoperation.Value == "4") { //更新主文档 //Hyoa_flowmain.hy_curtacheid = this.txtnexttacheid.Value; //Hyoa_flowmain.hy_curtachename = this.txtnexttachename.Value; //Hyoa_flowmain.hy_curclrid = this.txtnextclrid.Value; //Hyoa_flowmain.hy_curclrname = this.txtnextclrname.Value; lssqlupdate1 = "update hyc_" + this.hy_tableid.Text + " set hy_curtacheid='" + this.txtnexttacheid.Value + "'"; lssqlupdate1 += ",hy_curtachename='" + this.txtnexttachename.Value + "'"; lssqlupdate1 += ",hy_curclrid='" + this.txtnextclrid.Value + "'"; lssqlupdate1 += ",hy_curclrname='" + this.txtnextclrname.Value + "'"; lssqlupdate1 += " where DOCID='" + this.txtdocid.Value + "'"; Hyoa_global.ExcuteSQL(lssqlupdate1); //处理历史处理记录 HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl(); DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value); if (dt_clinfo.Rows.Count > 0) { string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString(); //当前处理的记录ID string ls_clsj = ""; //当前处理的记录处理时间 if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "") ls_clsj = System.DateTime.Now.ToString(); else ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString(); dt_clinfo.Clear(); Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc; Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj; Hyoa_flowhistoryinfo_cl.Update(); } //新建一条处理记录 //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); Hyoa_global.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, this.txtnextclrid.Value, this.txtnextclrname.Value, "", "", "", System.DateTime.Now.ToString(), "是"); //处理待办事宜 //转已办-当前处理人的待办事宜 HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy(); Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString()); string ls_sendbt; if (this.txtnexttacheid.Value == "tache0002") { if (this.txthyc_lb.SelectedValue == "办件") { ls_sendbt = "《督查通知单〔" + this.txthyc_nf.Text + "〕" + this.txthyc_bh.Text + "号》已发,请尽快查收并于" + this.txthyc_cbqx.Text.ToString() + "前按要求反馈。"; //《区政府督查通知单〔2012〕235号》已发,请尽快查收并于2012-08-10前按要求反馈。 } else { ls_sendbt = "有" + this.txthyc_lb.Text + ":《督查通知单〔" + this.txthyc_nf.Text + "〕" + this.txthyc_bh.Text + "号》已发,请及时查收并转交领导。"; //有重要阅件:《区政府督查通知单〔2012〕235号》已发,请及时查收并转交领导。 } } else { ls_sendbt = this.hy_bt.Text; } //得到发送人手机号 HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user(); string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString()); //(考虑多人的情况) string[] lv_dbrid = this.txtnextclrid.Value.Split(new Char[] { ',' }); string[] lv_dbrname = this.txtnextclrname.Value.Split(new Char[] { ',' }); for (var i = 0; i < lv_dbrid.Length; i++) { if (lv_dbrid[i].ToString() != "") { //得到接收人手机号 string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString()); HyoaClass.Hyoa_global Hyoa_global2 = new HyoaClass.Hyoa_global(); //给退回到的处理人发送一个新的待办事宜(提醒) Hyoa_global2.Senddbsy_global(this.txtdocid.Value, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "zwdc/main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待办", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请办理", 0, this.hy_flowid.Text, this.txtnexttacheid.Value, this.hy_tableid.Text); //给退回到的处理人发送即时消息(提醒) if (this.txtisSendjstx.Value == "1") { Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.hy_mudelid.Text, ls_sendbt, 0, this.hy_tableid.Text); } //给退回到的处理人发送短信(提醒) if (this.txtisSendsms.Value == "1") { Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, this.hy_mudelid.Text, ls_sendbt, 1, "", "", 0, this.hy_tableid.Text); } } } ls_tip = "已成功退回到[" + this.txtnexttachename.Value + "]环节"; hylcthtscl();//特殊处理 } //多人处理 if (this.txtwhichoperation.Value == "5") { //更新主文档 //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); string ls_newclrid = Hyoa_global.MoveOneString_dh(this.hy_curclrid.Text, this.Session["hyuid"].ToString()); string ls_newclrname = Hyoa_global.MoveOneString_dh(this.hy_curclrname.Text, this.Session["hyuname"].ToString()); lssqlupdate1 = "update hyc_" + this.hy_tableid.Text + " set hy_curclrid='" + ls_newclrid + "'"; lssqlupdate1 += ",hy_curclrname='" + ls_newclrname + "'"; lssqlupdate1 += " where DOCID='" + this.txtdocid.Value + "'"; Hyoa_global.ExcuteSQL(lssqlupdate1); //Hyoa_flowmain.hy_curclrid = ls_newclrid; //Hyoa_flowmain.hy_curclrname = ls_newclrname; //处理处理记录 HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl(); DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value); if (dt_clinfo.Rows.Count > 0) { string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString(); //当前处理的记录ID string ls_clsj = ""; //当前处理的记录处理时间 if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "") ls_clsj = System.DateTime.Now.ToString(); else ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString(); dt_clinfo.Clear(); Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc; Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj; Hyoa_flowhistoryinfo_cl.Update(); } //处理待办事宜 //转已办-当前处理人的待办事宜 HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy(); Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString()); ls_tip = "提交成功,当前环节还需要[" + ls_newclrname + "]进行办理"; hylcdrcltscl();//特殊处理 } //催办 if (this.txtwhichoperation.Value == "6") { //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); string cb_docid = this.txtdocid.Value; string cb_dbrid = this.hy_curclrid.Text; string cb_dbrname = this.hy_curclrname.Text; string cb_fsrid = this.Session["hyuid"].ToString(); string cb_fsrname = this.Session["hyuname"].ToString(); string cb_url = "zwdc/main.aspx?op=modify&docid=" + this.txtdocid.Value + "&pop=1"; string cb_property = "催办"; string cb_mudelid = this.hy_mudelid.Text; string cb_foldername = "待办箱"; string cb_hj = "一般"; string cb_bt = this.txtcbideas.Value + "-" + this.hy_bt.Text; string cb_subbt = "请阅读"; float cb_ifyb = 0; string cb_flowid = this.hy_flowid.Text; string cb_tacheid = this.hy_curtacheid.Text; string cb_from = this.hy_mudelid.Text; //得到发送人手机号 HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user(); string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(cb_fsrid); //得到接收人手机号 string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(cb_dbrid); //给当前处理人发送一个新的待办事宜(提醒) Hyoa_global.Senddbsy_global(cb_docid, cb_dbrid, cb_dbrname, cb_fsrid, cb_fsrname, cb_url, cb_property, cb_mudelid, cb_foldername, cb_hj, cb_bt, cb_subbt, cb_ifyb, cb_flowid, cb_tacheid, this.hy_tableid.Text); //给当前处理人发送即时消息(提醒) if (this.txtisSendjstx.Value == "1") { Hyoa_global.Sendjstx_global(cb_docid, cb_fsrid, cb_fsrname, cb_dbrid, cb_dbrname, cb_from, cb_bt, 0, this.hy_tableid.Text); } //给当前处理人发送短信(提醒) if (this.txtisSendsms.Value == "1") { Hyoa_global.Sendsms_global(cb_docid, cb_fsrid, cb_fsrname, cb_fsrsjh, cb_dbrid, cb_dbrname, cb_jsrsjh, cb_from, cb_bt, 1, "", "", 0, this.hy_tableid.Text); } ls_tip = "催办成功!"; hylccbtscl();//特殊处理 } //流程结束时的提交 if (this.txtwhichoperation.Value == "7") { //更新主文档 lssqlupdate1 = "update hyc_" + this.hy_tableid.Text + " set hy_curtacheid='" + "**" + "'"; lssqlupdate1 += ",hy_curtachename='" + "结束" + "'"; lssqlupdate1 += ",hy_curclrid='" + "" + "'"; lssqlupdate1 += ",hy_curclrname='" + "" + "'"; lssqlupdate1 += " where DOCID='" + this.txtdocid.Value + "'"; Hyoa_global.ExcuteSQL(lssqlupdate1); //Hyoa_flowmain.hy_curtacheid = "**"; //Hyoa_flowmain.hy_curtachename = "结束"; //Hyoa_flowmain.hy_curclrid = ""; //Hyoa_flowmain.hy_curclrname = ""; //更新处理表 HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl(); DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value); if (dt_clinfo.Rows.Count > 0) { string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString(); //当前处理的记录ID string ls_clsj = ""; //当前处理的记录处理时间 if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "") ls_clsj = System.DateTime.Now.ToString(); else ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString(); dt_clinfo.Clear(); Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc; Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj; Hyoa_flowhistoryinfo_cl.Update(); } ////流程结束时删除所有该文档对应的待办事宜 //HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy(); //Hyoa_dbsy.Deletebydocid(this.txtdocid.Value); //处理待办事宜 //转已办-当前处理人的待办事宜 HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy(); Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString()); ls_tip = "流程结束!"; hylcjstscl();//特殊处理 } lssqlupdate1 += " where DOCID='" + this.txtdocid.Value + "'"; //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); Hyoa_global.ExcuteSQL(lssqlupdate1); //Hyoa_flowmain.Update(); //处理完成后的提示及跳转(增加刷新附件功能) if (this.txtifsxfj.Text == "1") { Response.Write("<script>window.location='zwdc/main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&url=" + this.txturl.Value + "'</script>"); } else { if (this.txtifpop.Value == "") { Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>"); } else { Response.Write("<script>alert('" + ls_tip + "');self.close();</script>"); } } }
//加载主表单 Written by xf 20110515 private void DataPlay() { if (this.Request.QueryString["op"] != null) { HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); this.txtop.Value = this.Request.QueryString["op"].ToString(); //新增还是修改 //新文档 if (this.Request.QueryString["op"] == "add") { //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); //文档ID this.txtdocid.Value = Hyoa_global.GetRandom(); this.hy_djrid.Text = this.Session["hyuid"].ToString(); this.hy_djrname.Text = this.Session["hyuname"].ToString(); this.hy_djrbmid.Text = this.Session["hydeptid"].ToString(); this.hy_djrbmname.Text = this.Session["hydeptname"].ToString(); this.hy_djsj.Text = System.DateTime.Now.ToString(); this.txthyc_nf.Text = System.DateTime.Now.ToString("yyyy"); this.txthyc_djsj.Text = System.DateTime.Now.ToString("yyyy-MM-dd"); this.txthyc_lxks.Text = this.Session["hydeptname"].ToString(); this.txthyc_lxr.Text = this.Session["hyuname"].ToString(); HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig(); DataTable dt_tableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.hy_mudelid.Text, this.hy_tableid.Text); if (dt_tableconfig.Rows.Count > 0) { if (dt_tableconfig.Rows[0]["hy_ifflowdoc"].ToString() == "是") { //根据模块ID得到流程信息 HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor(); DataTable dt = Hyoa_flowinfor.Getfirsttacheinfobymudelid(this.hy_mudelid.Text); //Response.Write("<script>alert('"+dt.Rows.Count.ToString()+"')</script>"); if (dt.Rows.Count > 0) { //判断当前用户是否有登记权限 //得到第一环节ID string ls_firsttacheid = Hyoa_global.GetFirstTacheid(dt.Rows[0]["hy_flowid"].ToString()); if (Hyoa_global.IfHaveRegiRight_Lc(dt.Rows[0]["hy_flowid"].ToString(), ls_firsttacheid, this.Session["hyuid"].ToString())) { this.hy_flowid.Text = dt.Rows[0]["hy_flowid"].ToString(); this.hy_flowname.Text = dt.Rows[0]["hy_flowname"].ToString(); this.hy_curtacheid.Text = dt.Rows[0]["hy_nexttacheid"].ToString(); this.hy_curtachename.Text = dt.Rows[0]["hy_nexttachename"].ToString(); this.hy_curclrid.Text = this.Session["hyuid"].ToString(); this.hy_curclrname.Text = this.Session["hyuname"].ToString(); this.lblcurtachenameshow.Text = dt.Rows[0]["hy_nexttachename"].ToString(); this.txtSystemClRight.Value = "1"; this.txtSystemYdRight.Value = "0"; } else { Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');</script>"); } } dt.Clear(); this.td_nextstep.Visible = true; //提交 this.td_submit.Visible = true; //保存 } } //加载页面 WebOpen(this.hy_mudelid.Text, this.hy_tableid.Text, this.hy_flowid.Text, this.hy_curtacheid.Text, this.txtSystemClRight.Value, this.txtSystemYdRight.Value, "0"); } //旧文档 if (this.Request.QueryString["op"] == "modify") { this.td_browseflow.Visible = true; //查看流程 if (this.Request.QueryString["docid"] != null) { this.txtdocid.Value = this.Request.QueryString["docid"].ToString(); //HyoaClass.Hyoa_flowmain flowmain = new HyoaClass.Hyoa_flowmain(); //DataTable dt = flowmain.Getflowmain(this.txtdocid.Value); //HyoaClass.Hyoa_global Hyoa_global=new HyoaClass.Hyoa_global (); string lssql = "select * from hyc_Tabledcxt where DOCID='" + this.txtdocid.Value + "'"; DataTable dt = Hyoa_global.GetDataTable(lssql); if (dt.Rows.Count > 0) { this.hy_mudelid.Text = dt.Rows[0]["hy_mudelid"].ToString(); this.hy_tableid.Text = dt.Rows[0]["hy_tableid"].ToString(); this.hy_flowid.Text = dt.Rows[0]["hy_flowid"].ToString(); this.hy_flowname.Text = dt.Rows[0]["hy_flowname"].ToString(); this.hy_curtacheid.Text = dt.Rows[0]["hy_curtacheid"].ToString(); this.hy_curtachename.Text = dt.Rows[0]["hy_curtachename"].ToString(); this.lblcurtachenameshow.Text = dt.Rows[0]["hy_curtachename"].ToString(); this.hy_curclrid.Text = dt.Rows[0]["hy_curclrid"].ToString(); this.hy_curclrname.Text = dt.Rows[0]["hy_curclrname"].ToString(); this.hy_djrid.Text = dt.Rows[0]["hy_djrid"].ToString(); this.hy_djrname.Text = dt.Rows[0]["hy_djrname"].ToString(); this.hy_djrbmid.Text = dt.Rows[0]["hy_djrbmid"].ToString(); this.hy_djrbmname.Text = dt.Rows[0]["hy_djrbmname"].ToString(); this.hy_djsj.Text = dt.Rows[0]["hy_djsj"].ToString(); this.hy_bt.Text = dt.Rows[0]["hy_bt"].ToString(); string lssqlfield = "SELECT * FROM hyt_flowfield WHERE (hy_tableid = 'Tabledcxt') AND (hy_mudelid = 'Mudeldcxt')"; DataTable dtfield = Hyoa_global.GetDataTable_BASE(lssqlfield); //得到所有配置域 for (int ii = 0; ii < dtfield.Rows.Count; ii++) { if (dtfield.Rows[ii]["hy_fieldtype"].ToString() == "文本") { TextBox txt1 = (TextBox)this.FindControl("txthyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()); txt1.Text = dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString(); Label lbl1 = (Label)this.FindControl("lblhyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()); lbl1.Text = dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString(); } if (dtfield.Rows[ii]["hy_fieldtype"].ToString() == "多行文本") { TextBox txt1 = (TextBox)this.FindControl("txthyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()); txt1.Text = dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString(); Label lbl1 = (Label)this.FindControl("lblhyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()); lbl1.Text = RtfToText2(dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString()); } if (dtfield.Rows[ii]["hy_fieldtype"].ToString() == "日期") { TextBox txt1 = (TextBox)this.FindControl("txthyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()); Label lbl1 = (Label)this.FindControl("lblhyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()); if (dtfield.Rows[ii]["hy_defaultvalue"].ToString() == "yyyy-mm-dd") { txt1.Text = System.DateTime.Parse(dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString()).ToShortDateString(); lbl1.Text = System.DateTime.Parse(dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString()).ToShortDateString(); } else { txt1.Text = dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString(); lbl1.Text = dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString(); } } if (dtfield.Rows[ii]["hy_fieldtype"].ToString() == "对话框列表") { DropDownList ddl1 = (DropDownList)this.FindControl("txthyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()); ddl1.SelectedValue = dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString(); Label lbl1 = (Label)this.FindControl("lblhyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()); lbl1.Text = dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString(); } //this.FindControl("11111"). = "1"; //this.FindControl("txthyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()).value = dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString(); //this.FindControl("lblhyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()).value = dt.Rows[0]["hyc_" + dtfield.Rows[ii]["hy_fieldid"].ToString()].ToString(); } //this.txthyc_nf.Text = dt.Rows[0]["hyc_nf"].ToString(); //this.txthyc_bh.Text = dt.Rows[0]["hyc_bh"].ToString(); //this.txthyc_lb.SelectedValue = dt.Rows[0]["hyc_lb"].ToString(); //this.txthyc_hj.SelectedValue = dt.Rows[0]["hyc_hj"].ToString(); //this.txthyc_djsj.Text = dt.Rows[0]["hyc_djsj"].ToString(); //this.txthyc_cbdw.Text = dt.Rows[0]["hyc_cbdw"].ToString(); //this.txthyc_dcsx.Text = dt.Rows[0]["hyc_dcsx"].ToString(); //this.txthyc_blyq.Text = dt.Rows[0]["hyc_blyq"].ToString(); //this.txthyc_lxks.Text = dt.Rows[0]["hyc_lxks"].ToString(); //this.txthyc_lxr.Text = dt.Rows[0]["hyc_lxr"].ToString(); //this.txthyc_lxdh.Text = dt.Rows[0]["hyc_lxdh"].ToString(); //this.txthyc_cbqx.Text = dt.Rows[0]["hyc_cbqx"].ToString(); //this.lblhyc_nf.Text = dt.Rows[0]["hyc_nf"].ToString(); //this.lblhyc_bh.Text = dt.Rows[0]["hyc_bh"].ToString(); //this.lblhyc_lb.SelectedValue = dt.Rows[0]["hyc_lb"].ToString(); //this.lblhyc_hj.SelectedValue = dt.Rows[0]["hyc_hj"].ToString(); //this.lblhyc_djsj.Text = dt.Rows[0]["hyc_djsj"].ToString(); //this.lblhyc_cbdw.Text = dt.Rows[0]["hyc_cbdw"].ToString(); //this.lblhyc_dcsx.Text = dt.Rows[0]["hyc_dcsx"].ToString(); //this.lblhyc_blyq.Text = dt.Rows[0]["hyc_blyq"].ToString(); //this.lblhyc_lxks.Text = dt.Rows[0]["hyc_lxks"].ToString(); //this.lblhyc_lxr.Text = dt.Rows[0]["hyc_lxr"].ToString(); //this.lblhyc_lxdh.Text = dt.Rows[0]["hyc_lxdh"].ToString(); //this.lblhyc_cbqx.Text = dt.Rows[0]["hyc_cbqx"].ToString(); this.hy_iftx.Text = dt.Rows[0]["hy_iftx"].ToString(); this.hy_zhtxsj.Text = dt.Rows[0]["hy_zhtxsj"].ToString(); this.hy_readuserlist.Text = dt.Rows[0]["hy_readuserlist"].ToString(); } dt.Clear(); //流程文档 if (this.txtifhaveflow.Value == "是") { //流程已结束 if (this.hy_curtacheid.Text == "**") { //////////////流程已结束/////////////////////// this.lblcurtachenameshow.Text = "流程已结束"; //UpdateReadFlag(); //打开时置为已读 //////////////流程已结束/////////////////////// //判断是否为传阅人 HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy(); dt = Hyoa_flowhistoryinfo_cy.Getifcyrybydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString()); if (dt.Rows.Count > 0) { this.txtSystemClRight.Value = "0"; this.txtSystemYdRight.Value = "1"; } //判断是否历史处理人 //判断是否是历史处理人员 //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); if (Hyoa_global.ifhistoryclr(this.txtdocid.Value, this.Session["hyuid"].ToString())) { this.txtifhistoryclr.Value = "1"; this.txtSystemClRight.Value = "0"; this.txtSystemYdRight.Value = "1"; } } else { //////////////流程未结束/////////////////////// //判断是否为当前处理人 if (this.hy_curclrid.Text.IndexOf(this.Session["hyuid"].ToString()) >= 0) { this.txtSystemClRight.Value = "1"; this.txtSystemYdRight.Value = "0"; this.td_submit.Visible = true; //保存 this.td_nextstep.Visible = true; //提交 //this.td_returnsumbit.Visible = true; //退回 } else { //判断是否为传阅人 HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy(); dt = Hyoa_flowhistoryinfo_cy.Getifcyrybydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString()); if (dt.Rows.Count > 0) { this.txtSystemClRight.Value = "0"; this.txtSystemYdRight.Value = "1"; } //判断是否是上一环节处理人 //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); if (Hyoa_global.iflastclr(this.txtdocid.Value, this.Session["hyuid"].ToString())) { this.txtiflastclr.Value = "1"; this.txtSystemClRight.Value = "0"; this.txtSystemYdRight.Value = "1"; //this.td_withdraw.Visible = true; //收回 //this.td_press.Visible = true; //催办 } else { //判断是否是历史处理人员 if (Hyoa_global.ifhistoryclr(this.txtdocid.Value, this.Session["hyuid"].ToString())) { this.txtifhistoryclr.Value = "1"; this.txtSystemClRight.Value = "0"; this.txtSystemYdRight.Value = "1"; //this.td_press.Visible = true; //催办 } } } //判断是否为最后一个环节 HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork(); DataTable dtflowwork = Hyoa_flowwork.Getflowworkbyflowidtacheid(this.hy_flowid.Text, this.hy_curtacheid.Text); if (dtflowwork.Rows.Count > 0) { if (dtflowwork.Rows[0]["hy_nexttacheid"].ToString() == "**") this.txtiflasttache.Value = "1"; } dtflowwork.Clear(); //////////////流程未结束/////////////////////// } //既没有处理权限,又没有阅读权限的情况下 if (this.txtSystemClRight.Value == "0" && this.txtSystemYdRight.Value == "0") { Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');</script>"); } //加载页面 WebOpen(this.hy_mudelid.Text, this.hy_tableid.Text, this.hy_flowid.Text, this.hy_curtacheid.Text, this.txtSystemClRight.Value, this.txtSystemYdRight.Value, "1"); } } } //隐藏、显示控制 string lssqlfield5 = "SELECT * FROM hyt_flowfield WHERE (hy_tableid = 'Tabledcxt') AND (hy_mudelid = 'Mudeldcxt')"; DataTable dtfield5 = Hyoa_global.GetDataTable_BASE(lssqlfield5); //得到所有配置域 string lssqlflowtachefield = "";//流程环节对应的域 DataTable dtflowtachefield; for (int ii = 0; ii < dtfield5.Rows.Count; ii++) { lssqlflowtachefield = "select * from hyt_flowtachefield where hy_flowid = '" + this.hy_flowid.Text + "' and hy_tacheid = '" + this.hy_curtacheid.Text + "' and hy_fieldid='" + dtfield5.Rows[ii]["hy_fieldid"].ToString() + "'"; dtflowtachefield = Hyoa_global.GetDataTable_BASE(lssqlflowtachefield); if (dtflowtachefield.Rows.Count > 0) { this.FindControl("txthyc_" + dtfield5.Rows[ii]["hy_fieldid"].ToString()).Visible = true; this.FindControl("lblhyc_" + dtfield5.Rows[ii]["hy_fieldid"].ToString()).Visible = false; } else { this.FindControl("txthyc_" + dtfield5.Rows[ii]["hy_fieldid"].ToString()).Visible = false; this.FindControl("lblhyc_" + dtfield5.Rows[ii]["hy_fieldid"].ToString()).Visible = true; } } } }