<%@ WebHandler Language="C#" Class="Send" %> using System; using System.Collections.Generic; using System.Web; using System.Data; using System.Data.Common; using System.Web.SessionState; using System.Text; using eMIS; public class Send : IHttpHandler , IRequiresSessionState { private FlowManager flowManager = null; public void ProcessRequest (HttpContext context) { string recordId = (context.Request.QueryString["rid"]==null?"":context.Request.QueryString["rid"].ToString()); string flowId = (context.Request.QueryString["fid"]==null?"":context.Request.QueryString["fid"].ToString()); string taskId = (context.Request.QueryString["tid"]==null?"":context.Request.QueryString["tid"].ToString()); string programId = (context.Request.QueryString["pid"] == null ? "" : context.Request.QueryString["pid"].ToString()); DataManager dm = new DataManager(); DataTable dt; if (taskId != "") { dt=dm.ExecuteTable("select lcid,jlid from xt_lcrw where id=?",taskId); if (dt.Rows.Count != 0) { recordId = dt.Rows[0]["jlid"].ToString(); flowId = dt.Rows[0]["lcid"].ToString(); } else { recordId = taskId; } } if (flowId == "") { object obj=dm.Operator.ExecuteScalar("select lcid from xt_lcsl where jlid=" + recordId); if(obj!=null) flowId=obj.ToString(); } if(flowId=="") { context.Response.Write("未发现流程实例(1)!"); context.Response.End(); } DbDataReader r = dm.ExecuteReader("select ztz from xt_lcsl where lcid=" + flowId + " and jlid=" + recordId); string ztz = ""; if (r.Read()) { ztz = r[0].ToString(); } else { context.Response.Write("未发现流程实例(2)!"); context.Response.End(); } r.Close(); r = dm.ExecuteReader("select cxid from com_lcdyb where lcid=" + flowId); if (r.Read()) { programId = r[0].ToString(); } else { context.Response.Write("未发现流程实例(d)!"); context.Response.End(); } r.Close(); //flowid = Request["flowid"]; //jlid = Request["recid"]; //proid = Request["proid"]; //ztz = Request["ztz"]; //nodeid = Request["nodeid"]; context.Response.Redirect("Flow/FlowMonitor.aspx?flowid="+flowId+"&recid="+recordId+"&proid="+programId+"&ztz="+ztz); } public bool IsReusable { get { return false; } } }