Exemplo n.º 1
0
        public IActionResult Edit(Guid id)
        {
            // Get the holiday from the EmployeeManagement
            var leave = _employee.GetByLeaveId(id);

            // build the view model
            var leaveViewModel = new LeaveViewModel()
            {
                FromDate    = leave.FromDate,
                ToDate      = leave.ToDate,
                LeaveType   = leave.LeaveType,
                Reason      = leave.Reason,
                LeaveStatus = leave.LeaveStatus,
                LeaveId     = id
            };


            // send the view model
            ViewBag.IsEditing = true;
            return(View("Form", leaveViewModel));
        }