public async Task AdditionalDaysAddAdditionalDays(ApplicationAdditionalDays additionalDays) { var additional = new AdditionalDaysEntity() { AdditionalDaysReason = additionalDays.AdditionalDaysReason, AdditionalDaysNumberOfAdditionalDays = additionalDays.AdditionalDaysNumberOfDays, }; await AdditionalDaysWorkflow.AdditionalDaysInsert(additionalDays.EmployeeUID, additional); }
public async Task <ApplicationAdditionalDays> AdditionalDaysGetAdditionalDay(Guid additionalDayUID) { var additionalDays = await AdditionalDaysWorkflow.AdditionalDaysGetAdditionalDay(additionalDayUID); ApplicationAdditionalDays toReturn = new ApplicationAdditionalDays() { AdditionalDaysNumberOfDays = additionalDays.AdditionalDaysNumberOfAdditionalDays, AdditionalDaysReason = additionalDays.AdditionalDaysReason }; return(toReturn); }
public async Task <ActionResult> AddAdditionalDays(AddAdditionalDaysModel model) { if (!ModelState.IsValid) { return(View("AddAdditionalDaysView", model)); } var additionalDays = new ApplicationAdditionalDays() { EmployeeUID = model.EmployeeUID, AdditionalDaysNumberOfDays = (int)model.AdditionalDaysNumberOfDays, AdditionalDaysReason = model.AdditionalDaysReason }; await ApplicationService.AdditionalDaysService.AdditionalDaysAddAdditionalDays(additionalDays); return(View("Success", model)); }