protected void Page_Load(object sender, EventArgs e)
    {
        mShippingExtensionID = QueryHelper.GetInteger("shippingExtensionID", 0);
        hdrActions.ActionsList.Add(new HeaderAction()
        {
            //Text = GetString("COM_ShippingOption_List.NewItemCaption"),
            Text        = "Add a country",
            RedirectUrl = ResolveUrl("ShippingExtension_AddCountry.aspx?shippingExtensionID=" + mShippingExtensionID),
            ImageUrl    = GetImageUrl("Objects/CMS_Country/add.png"),
            ControlType = HeaderActionTypeEnum.LinkButton
        });
        GetAndUpdateCustomTableQueryItem();
        // Initializes page title and breadcrumbs
        string shippingExtensionName = GetShippingOptionName(mShippingExtensionID.ToString());

        string[,] breadcrumbs = new string[2, 3];
        breadcrumbs[0, 0]     = "Shipping Extension";
        breadcrumbs[0, 1]     = "~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_List.aspx";
        breadcrumbs[0, 2]     = "configEdit";
        breadcrumbs[1, 0]     = shippingExtensionName;
        breadcrumbs[1, 1]     = "";
        breadcrumbs[1, 2]     = "";

        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.Title.Breadcrumbs = breadcrumbs;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        GetShippingOptionName(mShippingExtensionPricingID.ToString());
        string[,] breadcrumbs = new string[4, 3];
        breadcrumbs[0, 0]     = "Shipping Extension";
        breadcrumbs[0, 1]     = "~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_List.aspx";
        breadcrumbs[0, 2]     = "configEdit";
        breadcrumbs[1, 0]     = ShippingOptionDisplayName;
        breadcrumbs[1, 1]     = string.Format("~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_Edit_Country.aspx?shippingExtensionID={0}", mShippingOptionID.ToString());
        breadcrumbs[1, 2]     = "configEdit";
        breadcrumbs[2, 0]     = ShippingCountryDisplayName;
        breadcrumbs[2, 1]     = string.Format("~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_Edit_Pricing.aspx?ItemID={0}", mShippingExtensionPricingID.ToString());
        breadcrumbs[2, 2]     = "configEdit";
        breadcrumbs[3, 0]     = "Add price";
        breadcrumbs[3, 1]     = "";
        breadcrumbs[3, 2]     = "";


        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.Title.Breadcrumbs = breadcrumbs;
        txtShippingUnitFrom.Text = NextShippingUnit.ToString();

        if (NextShippingUnit == 0)
        {
            txtPrice.Enabled            = false;
            txtShippingUnitFrom.Enabled = false;
            txtShippingUnitTo.Enabled   = false;
            btnOk.Enabled            = false;
            txtShippingUnitFrom.Text = string.Empty;
            ShowError("Unable to add more price, ShippingUnit upper limit reached");
        }
    }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        taxClassId = QueryHelper.GetInteger("taxclassid", 0);
        bool hideBreadcrumbs = QueryHelper.GetBoolean("hidebreadcrumbs", false);

        string       taxClassName = "";
        TaxClassInfo tc           = TaxClassInfoProvider.GetTaxClassInfo(taxClassId);

        if (tc != null)
        {
            CheckEditedObjectSiteID(tc.TaxClassSiteID);
            taxClassName = ResHelper.LocalizeString(tc.TaxClassDisplayName);
        }

        // initializes page title
        string[,] pageTitleTabs = new string[2, 3];
        pageTitleTabs[0, 0]     = GetString("TaxClass_Edit.ItemListLink");
        pageTitleTabs[0, 1]     = "~/CMSModules/Ecommerce/Pages/Tools/Configuration/TaxClasses/TaxClass_List.aspx?siteId=" + SiteID;
        pageTitleTabs[0, 2]     = "_parent";
        pageTitleTabs[1, 0]     = taxClassName;
        pageTitleTabs[1, 1]     = "";
        pageTitleTabs[1, 2]     = "";

        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        if (!hideBreadcrumbs)
        {
            master.Title.Breadcrumbs = pageTitleTabs;
        }

        master.Tabs.OnTabCreated += Tabs_OnTabCreated;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        GetShippingOptionName(mShippingExtensionPricingID.ToString());
        string[,] breadcrumbs = new string[4, 3];
        breadcrumbs[0, 0]     = "Shipping Extension";
        breadcrumbs[0, 1]     = "~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_List.aspx";
        breadcrumbs[0, 2]     = "configEdit";
        breadcrumbs[1, 0]     = ShippingOptionDisplayName;
        breadcrumbs[1, 1]     = string.Format("~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_Edit_Country.aspx?shippingExtensionID={0}", mShippingOptionID.ToString());
        breadcrumbs[1, 2]     = "configEdit";
        breadcrumbs[2, 0]     = ShippingCountryDisplayName;
        breadcrumbs[2, 1]     = string.Format("~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_Edit_Pricing.aspx?ItemID={0}", mShippingExtensionPricingID.ToString());
        breadcrumbs[2, 2]     = "configEdit";
        breadcrumbs[3, 0]     = "Edit price";
        breadcrumbs[3, 1]     = "";
        breadcrumbs[3, 2]     = "";


        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.Title.Breadcrumbs = breadcrumbs;

        txtShippingUnitTo.Text   = mShippingUnitTo.ToString();
        txtShippingUnitFrom.Text = mShippingUnitFrom.ToString();
        if (!IsPostBack)
        {
            txtPrice.Text = price.ToString();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        CountryGrid.DataSource     = GetDataSource();
        CountryGrid.OnAction      += OnAction;
        ShippingCountryDisplayName = CountryInfoProvider.GetCountryInfo(mShippingExtensionCountryID).CountryDisplayName;
        string[,] breadcrumbs      = new string[3, 3];
        breadcrumbs[0, 0]          = "Shipping Extension";
        breadcrumbs[0, 1]          = "~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_List.aspx";
        breadcrumbs[0, 2]          = "configEdit";
        breadcrumbs[1, 0]          = "Country view summary";
        breadcrumbs[1, 1]          = "~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_CountryView.aspx";
        breadcrumbs[1, 2]          = "configEdit";
        breadcrumbs[2, 0]          = ShippingCountryDisplayName;
        breadcrumbs[2, 1]          = "";
        breadcrumbs[2, 2]          = ""; /*
                                          * breadcrumbs[3, 0] = "Edit price";
                                          * breadcrumbs[3, 1] = "";
                                          * breadcrumbs[3, 2] = "";*/


        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.Title.Breadcrumbs = breadcrumbs;

        if (!IsPostBack)
        {
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        CountryGrid.DataSource           = ConnectionHelper.GetConnection().ExecuteQuery("customtable.shippingextensioncountry.ListOfShippers", null);
        CountryGrid.OnAction            += OnAction;
        CountryGrid.OnExternalDataBound += new CMS.UIControls.OnExternalDataBoundEventHandler(userGrid_OnExternalDataBound);


        GetShippingOptionName(mShippingExtensionPricingID.ToString());
        string[,] breadcrumbs = new string[2, 3];
        breadcrumbs[0, 0]     = "Shipping Extension";
        breadcrumbs[0, 1]     = "~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_List.aspx";
        breadcrumbs[0, 2]     = "configEdit";
        breadcrumbs[1, 0]     = "Country view summary";
        breadcrumbs[1, 1]     = "";
        breadcrumbs[1, 2]     = "";

        /*
         * breadcrumbs[2, 0] = ShippingCountryDisplayName;
         * breadcrumbs[2, 1] = string.Format("~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_Edit_Pricing.aspx?ItemID={0}", mShippingExtensionPricingID.ToString());
         * breadcrumbs[2, 2] = "configEdit";
         * breadcrumbs[3, 0] = "Edit price";
         * breadcrumbs[3, 1] = "";
         * breadcrumbs[3, 2] = "";*/


        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.Title.Breadcrumbs = breadcrumbs;

        if (!IsPostBack)
        {
        }
    }
예제 #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Node != null)
        {
            if (!IsAuthorizedToModifyDocument())
            {
                // Disable form editing
                chkMarkDocAsProd.Enabled = false;
            }
        }

        // Ensure page with changes saved message is loaded initially if required
        if (QueryHelper.GetInteger("saved", 0) == 1)
        {
            this.CurrentMaster.Tabs.StartPageURL = "Product_Edit_General.aspx" + URLHelper.Url.Query;
        }

        CMSMasterPage master = (CMSMasterPage)this.CurrentMaster;

        master.Tabs.OnTabCreated += new UITabs.TabCreatedEventHandler(Tabs_OnTabCreated);
        master.Tabs.UrlTarget     = "ProductContent";
        master.Tabs.ModuleName    = "CMS.Content";
        master.Tabs.ElementName   = "Product";

        master.DisplaySiteSelectorPanel = true;

        string confirmationScript = "if (confirm(" + ScriptHelper.GetString(GetString("com.product.contentconfirmation")) + ")) { " + this.Page.ClientScript.GetPostBackEventReference(this.chkMarkDocAsProd, null) + " } return false;";

        this.chkMarkDocAsProd.Attributes.Add("onclick", confirmationScript);
    }
