public virtual ActionResult GetListSpecialEducationforRequest(long requestId) { try { var comision = _baseInfoComissionCouncilService.GetAllSpecialEducationforRequest(requestId); var ja = comision.Select(item => new JObject { { "value", item.Id }, { "text", item.Name } //{"checked",comision.Any(c=>c.Id== item.Id)} }).ToList(); return(Content(JsonConvert.SerializeObject(ja), "application/json")); } catch (Exception) { return(Json(new { isError = true, Message = "خطا در بارگزاری درخواست ها!" })); } }
public virtual ActionResult GetListSpecialEducationforRequest(long requestId) { try { var specialEducation = _baseInfoComissionCouncilService.GetAllSpecialEducation(); var comision = _baseInfoComissionCouncilService.GetAllSpecialEducationforRequest(requestId); var ja = specialEducation.Select(item => new JObject { { "value", item.Id }, { "text", item.Name }, { "checked", comision.Any(c => c.Id == item.Id) } }).ToList(); //JObject jo = new JObject {{"total", specialEducation.Count}, {"rows", ja}}; return(Content(JsonConvert.SerializeObject(ja), "application/json")); } catch (Exception exception) { Elmah.ErrorSignal.FromCurrentContext().Raise(exception); return(Json(new { isError = true, Message = "خطا در بارگزاری درخواست ها!" })); } }