using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace LYFZ.WeixinServers.WeiXinAPP.Api { /// /// SatisfactionHandler 的摘要说明 /// public class SatisfactionHandler : IHttpHandler { public void ProcessRequest(HttpContext context) { string type = context.Request["type"]; switch(type) { case "VarSatisfactionOnclick": GetWeiXinSatisfactionData(context); break; } } private void GetWeiXinSatisfactionData(HttpContext context) { string cusId = context.Request["cusid"]; string strItemText = context.Request["ItemText"]; string strItemValue = context.Request["ItemValue"]; string strViceItemValue = context.Request["ViceItemValue"]; if (string.IsNullOrEmpty(cusId) || string.IsNullOrEmpty(cusId.Trim())) { Print(context, ""); return; } LYFZ.WeixinServiceDate.Model.Model_CustomerInterfaces cusModel = LYFZ.WeixinServers.Global.GetCustomerModelById(cusId); string getText = LYFZ.WinAPI.HttpClientHelper.GetResponse(cusModel.GetRequestUrl() + "/WebMobile/AjaxUpdate/AjaxUpdate.ashx?type=VarSatisfactionOnclick&strText=" + strItemText + "&strValue=" + strItemValue + "&strViceValue=" + strViceItemValue ); Print(context, getText); } public void Print(HttpContext context,string msg) { context.Response.ContentType = "text/plain"; context.Response.Write(msg); } public bool IsReusable { get { return false; } } } }