예제 #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CMSMasterPage currentMaster = Page.Master as CMSMasterPage;

        if (FullscreenMode)
        {
            txtCode.TopOffset = 40;
        }

        // Check master page
        if (currentMaster == null)
        {
            throw new Exception("Page using this control must have CMSMasterPage master page.");
        }

        txtCode.Editor.Width    = new Unit("99%");
        txtCode.Editor.Height   = new Unit("300px");
        txtCode.NamespaceUsings = new List <string> {
            "Transformation"
        };

        // transformation.{classid}.{isascx}
        string resolverName = "transformation." + ClassID + "." + "false";

        txtCode.ResolverName   = resolverName;
        tbWysiwyg.ResolverName = resolverName;

        SetEditor();
    }
예제 #9
0
    /// <summary>
    /// Initializes master page elements.
    /// </summary>
    private void InitializeMasterPage()
    {
        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.Tabs.OnTabCreated           += Tabs_OnTabCreated;
        master.Tabs.OpenTabContentAfterLoad = !QueryHelper.GetBoolean("onlyRefresh", false);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string currentDiscountCoupon = "";

        mDiscountId = QueryHelper.GetInteger("discountid", 0);
        if (mDiscountId > 0)
        {
            DiscountCouponInfo discountCouponObj = DiscountCouponInfoProvider.GetDiscountCouponInfo(mDiscountId);
            if (discountCouponObj != null)
            {
                editedSiteId = discountCouponObj.DiscountCouponSiteID;

                // Check if edited object belongs to configured site
                CheckEditedObjectSiteID(editedSiteId);

                currentDiscountCoupon = ResHelper.LocalizeString(discountCouponObj.DiscountCouponDisplayName);
            }
        }

        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        // Initializes page title breadcrumbs control
        string[,] breadcrumbs           = new string[2, 3];
        breadcrumbs[0, 0]               = GetString("DiscounCoupon_Edit.ItemListLink");
        breadcrumbs[0, 1]               = "~/CMSModules/Ecommerce/Pages/Tools/DiscountCoupons/DiscountCoupon_List.aspx?siteId=" + SiteID;
        breadcrumbs[0, 2]               = "ecommerceContent";
        breadcrumbs[1, 0]               = FormatBreadcrumbObjectName(currentDiscountCoupon, editedSiteId);
        breadcrumbs[1, 1]               = "";
        breadcrumbs[1, 2]               = "";
        CurrentMaster.Title.Breadcrumbs = breadcrumbs;

        // Tabs
        master.Tabs.OnTabCreated += Tabs_OnTabCreated;
    }
