Example #1
0
        public ActionResult Index(long?uid)
        {
            var userInformationView = new UserInformationViewModel
            {
                UserTypeList         = new SelectList(_userTypeService.GetAll(), "Id", "Name"),
                RoleList             = new SelectList(_roleService.GetAll(), "Id", "Name"),
                EmployeeCategoryList = new SelectList(_employeeCategoryService.GetAll(), "Id", "Name"),
                EmployeeList         = new SelectList(string.Empty, "Id", "EmployeeCode"),
            };

            return(View(userInformationView));
        }
        public ActionResult Index(long?eid)
        {
            var countryList = _countryService.GetAll().ToList();

            Session["CountryList"] = countryList;
            var employeeList = _emplyeeService.GetAll().ToList();

            var employeeView = new EmployeeViewModel
            {
                EmployeeCategoryList = new SelectList(_employeeCategoryService.GetAll(), "Id", "Name"),
                DepartmentList       = new SelectList(_departmentService.GetAll(), "Id", "Name"),
                DesignationList      = new SelectList(_designationService.GetAll(), "Id", "Name"),
                RosterList           = new SelectList(_rosterInformationService.GetAll(), "Id", "Name"),
                SupervisorList       = new SelectList(employeeList, "Id", "EmployeeCode"),
                ApproverList         = new SelectList(employeeList, "Id", "EmployeeCode"),

                TitleList         = new SelectList(_personalInformationService.GetTitleList()),
                GenderList        = new SelectList(_personalInformationService.GetGenderList(), "Value", "Text"),
                MaritalStatusList = new SelectList(_personalInformationService.GetMaritalStatusList(), "Value", "Text")
            };

            return(View(employeeView));
        }
Example #3
0
        public ActionResult List([DataSourceRequest] DataSourceRequest request)
        {
            var employeeCategoryList = _employeeCategoryService.GetAll();

            return(Json(employeeCategoryList.ToDataSourceResult(request)));
        }