当前位置: 首页>>代码示例>>C#>>正文


C# SKUInfo类代码示例

本文整理汇总了C#中SKUInfo的典型用法代码示例。如果您正苦于以下问题:C# SKUInfo类的具体用法?C# SKUInfo怎么用?C# SKUInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SKUInfo类属于命名空间,在下文中一共展示了SKUInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        // Mark selected tab
        UIContext.ProductTab = ProductTabEnum.Options;

        if (ProductID > 0)
        {
            sku = SKUInfoProvider.GetSKUInfo(ProductID);

            EditedObject = sku;

            if (sku != null)
            {
                // Check site ID
                CheckEditedObjectSiteID(sku.SKUSiteID);

                ucOptions.ProductID = ProductID;
                ucOptions.UniSelector.OnSelectionChanged += new EventHandler(UniSelector_OnSelectionChanged);
            }
        }

        // Set master title
        if (DisplayTitle)
        {
            CurrentMaster.Title.TitleText = GetString("optioncategory_edit.itemlistlink");
            CurrentMaster.Title.TitleImage = GetImageUrl("Objects/Ecommerce_OptionCategory/object.png");
            CurrentMaster.Title.HelpTopicName = "cms_ecommerce_products_options";
        }
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:29,代码来源:Product_Edit_Options.aspx.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        // Get current product info
        product = SKUInfoProvider.GetSKUInfo(ProductID);
        if (product != null)
        {
            // Allow site selector for global admins
            if (!CMSContext.CurrentUser.IsGlobalAdministrator)
            {
                filterDocuments.LoadSites = false;
                filterDocuments.SitesPlaceHolder.Visible = false;
            }

            // Get no data message text
            string productNameLocalized = ResHelper.LocalizeString(product.SKUName);
            string noDataMessage = string.Format(GetString("ProductDocuments.Documents.nodata"), HTMLHelper.HTMLEncode(productNameLocalized));
            if (filterDocuments.FilterIsSet)
            {
                noDataMessage = GetString("ProductDocuments.Documents.noresults");
            }
            else if (filterDocuments.SelectedSite != TreeProvider.ALL_SITES)
            {
                SiteInfo si = SiteInfoProvider.GetSiteInfo(filterDocuments.SelectedSite);
                if (si != null)
                {
                    noDataMessage = string.Format(GetString("ProductDocuments.Documents.nodataforsite"), HTMLHelper.HTMLEncode(productNameLocalized), HTMLHelper.HTMLEncode(si.DisplayName));
                }
            }
            docElem.ZeroRowsText = noDataMessage;

            docElem.SiteName = filterDocuments.SelectedSite;
            docElem.UniGrid.OnBeforeDataReload += new OnBeforeDataReload(UniGrid_OnBeforeDataReload);
            docElem.UniGrid.OnAfterDataReload += new OnAfterDataReload(UniGrid_OnAfterDataReload);
        }
    }
开发者ID:KuduApps,项目名称:Kentico,代码行数:35,代码来源:ProductDocuments.ascx.cs

示例3: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        // Check UI personalization for product / product option separately
        if (QueryHelper.GetInteger("categoryid", 0) > 0)
        {
            if (!CMSContext.CurrentUser.IsAuthorizedPerUIElement("CMS.Ecommerce", "ProductOptions.Options.TaxClasses"))
            {
                RedirectToCMSDeskUIElementAccessDenied("CMS.Ecommerce", "ProductOptions.Options.TaxClasses");
            }
        }
        else
        {
            if (!CMSContext.CurrentUser.IsAuthorizedPerUIElement("CMS.Ecommerce", "Products.TaxClasses"))
            {
                RedirectToCMSDeskUIElementAccessDenied("CMS.Ecommerce", "Products.TaxClasses");
            }
        }

        if (ProductID > 0)
        {
            sku = SKUInfoProvider.GetSKUInfo(ProductID);
            EditedObject = sku;

            if (sku != null)
            {
                // Check products site id
                CheckEditedObjectSiteID(sku.SKUSiteID);

                taxForm.ProductID = ProductID;
                taxForm.UniSelector.OnSelectionChanged += UniSelector_OnSelectionChanged;
            }
        }
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:33,代码来源:Product_Edit_Tax.aspx.cs

