public List <DepartmentViewModel> Delegations()
        {
            var userService       = new UserService(context);
            var delegationService = new DelegationService(context);

            var user = userService.FindUserByEmail(System.Web.HttpContext.Current.User.Identity.Name);

            return(delegationService.FindDelegationsByDepartment(user).Select(delegation => new DepartmentViewModel() //only displays delegation from your department
                                                                                                                      //return delegationService.FindAllDelegations().Select(delegation => new DepartmentViewModel()
            {
                DelegationId = delegation.DelegationId,
                Recipient = delegation.Receipient != null ? delegation.Receipient.FirstName + " " + delegation.Receipient.LastName : "",
                StartDate = delegation.StartDate.ToShortDateString(),
                EndDate = delegation.EndDate.ToShortDateString(),
                DelegationStatus = delegation.Status.StatusId
            }).ToList());
        }