public JsonResult GetDistributorUsers(int?id) { AgentCLApprovedProvider agentCLApprovedProvider = new AgentCLApprovedProvider(); var result = new JsonResult(); IEnumerable <SelectListItem> lists = new SelectList(agentCLApprovedProvider.GetDistributorUsers(id), "AppUserId", "FullName"); result.Data = lists; result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; return(result); }
public JsonResult GetDistributorByBranchOfficeId(int?id) { AgentCLApprovedProvider agentCLApprovedProvider = new AgentCLApprovedProvider(); var result = new JsonResult(); IEnumerable <SelectListItem> lists = new SelectList(agentCLApprovedProvider.GetAllDistributorsByBranchOfficeId(id ?? 0), "DistributorId", "DistributorName"); result.Data = lists; result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; return(result); }