public ActionResult SaveStatus(DepartmentViewModel model)
        {
            statusService     = new StatusService(context);
            delegationService = new DelegationService(context);

            bool       status     = false;
            Delegation delegation = delegationService.FindDelegationByDelegationId(model.DelegationId);

            delegation.Status = statusService.FindStatusByStatusId(model.DelegationStatus);
            //delegation.UpdatedBy = user;
            delegation.CreatedBy       = userService.FindUserByEmail(CurrentUserName);
            delegation.UpdatedDateTime = DateTime.Now;

            if (delegationService.DelegateManager(delegation) != null)
            {
                status = true;
            }

            return(new JsonResult {
                Data = new { status = status }
            });
        }