示例4: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        product = SKUInfoProvider.GetSKUInfo(ProductID);

        // Mark selected tab
        UIContext.ProductTab = ProductTabEnum.VolumeDiscounts;

        EditedObject = product;

        if (product != null)
        {
            // Check site id
            CheckEditedObjectSiteID(product.SKUSiteID);

            // Load product currency
            productCurrency = CurrencyInfoProvider.GetMainCurrency(product.SKUSiteID);

            // Display product price
            lblProductPrice.Text = CurrencyInfoProvider.GetFormattedPrice(product.SKUPrice, productCurrency);
        }

        // Set unigrid properties
        SetUnigridProperties();

        // Initialize the master page elements
        InitializeMasterPage();
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:27,代码来源:Product_Edit_VolumeDiscount_List.aspx.cs

示例5: OnInit

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        // Get product name ane option category ID
        if (ProductID > 0)
        {
            sku = SKUInfoProvider.GetSKUInfo(ProductID);
            if (sku != null)
            {
                productName = ResHelper.LocalizeString(sku.SKUName);
                optionCategoryId = sku.SKUOptionCategoryID;
                siteId = sku.SKUSiteID;

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

        dialogMode = QueryHelper.GetBoolean("dialogmode", false);
        nodeId = QueryHelper.GetInteger("nodeId", 0);

        // Display tabs separator
        CurrentMaster.PanelSeparator.Visible = true;

        AddMenuButtonSelectScript("Products", string.Empty);
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:27,代码来源:Product_Edit_Header.aspx.cs

示例6: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!CMSContext.CurrentUser.IsAuthorizedPerUIElement("CMS.Ecommerce", "Products.VolumeDiscounts"))
        {
            RedirectToCMSDeskUIElementAccessDenied("CMS.Ecommerce", "Products.VolumeDiscounts");
        }

        productId = QueryHelper.GetInteger("productId", 0);
        product = SKUInfoProvider.GetSKUInfo(productId);

        EditedObject = product;

        if (product != null)
        {
            // Check site id
            CheckEditedObjectSiteID(product.SKUSiteID);

            // Load product currency
            productCurrency = CurrencyInfoProvider.GetMainCurrency(product.SKUSiteID);
        }

        // Set unigrid properties
        SetUnigridProperties();

        // Initialize the master page elements
        InitializeMasterPage();
    }
开发者ID:v-jli,项目名称:jean0407large,代码行数:27,代码来源:Product_Edit_VolumeDiscount_List.aspx.cs

示例7: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        product = SKUInfoProvider.GetSKUInfo(ProductID);

        // Setup help
        object options = new
        {
            helpName = "lnkProductEditHelp",
            helpUrl = UIContextHelper.GetDocumentationTopicUrl(HELP_TOPIC_LINK)
        };
        ScriptHelper.RegisterModule(this, "CMS/DialogContextHelpChange", options);

        EditedObject = product;

        if (product != null)
        {
            // Check site id
            CheckEditedObjectSiteID(product.SKUSiteID);

            // Load product currency
            productCurrency = CurrencyInfoProvider.GetMainCurrency(product.SKUSiteID);

            // Display product price
            headProductPriceInfo.Text = string.Format(GetString("com_sku_volume_discount.skupricelabel"), CurrencyInfoProvider.GetFormattedPrice(product.SKUPrice, productCurrency));
        }

        // Set unigrid properties
        SetUnigridProperties();

        // Initialize the master page elements
        InitializeMasterPage();
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:32,代码来源:Product_Edit_VolumeDiscount_List.aspx.cs

