public static string DisplayTitle(this VacationState state) { switch (state) { case VacationState.Draft: return("Draft"); case VacationState.Submitted: return("Submitted"); case VacationState.Approved: return("Approved"); case VacationState.InProgress: return("InProgress"); case VacationState.Closed: return("Closed"); } return(null); }
public Vacation(int employee, string fullname, DateTimeOffset startdate, DateTimeOffset enddate, VacationType type, VacationState status) { EmployeeId = employee; EmployeeFullName = fullname; StartDate = startdate; EndDate = enddate; VacationTypeId = type.Id; VacationType = type; VacationStatusId = (int)status; CreatedOn = DateTimeOffset.Now; }
public bool Filter(VacationState state, VacantionRequestFilterType filterType) => _filterMap[filterType].Contains(state);