public void Load() { DepartmentList = new departmentList(); DepartmentList.Load(); AllEmployees = new employeeList (); AllEmployees.Load();//TODO: in real application make paging/sorting }
public EditEmployeeViewModel(int id) { DepartmentList = new departmentList(); DepartmentList.Load(); var EmployeeList = new employeeList(); Employee = EmployeeList.LoadId(id); }
public ActionResult DepartmentList() { try { departmentList dep = new departmentList(); dep.Load(); return(Json(new { ok = true, data = dep, message = "ok" })); } catch (Exception ex) { return(Json(new { ok = false, message = ex.Message })); } }
public void Initialize() { var DepartmentList = new departmentList(); DepartmentList.Load(); EmployeeListViewModel = new List <EditEmployeeViewModel>(); var EmployeeList = new employeeList(); EmployeeList.Load();//TODO: in real application make paging/sorting foreach (var item in EmployeeList) { EditEmployeeViewModel evm = new EditEmployeeViewModel(); evm.DepartmentList = DepartmentList; evm.Employee = item; EmployeeListViewModel.Add(evm); } }