private void EnsureStore()
        {
            if (HccApp.CurrentStore == null)
            {
                var store = HccApp.AccountServices.CreateAndSetupStore();
                if (store == null)
                {
                    throw new CreateStoreException("Could not create store");
                }

                HccApp.CurrentStore = store;

                HotcakesController.AddAdminPage(PortalSettings.Current.PortalId);

                var systemColumnsFilePath =
                    "~/DesktopModules/Hotcakes/Core/Admin/Parts/ContentBlocks/SystemColumnsData.xml";
                HccApp.ContentServices.Columns.CreateFromTemplateFile(systemColumnsFilePath);

                HccApp.OrderServices.EnsureDefaultZones(store.Id);
            }
        }
예제 #2
0
        protected void btnUninstall_Click(object sender, EventArgs e)
        {
            HotcakesController.Uninstall(chkDeleteModuleFiles.Checked, chkDeleteStoreFiles.Checked);

            Response.Redirect(HccUrlBuilder.RouteHccUrl(HccRoute.Home));
        }