public void ProcessRequest(HttpContext context) { var dict = DFPub.GetDFDictionary(context.Request); var action = dict["action"].ToLower(); var contentType = context.Request.ContentType; if (string.IsNullOrWhiteSpace(contentType)) { contentType = "application/json;charset=utf-8"; } context.Response.ContentType = contentType; switch (action) { case "getpower": context.Response.Write(JsonSerializeHelper.SerializeObject(GetPower(context))); break; case "getchunshui": context.Response.Write(JsonSerializeHelper.SerializeObject(GetChunShui(context))); break; case "getzilaishui": context.Response.Write(JsonSerializeHelper.SerializeObject(GetZilaiShui(context))); break; case "getlinsuan": context.Response.Write(JsonSerializeHelper.SerializeObject(GetLinSuan(context))); break; case "getyansuan": context.Response.Write(JsonSerializeHelper.SerializeObject(GetYanSuan(context))); break; case "getjian": context.Response.Write(JsonSerializeHelper.SerializeObject(GetJian(context))); break; case "gettianranqi": context.Response.Write(JsonSerializeHelper.SerializeObject(GetTianRanQi(context))); break; case "gettzhengqi": context.Response.Write(JsonSerializeHelper.SerializeObject(GetZhengQi(context))); break; case "getpowerdata": context.Response.Write(JsonSerializeHelper.SerializeObject(GetPowerData(context))); break; case "requestenergyalarm": context.Response.Write(JsonSerializeHelper.SerializeObject(GetEnergyAlarm(context))); break; default: break; } }
public void ProcessRequest(HttpContext context) { var dict = DFPub.GetDFDictionary(context.Request); var action = dict["action"].ToLower(); var contentType = context.Request.ContentType; if (string.IsNullOrWhiteSpace(contentType)) { contentType = "application/json;charset=utf-8"; } context.Response.ContentType = contentType; switch (action) { case "energyqueryonly4": context.Response.Write(JsonSerializeHelper.SerializeObject(EnergyQueryOnly4(context))); break; case "poweranalyzeday": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeDay(context))); break; case "poweranalyzemonth": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeMonth(context))); break; case "poweranalyzemonthsummary": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeMonthSummary(context))); break; case "poweranalyzemonthline": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeMonthLine(context))); break; case "poweranalyzemonthlinesummary": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeMonthLineSummary(context))); break; case "poweranalyzeyear": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeYear(context))); break; case "poweranalyzeyearline": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeYearLine(context))); break; case "poweranalyzeyearlinesummary": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeYearLineSummary(context))); break; case "poweranalyzeyearsummary": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeYearSummary(context))); break; case "poweranalyzedayline": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeDayLine(context))); break; case "poweranalyzedaysummary": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeDaySummary(context))); break; case "poweranalyzedaylinesummary": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerAnalyzeDayLineSummary(context))); break; case "energyquerycurrent": context.Response.Write(JsonSerializeHelper.SerializeObject(EnergyQueryCurrent(context))); break; case "powerquerycurrent": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerQueryCurrent(context))); break; case "powerquerycurrentline": context.Response.Write(JsonSerializeHelper.SerializeObject(PowerQueryCurrentLine(context))); break; default: break; } }
public void ProcessRequest(HttpContext context) { var dict = DFPub.GetDFDictionary(context.Request); var action = dict["action"].ToLower(); var contentType = context.Request.ContentType; if (string.IsNullOrWhiteSpace(contentType)) { contentType = "application/json;charset=utf-8"; } context.Response.ContentType = contentType; switch (action) { case "l01mf": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL01MF(context))); break; case "l01lw": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL01LW(context))); break; case "l01productspeed": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL01ProductSpeed(context))); break; case "l01ly": //1号线炉压 context.Response.Write(JsonSerializeHelper.SerializeObject(GetL01LY(context))); break; case "l01ua": //1号线MFUA context.Response.Write(JsonSerializeHelper.SerializeObject(GetL01MFUA(context))); break; case "l02ua": //2号线MFUA context.Response.Write(JsonSerializeHelper.SerializeObject(GetL02MFUA(context))); break; case "l03ua": //3号线MFUA context.Response.Write(JsonSerializeHelper.SerializeObject(GetL03MFUA(context))); break; case "l04ua": //4号线MFUA context.Response.Write(JsonSerializeHelper.SerializeObject(GetL04MFUA(context))); break; case "l02mf": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL02MF(context))); break; case "l02lw": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL02LW(context))); break; case "l02ly": //2号线炉压 context.Response.Write(JsonSerializeHelper.SerializeObject(GetL02LY(context))); break; case "l02productspeed": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL02ProductSpeed(context))); break; case "l03mf": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL03MF(context))); break; case "l03lw": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL03LW(context))); break; case "l03ly": //3号线炉压 context.Response.Write(JsonSerializeHelper.SerializeObject(GetL03LY(context))); break; case "l04fenquly": //4号线炉压 context.Response.Write(JsonSerializeHelper.SerializeObject(GetL04FenQuLY(context))); break; case "l03productspeed": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL03ProductSpeed(context))); break; case "l04mf": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL04MF(context))); break; case "l04lw": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL04LW(context))); break; case "l04productspeed": context.Response.Write(JsonSerializeHelper.SerializeObject(GetL04ProductSpeed(context))); break; case "process": context.Response.Write(JsonSerializeHelper.SerializeObject(GetProcessData(context))); break; case "gettotal": context.Response.Write(JsonSerializeHelper.SerializeObject(GetTotal(context))); break; default: break; } }
public void ProcessRequest(HttpContext context) { InitializeHelper.Init(); var dict = DFPub.GetDFDictionary(context.Request); var action = dict["action"].ToLower(); var contentType = context.Request.ContentType; if (string.IsNullOrWhiteSpace(contentType)) { contentType = "application/json;charset=utf-8"; } context.Response.ContentType = contentType; switch (action) { case "queryform": if (dict.Data.ContainsKey(DFPub.DF_DATAGRID_EXPORT)) { var vm = QueryForm(dict); if (vm.hasError) { m_log.Error(vm.error); } context.Response.Write(JsonSerializeHelper.SerializeObject(new DataGridVM() { data = DFPub.PhysicalToRelative(vm.data.ToString()) })); } else { context.Response.Write(JsonSerializeHelper.SerializeObject(QueryForm(dict))); } break; case "deleteform": context.Response.Write(JsonSerializeHelper.SerializeObject(DeleteForm(dict))); break; case "clientreport": context.Response.Write(JsonSerializeHelper.SerializeObject(ClientReport(dict))); break; case "querylist": context.Response.Write(JsonSerializeHelper.SerializeObject(QueryList(dict))); break; case "saveparameter": context.Response.Write(JsonSerializeHelper.SerializeObject(SaveParameter(context, dict))); break; case "uploadfile": context.Response.Write(JsonSerializeHelper.SerializeObject(UploadFile(context, dict))); break; case "deleteuploadfile": context.Response.Write(JsonSerializeHelper.SerializeObject(DeleteUploadFile(context, dict))); break; //case "kanban": // context.Response.Write(JsonSerializeHelper.SerializeObject(Kanban(context))); // break; default: context.Response.Write(JsonSerializeHelper.SerializeObject(ExecuteMethod(dict["action"], dict))); break; } }