示例#1
0
        public virtual void Init(MvcContext ctx)
        {
            if (ctx.utils.isEnd())
            {
                return;
            }

            initPrivate(ctx);

            if (ctx.app.obj != null)
            {
                // 检查app是否停用
                Type         appType   = ctx.app.obj.GetType();
                AppInstaller installer = new AppInstallerService().GetByType(appType);
                if (installer == null || installer.IsInstanceClose(ctx.owner.obj.GetType()))
                {
                    ctx.utils.endMsg("对不起,本app已经停用", HttpStatus.NotFound_404);
                    return;
                }

                if (InitHelperFactory.GetHelper(ctx).IsAppRunning(ctx) == false)       // 检查app是否属于暂停状态
                {
                    ctx.utils.endMsg(lang.get("exAppNotFound") + ": appType=" + appType + ", appId=" + ctx.app.Id, HttpStatus.NotFound_404);
                }
            }
        }
 public CmsInstallerBase()
 {
     installerService = new AppInstallerService();
     appService       = new UserAppService();
     menuService      = new UserMenuService();
     sectionService   = new ContentSectionService();
     tplService       = new ContentCustomTemplateService();
 }
示例#3
0
 public SiteLayoutController()
 {
     siteAppService             = new SiteAppService();
     siteAppService.menuService = new SiteMenuService();
     appInfoService             = new AppInstallerService();
     menuService     = new SiteMenuService();
     siteSkinService = new SiteSkinService();
 }
        public UserProfileController()
        {
            userService    = new UserService();
            userAppService = new UserAppService();
            appinfoService = new AppInstallerService();

            userTagService  = new UserTagService();
            currencyService = new CurrencyService();
        }
示例#5
0
        public UserHomeInstaller()
        {
            sectionService = new ContentSectionService();
            appService     = new UserAppService();
            menuService    = new UserMenuService();
            appinfoService = new AppInstallerService();

            lbl = lang.getByApp(typeof(ContentApp));
        }
示例#6
0
        public PermissionBackController()
        {
            SiteRoleService = new SiteRoleService();
            appInfoService  = new AppInstallerService();

            appService             = new SiteAppService();
            appService.menuService = new SiteMenuService();
            logService             = new SiteLogService();
        }
示例#7
0
        private static int getAppInfoId(String appName)
        {
            String       appType = strUtil.Append(appName, "App");
            AppInstaller appInfo = new AppInstallerService().GetByTypeName(appType);

            if (appInfo != null)
            {
                return(appInfo.Id);
            }
            return(-1);
        }
示例#8
0
        public void Init(MvcContext ctx)
        {
            if (ctx.utils.isEnd())
            {
                return;
            }

            initPrivate(ctx);

            if (ctx.app.obj != null)
            {
                // 检查app是否停用
                Type         appType   = ctx.app.obj.GetType();
                AppInstaller installer = new AppInstallerService().GetByType(appType);
                if (installer == null || installer.IsInstanceClose(ctx.owner.obj.GetType()))
                {
                    ctx.utils.endMsg("对不起,本app已经停用", HttpStatus.NotFound_404);
                    return;
                }


                InitHelperFactory.GetHelper(ctx).IsAppRunning(ctx);     // 检查app是否属于暂停状态
            }
        }
示例#9
0
 public AppBaseController()
 {
     appinfoService = new AppInstallerService();
     themeService   = new ThemeService();
 }
示例#10
0
 public SiteAppService()
 {
     menuService    = new SiteMenuService();
     appInfoService = new AppInstallerService();
 }