Example #1
0
        public virtual ActionResult AuthorizeAll(int delegationId = 0)
        {
            AuthorizationAllViewModel responseModel;

            if (delegationId == 0)
            {
                var response = new MW.Application.AdministrationModule.Messages.DelegationService
                               .GetListTableDelegatorResponse
                {
                    IsValid          = true,
                    UnavailableDates = new List <DateTime>()
                };

                responseModel = _authorizeAllViewModelMapperHelper
                                .AuthorizeAllToViewModel(response);
                responseModel.OtherReasonId = _delegationService.GetOtherReason();
            }
            else
            {
                responseModel = AuthorizeAllData(delegationId);
            }

            responseModel.AuthorizationAllView.DisplayOptions =
                _viewModelMapperHelper.GetDisplayedOptions();

            return(View(responseModel));
        }