예제 #11
0
    /// <summary>
    /// Initializes the master page elements.
    /// </summary>
    /// <param name="titleImage">Title of the page title element</param>
    /// <param name="titleText">URL of the image of the page title element</param>
    private void IntializeMasterPage(string titleImage, string titleText)
    {
        CMSMasterPage master = (CMSMasterPage)this.CurrentMaster;

        // Set the master page title
        master.Title.HelpTopicName = "general_tab15";
        master.Title.HelpName      = "helpTopic";

        master.Tabs.OnTabCreated += new UITabs.TabCreatedEventHandler(Tabs_OnTabCreated);
        master.Tabs.UrlTarget     = "ProductContent";
        if (optionCategoryId > 0)
        {
            master.Tabs.ModuleName  = "CMS.Ecommerce";
            master.Tabs.ElementName = "ProductOptions.Options";
        }
        else
        {
            master.Tabs.ModuleName  = "CMS.Ecommerce";
            master.Tabs.ElementName = "Products";
        }

        // Set master title
        master.Title.TitleText  = titleText;
        master.Title.TitleImage = titleImage;
    }
예제 #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        departmentId = QueryHelper.GetInteger("departmentId", 0);

        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        string         currentDepartmentName = string.Empty;
        DepartmentInfo di = DepartmentInfoProvider.GetDepartmentInfo(departmentId);

        if (di != null)
        {
            editedSiteId = di.DepartmentSiteID;

            // Check site id
            CheckEditedObjectSiteID(editedSiteId);
            currentDepartmentName = ResHelper.LocalizeString(di.DepartmentDisplayName);
        }

        // initializes page title
        string[,] breadcrumbs = new string[2, 3];
        breadcrumbs[0, 0]     = GetString("Department_Edit.ItemListLink");
        breadcrumbs[0, 1]     = "~/CMSModules/Ecommerce/Pages/Tools/Configuration/Departments/Department_List.aspx?siteId=" + SiteID;
        breadcrumbs[0, 2]     = "configEdit";
        breadcrumbs[1, 0]     = FormatBreadcrumbObjectName(currentDepartmentName, editedSiteId);
        breadcrumbs[1, 1]     = "";
        breadcrumbs[1, 2]     = "";

        master.Title.Breadcrumbs  = breadcrumbs;
        master.Tabs.OnTabCreated += Tabs_OnTabCreated;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        mShippingOptionId = QueryHelper.GetInteger("shippingOptionID", 0);

        string             shippingOptionName = "";
        ShippingOptionInfo soi = ShippingOptionInfoProvider.GetShippingOptionInfo(mShippingOptionId);

        if (soi != null)
        {
            editedSiteId = soi.ShippingOptionSiteID;

            // Check site ID
            CheckEditedObjectSiteID(editedSiteId);
            shippingOptionName = ResHelper.LocalizeString(soi.ShippingOptionDisplayName);
        }

        // Initializes page title and breadcrumbs
        string[,] breadcrumbs = new string[2, 3];
        breadcrumbs[0, 0]     = GetString("ShippingOption_EditHeader.ItemListLink");
        breadcrumbs[0, 1]     = "~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingOptions/ShippingOption_List.aspx?siteId=" + SiteID;
        breadcrumbs[0, 2]     = "configEdit";
        breadcrumbs[1, 0]     = FormatBreadcrumbObjectName(shippingOptionName, editedSiteId);
        breadcrumbs[1, 1]     = "";
        breadcrumbs[1, 2]     = "";

        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.Title.Breadcrumbs  = breadcrumbs;
        master.Tabs.OnTabCreated += Tabs_OnTabCreated;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        CMSMasterPage currentMaster = Page.Master as CMSMasterPage;

        if (FullscreenMode)
        {
            txtCode.TopOffset = 40;
        }

        // Check master page
        if (currentMaster == null)
        {
            throw new Exception("Page using this control must have CMSMasterPage master page.");
        }

        LabelsInit();

        txtCode.Editor.Width    = new Unit("99%");
        txtCode.Editor.Height   = new Unit("300px");
        txtCode.NamespaceUsings = new List <string> {
            "Transformation"
        };

        // transformation.{classid}.{isascx}
        string resolverName = "transformation." + ClassID + "." + IsAscx;

        txtCode.ResolverName   = resolverName;
        tbWysiwyg.ResolverName = resolverName;

        if (IsAscx)
        {
            DataClassInfo resolverClassInfo = DataClassInfoProvider.GetDataClassInfo(ClassID);
            if (resolverClassInfo != null)
            {
                if (resolverClassInfo.ClassIsCustomTable)
                {
                    txtCode.ASCXRootObject = CustomTableItem.New(resolverClassInfo.ClassName);
                }
                else if (resolverClassInfo.ClassIsDocumentType)
                {
                    txtCode.ASCXRootObject = TreeNode.New(resolverClassInfo.ClassName);
                }
                else
                {
                    txtCode.ASCXRootObject = ModuleManager.GetReadOnlyObjectByClassName(resolverClassInfo.ClassName);
                }
            }

            if (!RequestHelper.IsPostBack() && IsChecked)
            {
                ShowMessage();
            }
        }

        // Hide/Display CSS section
        plcCssLink.Visible = String.IsNullOrEmpty(txtCSS.Text.Trim());

        SetEditor();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.Tabs.OnTabCreated  += Tabs_OnTabCreated;
        master.PanelBody.CssClass += " Separator";
        master.SetRTL();

        AddMenuButtonSelectScript("Configuration", "");

        ScriptHelper.RegisterTitleScript(this, GetString("ecommerce.configuration"));
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string currentDiscount = "";

        // Get discountlLevel id from querystring
        mDiscountLevelId = QueryHelper.GetInteger("discountLevelId", 0);
        if (mDiscountLevelId > 0)
        {
            DiscountLevelInfo di = DiscountLevelInfoProvider.GetDiscountLevelInfo(mDiscountLevelId);

            if (di != null)
            {
                editedSiteId = di.DiscountLevelSiteID;
                // Check if edited object belongs to configured site
                CheckEditedObjectSiteID(editedSiteId);

                currentDiscount = ResHelper.LocalizeString(di.DiscountLevelDisplayName);
            }
        }

        CMSMasterPage master = (CMSMasterPage)this.CurrentMaster;

        int hideBreadcrumbs = QueryHelper.GetInteger("hidebreadcrumbs", 0);

        if (hideBreadcrumbs == 0)
        {
            // Initializes page title breadcrumbs control
            string[,] breadcrumbs    = new string[2, 3];
            breadcrumbs[0, 0]        = GetString("DiscountLevel_Edit.ItemListLink");
            breadcrumbs[0, 1]        = "~/CMSModules/Ecommerce/Pages/Tools/DiscountLevels/DiscountLevel_List.aspx?siteId=" + SiteID;
            breadcrumbs[0, 2]        = "ecommerceContent";
            breadcrumbs[1, 0]        = FormatBreadcrumbObjectName(currentDiscount, editedSiteId);
            breadcrumbs[1, 1]        = "";
            breadcrumbs[1, 2]        = "";
            master.Title.Breadcrumbs = breadcrumbs;
        }

        // Page title
        master.Title.HelpTopicName = "new_levelgeneral_tab";
        master.Title.HelpName      = "helpTopic";

        // Tabs
        master.Tabs.ModuleName    = "CMS.Ecommerce";
        master.Tabs.ElementName   = "DiscountLevels";
        master.Tabs.UrlTarget     = "DiscountLevelContent";
        master.Tabs.OnTabCreated += new UITabs.TabCreatedEventHandler(Tabs_OnTabCreated);

        // Set master title
        master.Title.TitleText  = GetString("com.discountlevel.edit");
        master.Title.TitleImage = GetImageUrl("Objects/Ecommerce_DiscountLevel/object.png");
    }
