Exemple #1
0
        public ActionResult Index()
        {
            ViewBag.departments = _servies.CreateDeptList();
            _displayEmpViewModel.EmployeList = _servies.CreateEmployeeList();
            _displayEmpViewModel.DeptList    = ViewBag.departments;
            ViewBag.departments = _displayEmpViewModel.DeptList;

            return(View(_displayEmpViewModel));
        }
        // GET: DisplayEmployee
        public ActionResult Index()
        {
            _servies.CreateDeptList();
            _servies.CreateEmployeeList();

            _indexViewModel.EmployeList = _servies.EmployeeList;
            _indexViewModel.DeptList    = _servies.DepartmentsList;
            ViewBag.departments         = _servies.DepartmentsList;

            return(View(_indexViewModel));
        }