<%@ WebHandler Language="C#" Class="Condition" %> 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 Condition : IHttpHandler , IRequiresSessionState { public void ProcessRequest (HttpContext context) { StringBuilder sb = new StringBuilder(); string menuId = context.Request.QueryString["proid"]; string userId = context.Session["userid"].ToString(); string wwwroot = context.Request.ApplicationPath; if (wwwroot == "/") wwwroot = ""; DataManager dm = new DataManager(); string ui = context.Session["ui"].ToString(); string ThemePath = wwwroot + "/UI/" + ui + "/common"; InstanceManager inst = new InstanceManager(context,dm,menuId); ProgramManager program = inst.Program; DataTable elements = program.QueryElements; int i,l; string controlIdList = ""; ValueTagManager tag = new ValueTagManager(inst); ControlManager cm = new ControlManager(inst); //relcount = aco.DetailPrograms.All.count sb.Append("查询"); string sYSF = ""; sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.Append("
"); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append("
"); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); //sb.Append(""); //sb.Append(""); sb.Append(""); sb.Append("
"); sb.Append(""); sb.Append(""); sb.Append("
转回列表
"); sb.Append("
"); sb.Append(""); sb.Append(""); sb.Append("
显示字段
"); sb.Append("
"); //sb.Append(""); //sb.Append(""); //sb.Append("
重新选择
"); //sb.Append("
"); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append("
"); sb.Append("" + program.Properties["BT"].ToString() + "  
"); sb.Append(""); sb.Append("
"); sb.Append("
"); sb.Append(""); sb.Append(""); sb.Append("
"); sb.Append("
"); //head sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); l=elements.Rows.Count; cm.PageType = 1; DataRow busRow = null; for (i=0;i"); sb.Append(""); sb.Append(""); sb.Append(""); if (cm.DataType=="1" && cm.ControlType == "1") sb.Append(""); sb.Append(""); } if (controlIdList != "") controlIdList = controlIdList.Substring(1); sb.Append(""); sb.Append("
" + cm.ControlDescription + "" + cm.GetHtml() + "
"); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append("
"); sb.Append(""); sb.Append("
"); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append("
 显示操作符
 显示列表字段
"); //set rs = aco.GetProRecSet(1) //iii = 0 //while not rs.eof // if cint(iii+1) mod 5 = 1 then response.write "" // response.write "" // if cint(iii+1) mod 5 = 0 then response.write "" // iii = iii + 1 // rs.movenext //wend //rs.close //set rs = nothing sb.Append("
"); //bottom sb.Append("
"); //bottom sb.Append(""); sb.Append(""); sb.Append(""); sb.AppendLine(""); sb.AppendLine(""); context.Response.Write(sb.ToString()); } public void setDisplayFormat(int idx,string s) { //dim s1,fn,ft,i,k //if s= "" then // fn = "" //else // i = instr(s,"displayformat") // if i <1 then // fn= "" // else // i = i + 14 // k = instr(i,s,"(") // fn = mid(s,i,k-i) // i = instr(k,s,")") - 1 // ft = mid(s,k+1,i-k) // end if //end if //displayFormat(idx,0) = fn //displayFormat(idx,1) = ft } private string getDisplay(int idx,string v) { string r=v; //if displayFormat(idx,0) = "" then // r = v //else // select case displayFormat(idx,0) // case "date" // r = emisformatdate(displayFormat(idx,1),v) // case "money" // r = emisformatmoney(displayFormat(idx,1),v) // end select //end if return r; } private string emisformatmoney(string ft,string v) { string r; r = v; if (v != "") { string f = ft + ",,,"; string[] a = f.Split(','); if (a[0] == "") a[0] = "¥"; if (a[1] == "") a[1] = "1"; if (a[2] == "") a[2] = "-1"; if (a[1] == "1") r = Math.Round(Convert.ToDecimal(r),Convert.ToInt16(a[1])).ToString(); r = a[0] + r; } return r; } private string GetItemValue(string itemsString,string itemName) { int i = itemsString.IndexOf("\"" + itemName + "\" : \"") + itemName.Length + 6; int j = itemsString.IndexOf("\"",i); return itemsString.Substring(i, j - i); } public bool IsReusable { get { return false; } } }