Example #1
0
        public IActionResult Create()
        {
            ViewBag.employees = _employeeService.GetAllEmployeesForPayroll();
            ViewBag.taxYears  = _payComputationService.GetAllTaxYear();
            var model = new PaymentRecordCreateViewModel();

            return(View(model));
        }
Example #2
0
        public IActionResult Create()                                         //We need the create action method, we start with the GET version
        {
            ViewBag.employees = _employeeService.GetallEmployeesForPayroll(); //This will render a selectable drop down list of all employees, we need to return the collection of employees as a select list item type
            ViewBag.taxYears  = _payComputationService.GetAllTaxYear();       //Retrieves all the tax years and passes that to the Viewbag
            var model = new PaymentRecordCreateViewModel();

            return(View(model));      //We need a view model, go to model and add a class, call the class PaymentRecordCreateViewModel
        }
        public IActionResult Create()
        {
            ViewBag.employees = _employeeService.GetAllEmployeesForPayroll();
            ViewBag.taxYears  = _payComputationService.GetAllTaxYear();
            ViewBag.paymonth  = DateTimeFormatInfo.CurrentInfo.MonthNames;
            var model = new PaymentRecordCreateViewModel();

            return(View(model));
        }