示例8: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        // Setup help
        object options = new
        {
            helpName = "lnkProductEditHelp",
            helpUrl = UIContextHelper.GetDocumentationTopicUrl(HELP_TOPIC_LINK)
        };
        ScriptHelper.RegisterModule(this, "CMS/DialogContextHelpChange", options);

        // Check UI personalization for product / product option separately
        if (OptionCategoryID > 0)
        {
            // Check elements in product options categories subtree
            CheckUIElementAccessHierarchical("CMS.Ecommerce", "ProductOptions.Options.TaxClasses");
        }
        else
        {
            CheckUIElementAccessHierarchical("CMS.Ecommerce", "Products.TaxClasses");
        }

        if (ProductID > 0)
        {
            sku = SKUInfoProvider.GetSKUInfo(ProductID);
            EditedObject = sku;

            if (sku != null)
            {
                // Check products site id
                CheckEditedObjectSiteID(sku.SKUSiteID);

                taxForm.ProductID = ProductID;
                taxForm.UniSelector.OnSelectionChanged += UniSelector_OnSelectionChanged;

                if (sku.IsProductOption)
                {
                    var categoryInfo = OptionCategoryInfoProvider.GetOptionCategoryInfo(sku.SKUOptionCategoryID);
                    if (categoryInfo != null)
                    {
                        CreateBreadcrumbs(sku);

                        if (categoryInfo.CategoryType != OptionCategoryTypeEnum.Products)
                        {
                            ShowError(GetString("com.taxesNotSupportedForOptionType"));
                            taxForm.Visible = false;
                        }
                    }
                }
            }
        }
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:51,代码来源:Product_Edit_Tax.aspx.cs

示例9: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        // Setup help
        object options = new
        {
            helpName = "lnkProductEditHelp",
            helpUrl = UIContextHelper.GetDocumentationTopicUrl(HELP_TOPIC_LINK)
        };
        ScriptHelper.RegisterModule(this, "CMS/DialogContextHelpChange", options);

        if (ProductID > 0)
        {
            sku = SKUInfoProvider.GetSKUInfo(ProductID);

            EditedObject = sku;

            if (sku != null)
            {
                // Check site ID
                CheckEditedObjectSiteID(sku.SKUSiteID);

                ucOptions.ProductID = ProductID;

                // Add new category button in HeaderAction
                CurrentMaster.HeaderActions.ActionsList.Add(new HeaderAction
                {
                    Text = GetString("com.productoptions.select"),
                    OnClientClick = ucOptions.GetAddCategoryJavaScript(),
                    Enabled = ECommerceContext.IsUserAuthorizedToModifySKU(sku.IsGlobal)
                });

                // New button is active in editing of global product only if global option categories are allowed and user has GlobalModifyPermission permission
                bool enabledButton = (sku.IsGlobal) ? ECommerceSettings.AllowGlobalProductOptions(CurrentSiteName) && ECommerceContext.IsUserAuthorizedToModifyOptionCategory(true)
                    : ECommerceContext.IsUserAuthorizedToModifyOptionCategory(false);

                // Create new enabled/disabled category button in HeaderAction
                var dialogUrl = URLHelper.ResolveUrl("~/CMSModules/Ecommerce/Pages/Tools/ProductOptions/OptionCategory_New.aspx?ProductID=" + sku.SKUID + "&dialog=1");
                dialogUrl = UIContextHelper.AppendDialogHash(dialogUrl);

                CurrentMaster.HeaderActions.ActionsList.Add(new HeaderAction
                {
                    Text = GetString("com.productoptions.new"),
                    Enabled = enabledButton,
                    ButtonStyle = ButtonStyle.Default,
                    OnClientClick = "modalDialog('" + dialogUrl + "','NewOptionCategoryDialog', 1000, 800);"
                });
            }
        }
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:49,代码来源:Product_Edit_Options.aspx.cs

示例10: OnInit

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        SKU = SKUInfoProvider.GetSKUInfo(ProductID);
        if (SKU != null)
        {
            CheckEditedObjectSiteID(SKU.SKUSiteID);
        }

        // Redirected from another page with saved flag
        if ((QueryHelper.GetInteger("saved", 0) == 1) && !URLHelper.IsPostback())
        {
            ShowChangesSaved();
        }
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:16,代码来源:Product_Edit_General.aspx.cs