예제 #17
0
    protected void Page_Init(object sender, EventArgs e)
    {
        // Register save
        ComponentEvents.RequestEvents.RegisterForEvent(ComponentEvents.SAVE, (s, args) => Save(false));

        mCurrentMaster = Page.Master as CMSMasterPage;

        if (mCurrentMaster == null)
        {
            throw new Exception("Page using this control must have CMSMasterPage master page.");
        }

        txtQueryText.FullScreenParentElementID = "divContent";
    }
예제 #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CMSMasterPage master = (CMSMasterPage)this.CurrentMaster;

        master.Tabs.ModuleName     = "CMS.Ecommerce";
        master.Tabs.ElementName    = "Configuration";
        master.Tabs.UrlTarget      = "configEdit";
        master.Tabs.OnTabCreated  += new UITabs.TabCreatedEventHandler(Tabs_OnTabCreated);
        master.PanelBody.CssClass += " Separator";
        master.SetRTL();

        AddMenuButtonSelectScript("Configuration", "");

        ScriptHelper.RegisterTitleScript(this, GetString("ecommerce.configuration"));
    }
예제 #19
0
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);

        // Register script file
        ScriptHelper.RegisterScriptFile(Page, "cmsedit.js");

        selectedTab = DataHelper.GetNotEmpty(QueryHelper.GetString("tab", String.Empty).ToLowerCSafe(), ProductTabCode.ToString(UIContext.ProductTab).ToLowerCSafe());

        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.PanelBody.CssClass += " Separator";
        master.Tabs.OnTabCreated  += Tabs_OnTabCreated;
        master.SetRTL();
    }
