%@ WebHandler Language="C#" Class="EditData" %> 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 EditData : IHttpHandler , IRequiresSessionState { public void ProcessRequest (HttpContext context) { string programId = context.Request["pid"].ToString(); string recordId = context.Request["rid"].ToString(); bool isIP = (context.Session["ismobile"].ToString() == "1"); string wwwroot = context.Request.ApplicationPath; string themePath = wwwroot + "/Themes/" + context.Session["Theme"].ToString(); string userId = context.Session["userid"].ToString(); DataManager dm = new DataManager(); InstanceManager inst = new InstanceManager(context, dm, programId, recordId); string s; //DbDataReader reader = inst.GetSingleRecordReader(); //if (reader != null) reader.Read(); //set pri = aco.GetPrivilegeObject() //pri.init aco.sysconn,proid,2 //'if not pri.Permission(session("renyuan_id")) then '验证有没有编辑的权限 //' s = "false" //'end if //if s = "" and recid <> "" and aco.ParentValue="" then '验证有没有访问该记录的权限 // s = pri.GetListCondition(session("renyuan_id")) // if s <> "" then // aco.openuc() // set rs = aco.getrs("select count(" & aco.mt.gjzd & ") from " & aco.mt.fwb & " where " & aco.mt.gjzd & "=" & recid & s,0) // if rs(0) = 0 then // s = "false" // end if // aco.closeuc // end if //end if //if s = "false" then //aco.closesc //set aco = nothing //response.redirect "Error_Display.asp?ReturnUrl=0&Error_Text=" & server.urlencode("没有权限打开该页面!") //end if ProgramManager program = inst.Program; DataTable elements = program.EditElements; int elementsCount = elements.Rows.Count; string customUi = program.Properties["DZBJYM"].ToString(); if (elementsCount == 0) { string path = customUi; if (path == "") { context.Response.Redirect("Error_Display.asp?ReturnUrl=0&Error_Text=" + context.Server.UrlEncode("请定义维护字段!")); } else { path = program.GetTemplatePath(path); if (path.IndexOf("?") == -1) path += "?"; else path += "&"; } context.Response.Redirect(wwwroot + path + "id=" + recordId + "&proid=" + programId + "&position=" + inst.RecordPosition.ToString() + "&count=" + inst.RecordCount.ToString() + "&recid=" + recordId); } StringBuilder sb = new StringBuilder(); sb.AppendLine(""); sb.AppendLine(""); if (customUi=="") { sb.AppendLine(""); } else { sb.AppendLine(""); } string pagetitle = program.Properties["bt"].ToString(); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine("
"); sb.AppendLine("