Beispiel #1
0
    protected override void OnPreInit(EventArgs e)
    {
        // Page is used for creating and editing global and site tasks
        string elementName = null;

        if (TaskID == 0)
        {
            elementName = "NewTask";
        }
        else if (TaskInfo == null)
        {
            RedirectToInformation("editedobject.notexists");
        }
        else if (TaskInfo.TaskType == ScheduledTaskTypeEnum.Standard)
        {
            elementName = "EditTask";
        }
        else
        {
            elementName = "EditSystemTask";
        }

        var uiElement = new UIElementAttribute("CMS.ScheduledTasks", elementName);

        uiElement.Check(this);

        base.OnPreInit(e);
    }
    protected override void OnPreInit(EventArgs e)
    {
        SetDiscountType();

        string elementName = "";

        switch (DiscountType)
        {
        case DiscountApplicationEnum.Products:
            elementName = "CatalogDiscounts";
            break;

        case DiscountApplicationEnum.Order:
            elementName = "OrderDiscounts";
            break;

        case DiscountApplicationEnum.Shipping:
            elementName = "ShippingDiscounts";
            break;
        }

        // Check UI personalization
        var uiElement = new UIElementAttribute(ModuleName.ECOMMERCE, elementName);

        uiElement.Check(this);

        base.OnPreInit(e);
    }
Beispiel #3
0
    protected override void OnPreInit(EventArgs e)
    {
        var uiElement = new UIElementAttribute(ModuleName.PERMISSIONS, "Permissions");

        uiElement.Check(this);

        base.OnPreInit(e);
    }
    protected override void OnPreInit(EventArgs e)
    {
        string elementName = (SiteID > 0) ? "EventLog" : "Administration.EventLog";
        var uiElement = new UIElementAttribute(EventLogInfo.OBJECT_TYPE, elementName);
        uiElement.Check(this);

        base.OnPreInit(e);
    }
    protected override void OnPreRender(EventArgs e)
    {
        string elementName = (ServiceID == 0) ? "Development.NewTranslationService" : "Development.EditTranslationService";
        var uiElement = new UIElementAttribute("CMS.TranslationServices", elementName);
        uiElement.Check(this);

        base.OnPreRender(e);
    }
Beispiel #6
0
    protected override void OnPreRender(EventArgs e)
    {
        string elementName = (ServiceID == 0) ? "Development.NewTranslationService" : "Development.EditTranslationService";
        var    uiElement   = new UIElementAttribute("CMS.TranslationServices", elementName);

        uiElement.Check(this);

        base.OnPreRender(e);
    }
Beispiel #7
0
    protected override void OnPreInit(EventArgs e)
    {
        string elementName = (SiteID > 0) ? "EventLog" : "Administration.EventLog";
        var    uiElement   = new UIElementAttribute(EventLogInfo.OBJECT_TYPE, elementName);

        uiElement.Check(this);

        base.OnPreInit(e);
    }
    protected override void OnPreInit(EventArgs e)
    {
        CheckExploreTreePermission();

        // New UI element
        var newElement = new UIElementAttribute(ModuleName.CONTENT, "New", false, true);
        newElement.Check(this);

        base.OnPreInit(e);
    }
Beispiel #9
0
    protected override void OnInit(EventArgs e)
    {
        ScriptHelper.RegisterLoader(Page);

        base.OnInit(e);
        IsProductOption = OptionCategoryID > 0;

        newObjectSiteId = ConfiguredSiteID;

        if (IsProductOption)
        {
            CheckUIElementAccessHierarchical(ModuleName.ECOMMERCE, "ProductOptions.Options.General");

            // Initialize creation of a new product option
            GlobalObjectsKeyName = ECommerceSettings.ALLOW_GLOBAL_PRODUCT_OPTIONS;
            if (OptionCategory != null)
            {
                // A new product option will be bound to the same site as the option category
                CheckEditedObjectSiteID(OptionCategory.CategorySiteID);
                newObjectSiteId = OptionCategory.CategorySiteID;
            }
        }
        else
        {
            // Initialize creation of a new product
            GlobalObjectsKeyName = ECommerceSettings.ALLOW_GLOBAL_PRODUCTS;

            if (IsProductsUI)
            {
                // Check explore tree permissions only in tree section (do not check Stand-alone SKU section)
                if (ParentNodeID > 0)
                {
                    CheckExploreTreePermission();
                }

                // Check content New permission
                var newElement = new UIElementAttribute(ModuleName.ECOMMERCE, "Products.Properties", false, true);
                newElement.Check(this);
            }
        }

        if (DisplayTypeSelection)
        {
            InitDocumentTypeSelection();
            DocumentManager.StopProcessing = true;
            productEditElem.StopProcessing = true;
        }
        else
        {
            InitProductEdit();
            docTypeElem.StopProcessing = true;
        }

        InitMasterPage();
    }
