public ActionResult Index() { PosSimTableViewModel model = new PosSimTableViewModel(); model.PosStatusSims = _posStatusSimService.GetAllPosStatusSims().PosStatusSims.Select(u => new SelectListItem() { Text = u.StatusName, Value = u.StatusId.ToString() }).ToList(); model.PosSimProviders = _posSimProviderService.GetAllPosSimProviders().PosSimProviders.Select(u => new SelectListItem() { Text = u.SimProviderName, Value = u.SimProviderId.ToString() }).ToList(); return(View("../Datatables/PosSimTable", model)); }
public JsonResult GetAllRows() { IEnumerable <PosStatusSimFlatViewModel> posStatusSims; posStatusSims = _posStatusSimService.GetAllPosStatusSims().PosStatusSims.ConvertToPosStatusSimFlatViewModels(); DataTableViewModel data = new DataTableViewModel(); data.draw = "1"; data.recordsTotal = posStatusSims.ToList().Count.ToString(); data.recordsFiltered = posStatusSims.ToList().Count.ToString(); data.data = posStatusSims.ToList <object>(); return(Json(data, JsonRequestBehavior.AllowGet)); }