示例#1
0
        private TemplatePageViewModel GetTemplatesPageViewModel()
        {
            var havePermission = SetViewBagGlobalPermissionAndCheckAny(ActionEnum.GCMIndicatorTemplateWritePermission);

            TemplatePageViewModel result = null;

            if (havePermission)
            {
                result = new TemplatePageViewModel()
                {
                    ControllerName = base.ControllerName
                };

                var response = _fundService.GetTemplates();
                SetViewBagErrorMessageInvalidResponse(response);
                result.Templates = response.Templates;
            }
            else
            {
                ViewBag.ErrorMessage = Localization.GetText(FRIENDLY_PERMISSION_ERROR);
            }

            return(result);
        }