示例11: Page_Load

    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();
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:16,代码来源:Product_Edit_Advanced_Header.aspx.cs

示例12: OnInit

    /// <summary>
    /// Initializes the extender
    /// </summary>
    public override void OnInit()
    {
        base.OnInit();

        siteId = QueryHelper.GetInteger("siteId", SiteContext.CurrentSiteID);

        // Get SKUID from querystring or from edited document
        var skuId = QueryHelper.GetInteger("productId", 0);
        if ((skuId <= 0) && (documentManager.Node != null))
        {
            skuId = documentManager.Node.NodeSKUID;
        }

        // Get product info
        if (skuId > 0)
        {
            sku = SKUInfoProvider.GetSKUInfo(skuId);
        }
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:22,代码来源:ProductAdvancedTabsExtender.cs

示例13: OnInit

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        // Initialize DataForm
        if (productId > 0)
        {
            skuObj = SKUInfoProvider.GetSKUInfo(productId);
            EditedObject = skuObj;

            formProductCustomFields.Info = skuObj;
            formProductCustomFields.OnBeforeSave += formProductCustomFields_OnBeforeSave;
            formProductCustomFields.OnAfterSave += formProductCustomFields_OnAfterSave;
        }
        else
        {
            formProductCustomFields.Enabled = false;
        }
    }
开发者ID:v-jli,项目名称:jean0407large,代码行数:19,代码来源:Product_Edit_CustomFields.aspx.cs

示例14: GetSKUPriceInternal

    /// <summary>
    /// Returns catalogue price of the given product based on the SKU data and shopping cart data. 
    /// By default price is loaded from the SKUPrice field.
    /// </summary>
    /// <param name="sku">SKU dta</param>
    /// <param name="cart">Shopping cart data</param>
    protected override double GetSKUPriceInternal(SKUInfo sku, ShoppingCartInfo cart)
    {
        double price = 0;

        // 1) Get base SKU price according to the shopping cart data (current culture)
        if (cart != null)
        {
            switch (cart.ShoppingCartCulture.ToLower())
            {
                case "en-us":
                    // Get price form SKUEnUsPrice field
                    price = ValidationHelper.GetDouble(sku.GetValue("SKUEnUsPrice"), 0);
                    break;

                case "cs-cz":
                    // Get price form SKUCsCzPrice field
                    price = ValidationHelper.GetDouble(sku.GetValue("SKUCsCzPrice"), 0);
                    break;
            }
        }

        //// 2) Get base SKU price according to the product properties (product status)
        //PublicStatusInfo status = PublicStatusInfoProvider.GetPublicStatusInfo(sku.SKUPublicStatusID);
        //if ((status != null) && (status.PublicStatusName.ToLower() == "discounted"))
        //{
        //    // Get price form SKUDiscountedPrice field
        //    price = ValidationHelper.GetDouble(sku.GetValue("SKUDiscountedPrice"), 0);
        //}

        if (price == 0)
        {
            // Get price from the SKUPrice field by default
            return base.GetSKUPriceInternal(sku, cart);
        }
        else
        {
            // Return custom price
            return price;
        }
    }
开发者ID:KuduApps,项目名称:Kentico,代码行数:46,代码来源:CustomSKUInfoProvider.cs

示例15: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!CMSContext.CurrentUser.IsAuthorizedPerUIElement("CMS.Content", "ContentProduct.TaxClasses"))
        {
            RedirectToCMSDeskUIElementAccessDenied("CMS.Content", "ContentProduct.TaxClasses");
        }

        if (this.Node != null)
        {
            sku = SKUInfoProvider.GetSKUInfo(productId);

            EditedObject = sku;

            if (sku != null)
            {
                // Check site ID
                CheckProductSiteID(sku.SKUSiteID);

                taxForm.ProductID = productId;
                this.taxForm.UniSelector.OnSelectionChanged += UniSelector_OnSelectionChanged;
            }
        }
    }
开发者ID:v-jli,项目名称:jean0407large,代码行数:23,代码来源:Product_Edit_Tax.aspx.cs


注:本文中的SKUInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。