private void Sel(HttpContext context) { String jSonString = ""; PermitsBO permitsBO = new PermitsBO(); bool disable = !String.IsNullOrEmpty(Convert.ToString(context.Request.QueryString["Disable"])) ? Convert.ToBoolean(context.Request.QueryString["Disable"]) : false; List<Permits> listPermits = String.IsNullOrEmpty(Convert.ToString(context.Request.QueryString["Disable"])) ? permitsBO.Sel() : permitsBO.Sel(disable); if (listPermits.Any()) { _converter.DateTimeFormat = "dd/MM/yyyy"; jSonString = JsonConvert.SerializeObject(listPermits, _converter); } jSonString = "{\"data\":" + jSonString + "}"; context.Response.Write(jSonString); }