public static List <SelectListItem> GetTicketStatusByCompanyId(string userId) { var user = UserRepository.DetailsByKey(userId); var ticketStatuses = TicketStatus.GetStatusByCompanyIdList(user.CompanyId); var returnList = new List <SelectListItem>(); if (ticketStatuses != null) { returnList.AddRange(ticketStatuses.Select(status => new SelectListItem { Text = status.Name, Value = status.Id.ToString() })); } return(returnList); }
public ActionResult ReadStatus([DataSourceRequest] DataSourceRequest request) { var statusList = _ticketStatus.GetStatusByCompanyIdList(OperatingUser.CompanyId); return(Json(statusList.ToDataSourceResult(request))); }