/// <summary> /// 获取JournalsConfig实例 /// </summary> public static JournalsConfig Instance() { ApplicationService applicationService = new ApplicationService(); ApplicationBase app = applicationService.Get(applicationId); if (app != null) return app.Config as JournalsConfig; else return null; }
public ActionResult ManageApplications() { pageResourceManager.InsertTitlePart("应用管理"); IEnumerable<ApplicationBase> applications = new ApplicationService().GetAll(); return View(applications); }
/// <summary> /// 获取BlogConfig实例 /// </summary> public static BlogConfig Instance() { ApplicationService applicationService = new ApplicationService(); ApplicationBase app = applicationService.Get(ApplicationIds.Instance().Blog()); if (app != null) return app.Config as BlogConfig; else return null; }
/// <summary> /// 自动安装专题的相关应用 /// </summary> /// <param name="sender"></param> /// <param name="eventArgs"></param> private void InstallApplicationsModule_After(TopicEntity sender, CommonEventArgs eventArgs) { ApplicationService applicationService = new ApplicationService(); if (eventArgs.EventOperationType == EventOperationType.Instance().Create()) { applicationService.InstallApplicationsOfPresentAreaOwner(PresentAreaKeysOfExtension.TopicSpace, sender.TopicId); } else if (eventArgs.EventOperationType == EventOperationType.Instance().Delete()) { applicationService.DeleteApplicationsOfPresentAreaOwner(PresentAreaKeysOfExtension.TopicSpace, sender.TopicId); } }
/// <summary> /// 自动安装群组的相关应用 /// </summary> /// <param name="sender"></param> /// <param name="eventArgs"></param> private void InstallApplicationsModule_After(GroupEntity sender, CommonEventArgs eventArgs) { ApplicationService applicationService = new ApplicationService(); if (eventArgs.EventOperationType == EventOperationType.Instance().Create()) { applicationService.InstallApplicationsOfPresentAreaOwner(PresentAreaKeysOfBuiltIn.GroupSpace, sender.GroupId); } else if (eventArgs.EventOperationType == EventOperationType.Instance().Delete()) { applicationService.DeleteApplicationsOfPresentAreaOwner(PresentAreaKeysOfBuiltIn.GroupSpace, sender.GroupId); } }
public ActionResult ManageUserRoles(int? pageIndex) { pageResourceManager.InsertTitlePart("后台管理-用户角色管理"); IEnumerable<Role> roles = roleService.GetRoles(); IEnumerable<ApplicationBase> applications = new ApplicationService().GetAll(); ViewData["applications"] = applications; return View(roles); }