예제 #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int newID = QueryHelper.GetInteger("shippingExtensionID", 0);

        if (newID != mShippingExtensionID)
        {
            iCountry.Clear();
        }
        mShippingExtensionID = newID;

        //mShippingExtensionID = QueryHelper.GetInteger("shippingExtensionID", 0);
        //GetAndUpdateCustomTableQueryItem();
        DisplayUpdatedCountries();
        CMSMasterPage master = (CMSMasterPage)CurrentMaster;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        bool hideBreadcrumbs = QueryHelper.GetBoolean("hidebreadcrumbs", false);

        // Get option category ID from querystring
        categoryId = QueryHelper.GetInteger("categoryID", 0);

        CMSMasterPage master = (CMSMasterPage)this.CurrentMaster;

        // Get localized option category name
        string             categName = "";
        OptionCategoryInfo categObj  = OptionCategoryInfoProvider.GetOptionCategoryInfo(categoryId);

        if (categObj != null)
        {
            categName    = ResHelper.LocalizeString(categObj.CategoryDisplayName);
            editedSiteId = categObj.CategorySiteID;

            // Check if edited object belongs to configured site
            CheckEditedObjectSiteID(editedSiteId);
        }

        if (!hideBreadcrumbs)
        {
            // Initializes page title control
            string[,] breadcrumbs = new string[2, 3];
            breadcrumbs[0, 0]     = GetString("optioncategory_edit.itemlistlink");
            breadcrumbs[0, 1]     = "~/CMSModules/Ecommerce/Pages/Tools/ProductOptions/OptionCategory_List.aspx?siteId=" + SiteID;
            breadcrumbs[0, 2]     = "ecommerceContent";
            breadcrumbs[1, 0]     = FormatBreadcrumbObjectName(categName, editedSiteId);
            breadcrumbs[1, 1]     = "";
            breadcrumbs[1, 2]     = "";
            this.CurrentMaster.Title.Breadcrumbs = breadcrumbs;
        }

        master.Title.HelpTopicName = "edit_option_category___general";
        master.Title.HelpName      = "helpTopic";

        master.Tabs.ModuleName              = "CMS.Ecommerce";
        master.Tabs.ElementName             = "ProductOptions";
        master.Tabs.UrlTarget               = "OptionCategoryEdit";
        master.Tabs.OnTabCreated           += new UITabs.TabCreatedEventHandler(Tabs_OnTabCreated);
        master.Tabs.OpenTabContentAfterLoad = false;

        // Set master title
        master.Title.TitleText  = GetString("com.optioncategory.edit");
        master.Title.TitleImage = GetImageUrl("Objects/Ecommerce_OptionCategory/object.png");
    }
예제 #22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CurrentMaster.DisplaySiteSelectorPanel = AllowGlobalObjects;
        GetAndUpdateCustomTableQueryItem();
        string[,] breadcrumbs = new string[2, 3];
        breadcrumbs[0, 0]     = "Shipping Extension";
        breadcrumbs[0, 1]     = "~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_List.aspx";
        breadcrumbs[0, 2]     = "configEdit";
        breadcrumbs[1, 0]     = "New shipping extension";
        breadcrumbs[1, 1]     = "";
        breadcrumbs[1, 2]     = "";

        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.Title.Breadcrumbs = breadcrumbs;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        hdrActions.ActionsList.Add(new HeaderAction()
        {
            //Text = GetString("COM_ShippingOption_List.NewItemCaption"),
            Text        = "Add price range",
            RedirectUrl = ResolveUrl("ShippingExtension_AddPrice.aspx?ItemID=" + mShippingExtensionPricingID),
            ImageUrl    = GetImageUrl("Objects/Ecommerce_ShippingOption/add.png"),
            ControlType = HeaderActionTypeEnum.LinkButton,
            Visible     = false
        });

        grdAction.ActionsList.Add(new HeaderAction()
        {
            //Text = GetString("COM_ShippingOption_List.NewItemCaption"),
            Text        = "Add a price",
            RedirectUrl = ResolveUrl("ShippingExtension_AddPrice.aspx?ItemID=" + mShippingExtensionPricingID),
            ImageUrl    = GetImageUrl("Objects/Ecommerce_ShippingOption/add.png"),
            ControlType = HeaderActionTypeEnum.LinkButton,
            //UseImageButton = true,
            Visible = true
        });
        GetAndUpdateCustomTableQueryItem();
        // Initializes page title and breadcrumbs
        GetShippingOptionName(mShippingExtensionPricingID.ToString());
        string[,] breadcrumbs = new string[3, 3];
        breadcrumbs[0, 0]     = "Shipping Extension";
        breadcrumbs[0, 1]     = "~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_List.aspx";
        breadcrumbs[0, 2]     = "configEdit";
        breadcrumbs[1, 0]     = ShippingOptionDisplayName;
        breadcrumbs[1, 1]     = string.Format("~/CMSModules/Ecommerce/Pages/Tools/Configuration/ShippingExtension/ShippingExtension_Edit_Country.aspx?shippingExtensionID={0}", mShippingOptionID.ToString());
        breadcrumbs[1, 2]     = "configEdit";
        breadcrumbs[2, 0]     = ShippingCountryDisplayName;
        breadcrumbs[2, 1]     = "";
        breadcrumbs[2, 2]     = "";
        if (!IsPostBack)
        {
            txtBasePrice.Text           = ShippingCountryBaseCost.ToString();
            txtUnitPrice.Text           = ShippingCountryUnitPrice.ToString();
            pnlPriceParams.GroupingText = string.Format("Parameters for {1}/{0}", ShippingCountryDisplayName, ShippingOptionDisplayName);
            rdoByRange.Checked          = (mShippingOptionProcessingMode == 0);
            rdoByUnit.Checked           = (mShippingOptionProcessingMode == 1);
        }
        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.Title.Breadcrumbs = breadcrumbs;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // Get product info
        if (ProductID > 0)
        {
            sku = SKUInfoProvider.GetSKUInfo(ProductID);
        }

        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        master.Tabs.OnTabCreated += Tabs_OnTabCreated;

        selectedTab = DataHelper.GetNotEmpty(QueryHelper.GetString("tab", String.Empty).ToLowerCSafe(), ProductTabCode.ToString(UIContext.ProductTab).ToLowerCSafe());

        master.PanelBody.CssClass += " Separator";
        master.SetRTL();
    }
