예제 #1
0
        protected void Page_Init(object sender, EventArgs e)
        {
            DataModel.DataModel.Initialize();

            //GlobalResourceFile = ModuleRootWebPath + "App_GlobalResources/Global.resx";
            GlobalResourceFile = string.Format("/DesktopModules/{0}/App_GlobalResources/Global.resx", ModuleConfiguration.FolderName);

            storeContext = new StoreContext(Request);
            storeUrls    = new StoreUrls(storeContext);

            RegisterJQuery();

            CheckDnnSiteUrlsConfig();
        }
예제 #2
0
        protected override void OnInit(System.EventArgs e)
        {
            base.OnInit(e);

            if (!IsEditable)
            {
                ContainerControl.Visible = false;
                return;
            }

            string controlPath          = GetCustomControlToLoad();
            StoreAdminModuleBase module = (StoreAdminModuleBase)LoadControl(controlPath);

            if (module != null)
            {
                // load the control into the placeholder
                module.ModuleConfiguration = ModuleConfiguration;
                module.ID = System.IO.Path.GetFileNameWithoutExtension(controlPath);

                plhUserControl.Controls.Add(module);

                List <AdminBreadcrumbLink> adminBreadcrumbs = module.GetBreadcrumbs();
                if (adminBreadcrumbs.Count > 0)
                {
                    StringBuilder breadcrumbs = new StringBuilder();
                    StoreContext  sc          = new StoreContext(Request);

                    StoreUrls urls = new StoreUrls(sc);
                    breadcrumbs.AppendFormat(@"<span><a href=""{0}"">Store Admin</a></span>", urls.Admin(DNNspot.Store.ModuleDefs.Admin.Views.AdminHome));
                    foreach (AdminBreadcrumbLink breadcrumbLink in adminBreadcrumbs)
                    {
                        breadcrumbs.Append(breadcrumbSeparator);
                        string crumb = string.IsNullOrEmpty(breadcrumbLink.Url) ? breadcrumbLink.Text : string.Format(@"<a href=""{0}"">{1}</a>", breadcrumbLink.Url, breadcrumbLink.Text);
                        breadcrumbs.AppendFormat(@"<span>{0}</span>", crumb);
                    }
                    litBreadcrumb.Text = breadcrumbs.ToString();
                }
                else
                {
                    litBreadcrumb.Text = @"<span style=""font-weight: bold; font-size: 14px;"">Store Administration and Management</span>";
                }
            }
        }
예제 #3
0
 public TokenHelper(StoreContext storeContext)
 {
     this.storeContext = storeContext;
     storeUrls         = new StoreUrls(storeContext);
 }
예제 #4
0
 public OrderController(StoreContext storeContext)
 {
     this.storeContext = storeContext;
     this.storeUrls    = new StoreUrls(storeContext);
 }
예제 #5
0
 public static string ConfirmDeleteImage(string urlForDeleteAction, string confirmMessage)
 {
     return(string.Format(@"<a href=""{0}"" onclick=""return confirm('{1}');"" title=""delete""><img src=""{2}images/icons/delete.png"" alt=""delete"" /></a>", urlForDeleteAction, confirmMessage, StoreUrls.GetModuleFolderUrlRoot()));
 }