Beispiel #10
0
    protected override void OnPreInit(EventArgs e)
    {
        CheckExploreTreePermission();

        // New UI element
        var newElement = new UIElementAttribute(ModuleName.CONTENT, "New", false, true);

        newElement.Check(this);

        base.OnPreInit(e);
    }
    protected override void OnPreInit(EventArgs e)
    {
        var customerId  = QueryHelper.GetInteger("customerId", 0);
        var elementName = customerId == 0 ? "Orders" : "Customers.Orders";

        var uiElement = new UIElementAttribute(ModuleName.ECOMMERCE, elementName);

        uiElement.Check(this);

        base.OnPreInit(e);
    }
    protected override void OnPreInit(EventArgs e)
    {
        ((Panel)CurrentMaster.PanelBody.FindControl("pnlContent")).CssClass = String.Empty;

        SiteID = CurrentUser.CheckPrivilegeLevel(UserPrivilegeLevelEnum.GlobalAdmin) ? 0 : SiteContext.CurrentSiteID;

        // Set site id for the control
        prmhdrHeader.SiteID = SiteID;

        var uiElement = new UIElementAttribute(ModuleName.PERMISSIONS, "Permissions");
        uiElement.Check(this);

        base.OnPreInit(e);
    }
Beispiel #13
0
    protected override void OnPreInit(EventArgs e)
    {
        ((Panel)CurrentMaster.PanelBody.FindControl("pnlContent")).CssClass = String.Empty;

        SiteID = CurrentUser.CheckPrivilegeLevel(UserPrivilegeLevelEnum.GlobalAdmin) ? 0 : SiteContext.CurrentSiteID;

        // Set site id for the control
        prmhdrHeader.SiteID = SiteID;

        var uiElement = new UIElementAttribute(ModuleName.PERMISSIONS, "Permissions");

        uiElement.Check(this);

        base.OnPreInit(e);
    }
    /// <summary>
    /// Performs security and license check on <see cref="UIElementInfo"/>.
    /// </summary>
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        if (!mPageModes.Contains(ElementName))
        {
            RedirectToUINotAvailable();
        }

        var uiElement = new UIElementAttribute(DataProtectionModule.MODULE_NAME, ElementName, false, true);

        uiElement.Check(this);

        mOutputFormat = GetOutputFormat();

        LoadDataSubjectIdentifiersFilterControl();
    }
    protected void Page_Init(object sender, EventArgs e)
    {
        MessagesPlaceHolder = plcMess;

        string objectType  = string.Empty;
        string elementName = string.Empty;

        switch (QueryHelper.GetString("parameterName", string.Empty).ToLowerInvariant())
        {
        // It is banner
        case "bannerid":
            objectType  = BannerInfo.OBJECT_TYPE;
            elementName = "Report_1";
            break;

        // It is banner category
        case "bannercategoryid":
            objectType  = BannerCategoryInfo.OBJECT_TYPE;
            elementName = "Report";
            break;

        default:
            RedirectToInformation(GetString("bannermanagement.error.internal"));
            break;
        }


        // Check UI personalization
        var uiElement = new UIElementAttribute(ResourceName, elementName);

        uiElement.Check(this);

        // Check Reporting permissions
        CheckReportingAvailability();

        // Get the ID
        int id = QueryHelper.GetInteger("parameterValue", 0);

        SetEditedObject(ProviderHelper.GetInfoById(objectType, id), string.Empty);
    }
    protected void Page_Init(object sender, EventArgs e)
    {
        MessagesPlaceHolder = plcMess;

        string objectType = String.Empty;
        string elementName = String.Empty;

        switch (QueryHelper.GetString("parameterName", String.Empty).ToLowerCSafe())
        {
            // It is banner
            case "bannerid":
                objectType = BannerInfo.OBJECT_TYPE;
                elementName = "Report_1";
                break;

            // It is banner category
            case "bannercategoryid":
                objectType = BannerCategoryInfo.OBJECT_TYPE;
                elementName = "Report";
                break;

            default:
                RedirectToInformation(GetString("bannermanagement.error.internal"));
                break;
        }

        // Check UI personalization
        var uiElement = new UIElementAttribute(ResourceName, elementName);
        uiElement.Check(this);

        // Check Reporting permissions
        CheckReportingAvailability();

        // Get the ID
        int id = QueryHelper.GetInteger("parameterValue", 0);

        SetEditedObject(BaseAbstractInfoProvider.GetInfoById(objectType, id), String.Empty);
    }
    protected override void OnInit(EventArgs e)
    {
        ScriptHelper.RegisterLoader(Page);

        base.OnInit(e);
        IsProductOption = OptionCategoryID > 0;

        newObjectSiteId = ConfiguredSiteID;

        if (IsProductOption)
        {
            CheckUIElementAccessHierarchical(ModuleName.ECOMMERCE, "ProductOptions.Options.Edit");

            // Initialize creation of a new product option
            GlobalObjectsKeyName = ECommerceSettings.ALLOW_GLOBAL_PRODUCT_OPTIONS;
            if (OptionCategory != null)
            {
                // A new product option will be bound to the same site as the option category
                CheckEditedObjectSiteID(OptionCategory.CategorySiteID);
                newObjectSiteId = OptionCategory.CategorySiteID;
            }
        }
        else
        {
            // Initialize creation of a new product
            GlobalObjectsKeyName = ECommerceSettings.ALLOW_GLOBAL_PRODUCTS;

            if (IsProductsUI)
            {
                // Check explore tree permissions only in tree section (do not check Stand-alone SKU section)
                if (ParentNodeID > 0)
                {
                    CheckExploreTreePermission();
                }

                // Check content New permission
                var newElement = new UIElementAttribute(ModuleName.ECOMMERCE, "Products.Properties", false, true);
                newElement.Check(this);
            }
        }

        if (DisplayTypeSelection)
        {
            InitDocumentTypeSelection();
            DocumentManager.StopProcessing = true;
            productEditElem.StopProcessing = true;
        }
        else
        {
            InitProductEdit();
            docTypeElem.StopProcessing = true;
        }

        InitMasterPage();
    }
    protected override void OnPreInit(EventArgs e)
    {
        SetDiscountType();

        string elementName = "";
        switch (DiscountType)
        {
            case DiscountApplicationEnum.Products:
                elementName = "CatalogDiscounts";
                break;
            case DiscountApplicationEnum.Order:
                elementName = "OrderDiscounts";
                break;
            case DiscountApplicationEnum.Shipping:
                elementName = "ShippingDiscounts";
                break;
        }

        // Check UI personalization
        var uiElement = new UIElementAttribute(ModuleName.ECOMMERCE, elementName);
        uiElement.Check(this);

        base.OnPreInit(e);
    }
    protected override void OnPreInit(EventArgs e)
    {
        // Page is used for creating and editing global and site tasks
        string elementName = null;

        if (TaskID == 0)
        {
            elementName = "NewTask";
        }
        else if (TaskInfo == null)
        {
            RedirectToInformation("editedobject.notexists");
        }
        else if (TaskInfo.TaskType == ScheduledTaskTypeEnum.Standard)
        {
            elementName = "EditTask";
        }
        else
        {
            elementName = "EditSystemTask";
        }

        var uiElement = new UIElementAttribute("CMS.ScheduledTasks", elementName);
        uiElement.Check(this);

        base.OnPreInit(e);
    }