private void Sel_ByType(HttpContext context) { String jSonString = ""; ConfigsBO configsBO = new ConfigsBO(); int type = Convert.ToInt32(context.Request.QueryString["Type"]); bool disable = !String.IsNullOrEmpty(Convert.ToString(context.Request.QueryString["Disable"])) ? Convert.ToBoolean(context.Request.QueryString["Disable"]) : false; List<Configs> listConfigs = String.IsNullOrEmpty(Convert.ToString(context.Request.QueryString["Disable"])) ? configsBO.Sel_ByType(type) : configsBO.Sel_ByType(type, disable); if (listConfigs.Any()) { _converter.DateTimeFormat = "dd/MM/yyyy"; jSonString = JsonConvert.SerializeObject(listConfigs, _converter); } jSonString = "{\"data\":" + jSonString + "}"; context.Response.Write(jSonString); }