예제 #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CMSMasterPage master = (CMSMasterPage)this.CurrentMaster;

        currentUser = CMSContext.CurrentUser;

        // Initializes page title
        master.Title.TitleText     = GetString("Store_Settings.HeaderCaption");
        master.Title.TitleImage    = GetImageUrl("CMSModules/CMS_Ecommerce/storesettings.png");
        master.Title.HelpTopicName = "genral_tab";
        master.Title.HelpName      = "helpTopic";

        master.Tabs.ModuleName    = "CMS.Ecommerce";
        master.Tabs.ElementName   = "Configuration.Settings";
        master.Tabs.UrlTarget     = "storesettingsContent";
        master.Tabs.OnTabCreated += new UITabs.TabCreatedEventHandler(Tabs_OnTabCreated);
    }
예제 #26
0
    /// <summary>
    /// Initializes master page elements.
    /// </summary>
    private void InitializeMasterPage(int customerId)
    {
        CMSMasterPage master = (CMSMasterPage)this.CurrentMaster;

        // Set the HELP element
        master.Title.HelpTopicName = "general_tab14";
        master.Title.HelpName      = "helpTopic";

        master.Tabs.OnTabCreated           += new UITabs.TabCreatedEventHandler(Tabs_OnTabCreated);
        master.Tabs.UrlTarget               = "CustomerContent";
        master.Tabs.ModuleName              = "CMS.Ecommerce";
        master.Tabs.ElementName             = "Customers";
        master.Tabs.OpenTabContentAfterLoad = !QueryHelper.GetBoolean("onlyRefresh", false);

        // Set master title
        master.Title.TitleText  = GetString("com.customer.edit");
        master.Title.TitleImage = GetImageUrl("Objects/Ecommerce_Customer/object.png");
    }
예제 #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Get the parameters from querystring
        orderId    = QueryHelper.GetInteger("orderid", 0);
        customerId = QueryHelper.GetInteger("customerId", 0);

        // Initializes page title control
        string[,] pageTitleTabs = new string[2, 3];
        pageTitleTabs[0, 0]     = GetString("Order_Edit.Orders");
        pageTitleTabs[0, 1]     = "~/CMSModules/Ecommerce/Pages/Tools/Orders/Order_List.aspx";
        if (customerId > 0)
        {
            pageTitleTabs[0, 1] += "?customerId=" + customerId.ToString();
            pageTitleTabs[0, 2]  = "CustomerContent";
        }
        else
        {
            pageTitleTabs[0, 2] = "ecommerceContent";
        }
        pageTitleTabs[1, 0] = orderId.ToString();
        pageTitleTabs[1, 1] = "";
        pageTitleTabs[1, 2] = "";

        CMSMasterPage master = (CMSMasterPage)this.CurrentMaster;

        master.Title.Breadcrumbs   = pageTitleTabs;
        master.Title.HelpTopicName = "general_tab11";
        master.Title.HelpName      = "helpTopic";

        master.Tabs.ModuleName    = "CMS.Ecommerce";
        master.Tabs.ElementName   = "Orders";
        master.Tabs.UrlTarget     = "orderContent";
        master.Tabs.OnTabCreated += new UITabs.TabCreatedEventHandler(Tabs_OnTabCreated);


        // Set master title
        if (this.customerId <= 0)
        {
            master.Title.TitleText  = GetString("com.order.edit");
            master.Title.TitleImage = GetImageUrl("Objects/Ecommerce_Order/object.png");

            AddMenuButtonSelectScript("Orders", "");
        }
    }
    /// <summary>
    /// Initializes the master page elements.
    /// </summary>
    /// <param name="titleImage">Title of the page title element</param>
    /// <param name="titleText">URL of the image of the page title element</param>
    private void IntializeMasterPage(string titleImage, string titleText)
    {
        CMSMasterPage master = (CMSMasterPage)CurrentMaster;

        selectedTab = DataHelper.GetNotEmpty(QueryHelper.GetString("tab", String.Empty).ToLowerCSafe(), ProductTabCode.ToString(UIContext.ProductTab).ToLowerCSafe());

        if (!dialogMode)
        {
            master.Title.TitleText     = titleText;
            master.Title.TitleImage    = titleImage;
            master.Title.HelpTopicName = "new_product";
            master.Title.HelpName      = "helpTopic";
        }

        master.Tabs.OnTabCreated += Tabs_OnTabCreated;
        master.Tabs.UrlTarget     = "ProductContent";
        master.Tabs.ModuleName    = "CMS.Ecommerce";
        master.Tabs.ElementName   = (optionCategoryId > 0) ? "ProductOptions.Options" : "Products.Properties";
    }
