public JsonResult ToList(string Filter, string Value) { TSS_QuestionBL qb = new TSS_QuestionBL(); var rec = qb.ToList(Filter, Value); return(Json(rec, JsonRequestBehavior.AllowGet)); }
public ActionResult WithQuestions(string Value) { List <TSS_Section> Sections = new List <TSS_Section>(); TSS_SectionBL sb = new TSS_SectionBL(); string[] val = Value.Split(','); foreach (var item in val) { TSS_Section sec = (item != "0") ? sb.ToSingle("By_SectionId", item) : null; if (sec != null) { TSS_QuestionBL qb = new TSS_QuestionBL(); sec.QuestionList = qb.ToList("GET_BY_SECTIONID", sec.SectionId.ToString()); Sections.Add(sec); } } return(Json(Sections, JsonRequestBehavior.AllowGet)); }