public void ProcessRequest(HttpContext context) { GetData pp = new GetData(); List<Country> kk = pp.GetCountry(); JavaScriptSerializer ser = new JavaScriptSerializer(); context.Response.ContentType = "application/json"; context.Response.Write(ser.Serialize(kk)); }
public void ProcessRequest(HttpContext context) { var pp = context.Request["vid"]; String dd = ""; JavaScriptSerializer ser = new JavaScriptSerializer(); GetData pp2 = new GetData(); List<State> kk = pp2.GetState(pp); context.Response.ContentType = "application/json"; context.Response.Write(ser.Serialize(kk)); }
public void ProcessRequest(HttpContext context) { var pp2 = context.Request["vv"]; JavaScriptSerializer ser = new JavaScriptSerializer(); var pp = context.Request["vv"]; Email2 dd = ser.Deserialize<Email2>(pp2); GetData pp3 = new GetData(); Int32 kk =Convert.ToInt32( pp3.getACnt(dd.Email)); // JavaScriptSerializer ser = new JavaScriptSerializer(); context.Response.ContentType = "application/json"; context.Response.Write(ser.Serialize(kk)); }
public void ProcessRequest(HttpContext context) { string new_hash = ""; // string ccode = ConfigurationManager.AppSettings["ccode"]; string xcode = ConfigurationManager.AppSettings["xcode"]; JavaScriptSerializer ser = new JavaScriptSerializer(); var pp = context.Request["vv"]; Register dd = ser.Deserialize<Register>(pp); if (context.Request.Files.Count > 0) { var files = new List<string>(); // interate the files and save on the server foreach (string file in context.Request.Files) { if (file == "FileUpload") { var postedFile = context.Request.Files[file]; // var vfile = postedFile.FileName.Replace("\"", string.Empty).Replace("'", string.Empty); // vfile = Stp(vfile); // string FileName = context.Server.MapPath("~/admin/ag_docz/" + vfile); // dd.cac_file = "/images/" + vfile; // dd.cac_file = "admin/ag_docz/" + vfile; // postedFile.SaveAs(FileName); } if (file == "FileUpload2") { var postedFile = context.Request.Files[file]; } if (file == "FileUpload3") { var postedFile = context.Request.Files[file]; } // dd.File_path = "/Images/Patient/" + vfile; } } GetData gg = new GetData(); string sp = gg.addAgent(dd); Ipong.Classes.Retriever kp = new Ipong.Classes.Retriever(); // sendemail(dd.Email, dd.CompName, sp); try { // kp.updateRegistrationSysID4(sp, "PENDING"); } catch (Exception ee) { } context.Response.ContentType = "application/json"; context.Response.Write(ser.Serialize(sp)); }