예제 #29
0
    protected void Page_Init(object sender, EventArgs e)
    {
        mCurrentMaster = Page.Master as CMSMasterPage;

        if (mCurrentMaster == null)
        {
            throw new Exception("Page using this control must have CMSMasterPage master page.");
        }

        // Create and add help control to dialog's header if not in tab mode
        if (!mCurrentMaster.TabMode)
        {
            mCurrentMaster.Title.HelpTopicName = "newedit_query";
            mCurrentMaster.Title.HelpName      = "helpTopic";
        }

        // Header actions must be initilized here, otherwise it might be too late in the page lifecycle
        InitHeaderActions();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //mShippingExtensionID = QueryHelper.GetInteger("shippingExtensionID", 0);

        /*hdrActions.ActionsList.Add(new HeaderAction()
         * {
         *  //Text = GetString("COM_ShippingOption_List.NewItemCaption"),
         *  Text = "Add a country",
         *  RedirectUrl = ResolveUrl("ShippingExtension_AddCountry.aspx?shippingExtensionID=" + mShippingExtensionID),
         *  ImageUrl = GetImageUrl("Objects/CMS_Country/add.png"),
         *  ControlType = HeaderActionTypeEnum.LinkButton
         * });*/
        //GetAndUpdateCustomTableQueryItem();
        // Initializes page title and breadcrumbs

        mShippingExtensionID = QueryHelper.GetInteger("shippingExtensionID", 0);
        if (!IsPostBack)
        {
            if (mShippingExtensionID > 0)
            {
                GeneralConnection cn = ConnectionHelper.GetConnection();

                string  stringQuery = string.Format("SELECT Localcontact,Enabled, ProcessingMode FROM customtable_shippingextension WHERE ShippingOptionId={0}", mShippingExtensionID.ToString());
                DataSet ds          = cn.ExecuteQuery(stringQuery, null, QueryTypeEnum.SQLQuery, false);

                if (!DataHelper.DataSourceIsEmpty(ds))
                {
                    int processingMode = ValidationHelper.GetInteger(ds.Tables[0].Rows[0]["ProcessingMode"], 0);
                    rdoByRange.Checked = (processingMode == 0);
                    rdoByUnit.Checked  = (processingMode == 1);
                }
                stringQuery = string.Format("select Count(ShippingOPtionID) as Countries from customtable_shippingextensioncountry WHERE ShippingOptionID={0}", mShippingExtensionID.ToString());
                int countries = (int)cn.ExecuteScalar(stringQuery, null, QueryTypeEnum.SQLQuery, false);
                chkChangeCountry.Text = "Change mode for the country";
                if (countries > 1)
                {
                    chkChangeCountry.Text = string.Format("Change mode for all {0} countries", countries.ToString());
                }
            }
        }
        CMSMasterPage master = (CMSMasterPage)CurrentMaster;
    }
