%@ WebHandler Language="C#" Class="GetCustomHtml" %>
using System;
using System.Web;
using System.Collections;
using eMIS;
using System.Text;
using System.Web.SessionState;
public class GetCustomHtml : IHttpHandler,IRequiresSessionState
{
public void ProcessRequest(HttpContext context)
{
if (context.Session["userid"] == null)
{
LoginManager lm = new LoginManager(context);
lm.Login("400002");
//if (!lm.VerifyIdentity())
//{
// context.Response.Write("会话丢失,请重新登陆!");
// context.Response.End();
//}
}
string wwwroot = context.Request.ApplicationPath;
if (wwwroot == "/") wwwroot = "";
//string themePath = wwwroot + "/Themes/" + context.Session["Theme"].ToString();
Hashtable ht = new Hashtable();
string menuId = context.Request["proid"].ToString();
string recordId = context.Request["varSign"].ToString();
string recordId2 = (context.Request["mrid"] == null ? "" : context.Request["mrid"].ToString());
//bool isIP = (context.Session["ismobile"].ToString() == "1");
int i;
//string userId = context.Session["userid"].ToString();
//string userCnName = context.Session["usercnname"].ToString();
string rndstr = DateTime.Now.ToString();
DataManager dm = new DataManager();
InstanceManager inst = new InstanceManager(context, dm, menuId);
inst.PrimaryKeyValue = recordId;
bool multiRowEdit = false;
if (recordId2 != "")
{
multiRowEdit = true;
}
ProgramManager program = inst.Program;
string customUi = (multiRowEdit ? "" : program.Properties["DZBJYM"].ToString());
//ht.Add("title", program.Properties["bt"].ToString());
string s = context.Server.MapPath(wwwroot + program.GetTemplatePath(customUi));
StringBuilder sb = new StringBuilder();
inst.AppendCustomPageHtml(s, sb);
context.Response.Write(sb.ToString());
}
public bool IsReusable
{
get
{
return false;
}
}
}