public ActionResult GetOwners() { EmployeeBll bll = new EmployeeBll(); var employees = bll.GetPagingEmployee( new PagingObject(1, int.MaxValue), string.Empty, 0, (int)StatusEnum.效); Dictionary <int, string> dic = new Dictionary <int, string>(); employees.ForEach(e => dic.Add(e.Bem_Id, e.Bem_Name)); var result = OptionFactory.CreateOptions(dic); return(Select2(result)); }
public ActionResult GetEmployees(EmployeeSearch employeeSearch) { try { List <DtoEmployee> employeeList = employeeBll.GetPagingEmployee(employeeSearch.Pagination, employeeSearch.AccountOrNameOrPhone, employeeSearch.Role, employeeSearch.Status); var table = AbhsTableFactory.Create(employeeList, employeeSearch.Pagination.TotalCount); return(Json(table, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new JsonSimpleResponse() { State = false, ErrorMsg = ex.Message })); } }