<%@ WebHandler Language="C#" Class="Handler" %> using System; using System.Web; using System.Collections.Generic; public class Handler : IHttpHandler { HttpRequest Request = null; HttpResponse Response = null; public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; Request = context.Request; Response = context.Response; string method = Request.Params["method"]; switch (method) { case "GetTable1": GetTable1(); break; case "GetTableSum": GetTableSum(); break; case "CreateTable": CreateTable(); break; case "CreateMiddleTable": CreateMiddleTable(); break; case "GetMiddleTableData": string page = Request.Params["page"]; GetMiddleTableData(page); break; case "CreateTablePaoGuang": CreateTablePaoGuang(); break; case "GetTableSumPaoGuang": GetTableSumPaoGuang(); break; case "GetMiddleTablePaoGuang": string pagePG = Request.Params["page"]; GetMiddleTablePaoGuang(pagePG); break; case "GetSumRateTable": GetSumRateTable(); break; default: break; } } public bool IsReusable { get { return false; } } #region 喷涂下线合格率看板--滚动版 void GetTable1() { Response.Write(PaintingScreen.Handler.Function.GetTable1()); Response.End(); } void GetTableSum() { Response.Write(PaintingScreen.Handler.Function.GetTableSum()); Response.End(); } #endregion #region 喷涂下线合格率看板--分页版 void CreateTable() { Response.Write(PaintingScreen.Handler.Function.CreateTable()); Response.End(); } void CreateMiddleTable() { Response.Write(PaintingScreen.Handler.Function.CreateMiddleTable()); Response.End(); } void GetMiddleTableData(string page) { string res = PaintingScreen.Handler.Function.GetMiddleTableData(page); Response.Write(res); Response.End(); } #endregion #region 抛光TOP5看板 void CreateTablePaoGuang() { Response.Write(PaintingScreen.Handler.Function.CreateTablePaoGuang()); Response.End(); } void GetTableSumPaoGuang() { Response.Write(PaintingScreen.Handler.Function.GetTableSumPaoGuang()); Response.End(); } void GetMiddleTablePaoGuang(string page) { Response.Write(PaintingScreen.Handler.Function.GetMiddleTablePaoGuang(page)); Response.End(); } void GetSumRateTable() { Response.Write(PaintingScreen.Handler.Function.GetSumDefectPercent()); Response.End(); } #endregion }