<%@ WebHandler Language="C#" Class="CheckPriKey" %> using System; using System.Collections.Generic; using System.Web; using System.Data; using System.IO; using eMIS.Data; using System.Data.Common; using System.Text; using System.Web.SessionState; using eMIS; public class CheckPriKey : IHttpHandler, IRequiresSessionState { public void ProcessRequest (HttpContext context) { string recordId = context.Request.QueryString["rid"].ToString(); string flowId = context.Request.QueryString["fid"].ToString(); string displayMode = context.Request.QueryString["dm"].ToString(); DataManager dm = new DataManager(); string sql; if (flowId == "") { sql = "select lcid from com_lcdyb where cxid=" + context.Request.QueryString["pid"].ToString(); object obj = dm.Operator.ExecuteScalar(sql); if (obj != null) flowId = obj.ToString(); } FlowManager flow = new FlowManager(flowId, dm); sql = "select a.jdid,a.jdid_d,a.lx,b.xingming,a.czsj,a.bz,a.jsr,b.gw from XT_LCRZ a,com_yhb b where a.lcid=" + flowId + " and a.jlid=" + recordId + " and a.czrid=b.id "; //if (displayMode == "1") sql += " and a.zt=1 "; sql += "order by a.id"; DbDataReader reader = dm.ExecuteReader(sql); StringBuilder sb = new StringBuilder(); sb.Append(""); sb.Append(""); string n1,n2; while (reader.Read()) { n1 = flow.NodeDescriptionDictionary[reader[0].ToString()]; n2 = flow.NodeDescriptionDictionary[reader[1].ToString()]; if (n1 != n2) { n1=n1 + " -> " + n2; } sb.Append(""); n1 = reader["czsj"].ToString(); n2 = DateTime.Parse(n1).ToString("yyyy-MM-dd HH:mm"); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); } sb.Append("
时间岗位姓名操作接收人意见
" + n2 + "" + reader["gw"].ToString() + "" + reader["xingming"].ToString() + "" + reader["lx"].ToString() + "" + reader["jsr"].ToString() + "" + reader["bz"].ToString() + "
"); context.Response.ContentType = "text/plain"; context.Response.ContentEncoding = System.Text.Encoding.UTF8; context.Response.Write(sb.ToString()); } public bool IsReusable { get { return false; } } }