public void Load()
 {
     DepartmentList = new departmentList();
     DepartmentList.Load();
     AllEmployees = new employeeList ();
     AllEmployees.Load();//TODO: in real application make paging/sorting
 }
Ejemplo n.º 2
0
        public EditEmployeeViewModel(int id)
        {
            DepartmentList = new departmentList();
            DepartmentList.Load();
            var EmployeeList = new employeeList();

            Employee = EmployeeList.LoadId(id);
        }
Ejemplo n.º 3
0
        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 }));
            }
        }
Ejemplo n.º 4
0
        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);
            }
        }