예제 #31
0
    protected void Page_Init(object sender, EventArgs e)
    {
        mCurrentMaster = Page.Master as CMSMasterPage;

        if (mCurrentMaster == null)
        {
            throw new Exception("Page using this control must have CMSMasterPage master page.");
        }

        // Create and add help control to dialog's header if not in tab mode
        if (!mCurrentMaster.TabMode)
        {
            mCurrentMaster.Title.HelpTopicName = "newedit_query";
            mCurrentMaster.Title.HelpName = "helpTopic";
        }

        // Header actions must be initilized here, otherwise it might be too late in the page lifecycle
        InitHeaderActions();
    }
    protected void Page_Init(object sender, EventArgs e)
    {
        // Register save
        ComponentEvents.RequestEvents.RegisterForEvent(ComponentEvents.SAVE, (s, args) => Save(false));

        mCurrentMaster = Page.Master as CMSMasterPage;

        if (mCurrentMaster == null)
        {
            throw new Exception("Page using this control must have CMSMasterPage master page.");
        }

        txtQueryText.FullScreenParentElementID = "divContent";
    }
    protected void Page_Init(object sender, EventArgs e)
    {
        mTransformationName = GetString("DocumentType_Edit_Transformation_Edit.NewTransformation");

        GetParameters();

        user = CMSContext.CurrentUser;

        // Get CMS master page
        mCurrentMaster = Page.Master as CMSMasterPage;

        // Check master page
        if (mCurrentMaster == null)
        {
            throw new Exception("Page using this control must have CMSMasterPage master page.");
        }

        // Initializes validator
        RequiredFieldValidatorTransformationName.ErrorMessage = GetString("DocumentType_Edit_Transformation_Edit.TransformationNameRequired");

        // Initializes labels
        LabelsInit();

        // Initialize drop down list
        DropDownListInit();

        // Init transformation help link
        lnkHelp.NavigateUrl = helpElem.DocumentationUrl + "newedit_transformation_methods.htm";
        lnkHelp.Target = "_target";

        // Init transofrmation help icon
        helpElem.HelpName = "helpTopic";
        helpElem.TopicName = "newedit_transformation_methods";

        if (transformationId <= 0)
        {
            mCurrentMaster.Title.HelpTopicName = "newedit_transformation";
            mCurrentMaster.Title.HelpName = "helpTopic";
        }

        // Page has been opened in CMSDesk and only transformation code editing is allowed
        if (DialogMode)
        {
            // Sets dialog mode and validates input (return in case of error)
            if (SetDialogMode())
            {
                return;
            }
        }
        else
        {
            if (transformationId <= 0)
            {
                // Initializes PageTitle
                string transformations = GetString("DocumentType_Edit_Transformation_Edit.Transformations");
                string[,] pageTitleTabs = new string[2, 3];

                pageTitleTabs[0, 0] = transformations;
                pageTitleTabs[0, 1] = string.Format("{0}?{1}={2}", ListPage, ParameterName, mClassId);
                pageTitleTabs[1, 0] = mTransformationName;
                mCurrentMaster.Title.Breadcrumbs = pageTitleTabs;
            }
        }

        if (UseClassSelector)
        {
            plcDocTypeFilter.Visible = true;
            filter.IsLiveSite = IsLiveSite;
        }

        if (ti.TransformationID != 0)
        {
            if (ti.TransformationCheckedOutByUserID > 0)
            {
                // Disable textboxes when disabled
                txtCode.Editor.ReadOnly = false;
                txtCSS.Enabled = false;

                string username = null;
                UserInfo ui = UserInfoProvider.GetUserInfo(ti.TransformationCheckedOutByUserID);
                if (ui != null)
                {
                    username = HTMLHelper.HTMLEncode(ui.FullName);
                }

                // Checked out by current machine
                if (string.Equals(ti.TransformationCheckedOutMachineName, HTTPHelper.MachineName, StringComparison.OrdinalIgnoreCase))
                {
                    lblCheckOutInfo.Text = string.Format(GetString("Transformation.CheckedOut"), Server.MapPath(ti.TransformationCheckedOutFilename));
                }
                else
                {
                    lblCheckOutInfo.Text = string.Format(GetString("Transformation.CheckedOutOnAnotherMachine"), ti.TransformationCheckedOutMachineName, username);
                }
            }
            else
            {
                lblCheckOutInfo.Text = string.Format(GetString("Transformation.CheckOutInfo"), Server.MapPath(TransformationInfoProvider.GetTransformationUrl(ti.TransformationFullName, null, ti.TransformationType)));
            }
        }

        pnlCheckOutInfo.Visible = (transformationId > 0);

        InitHeaderActions(ti);

        // Hide generate button DDL for code if not coupled document or custom table
        if (!string.IsNullOrEmpty(mClassName))
        {
            DataClassInfo classInfo = DataClassInfoProvider.GetDataClass(mClassName);

            // Set corret help topic for custom tables
            if (classInfo.ClassIsCustomTable)
            {
                mCurrentMaster.Title.HelpTopicName = "customtable_edit_newedit_transformation";
            }

            if ((classInfo.ClassIsCustomTable) || (classInfo.ClassIsDocumentType && classInfo.ClassIsCoupledClass))
            {
                btnDefaultTransformation.Visible = true;

                // Hide code definition DDL if XSLT transformation type is selected
                drpTransformationCode.Visible = (drpType.SelectedValue == TransformationTypeEnum.Ascx.ToString());
            }
            else
            {
                drpTransformationCode.Visible = false;
                btnDefaultTransformation.Visible = false;
            }
        }

        this.txtCode.Editor.Width = new Unit("99%");
        this.txtCode.Editor.Height = new Unit("300px");
        this.txtCode.NamespaceUsings = new List<string>() { "Transformation" };
    }
    protected void Page_Init(object sender, EventArgs e)
    {
        // Register save
        ComponentEvents.RequestEvents.RegisterForEvent(ComponentEvents.SAVE, (s, args) => { Save(false); });

        mCurrentMaster = Page.Master as CMSMasterPage;

        if (mCurrentMaster == null)
        {
            throw new Exception("Page using this control must have CMSMasterPage master page.");
        }

        // Create and add help control to dialog's header if not in tab mode
        if (!mCurrentMaster.TabMode)
        {
            mCurrentMaster.Title.HelpTopicName = "newedit_query";
            mCurrentMaster.Title.HelpName = "helpTopic";
        }

        txtQueryText.FullScreenParentElementID = "divContent";
    }