public void ProcessRequest(HttpContext context) { //context.Response.ContentType = "text/plain"; context.Response.ContentType = "application/json"; using (PurProvider purProvider = new PurProvider()) { string venNo = context.Request.Form["VendorNo"]; var vendor = purProvider.GetVendor(venNo); if (vendor == null) { context.Response.Write("{\"success\":false,\"message\":\"" + "厂商代码不存在,或者该厂商已失效!" + "\"}"); } else { context.Response.Write("{\"success\":true,\"vendorName\":\"" + vendor["avnam"].ToString() + "\",\"curr\":\"" + vendor["avcur"].ToString() + "\"}"); } //context.Response.End(); } }