Exemplo n.º 1
0
    protected void Display_ViewAll()
    {
        CatalogEntry CatalogManager = new CatalogEntry(m_refContentApi.RequestInformationRef);
        System.Collections.Generic.List<EntryData> entryList = new System.Collections.Generic.List<EntryData>();
        Ektron.Cms.Common.Criteria<EntryProperty> entryCriteria = new Ektron.Cms.Common.Criteria<EntryProperty>();

        entryCriteria.PagingInfo.RecordsPerPage = m_refContentApi.RequestInformationRef.PagingSize;
        entryCriteria.PagingInfo.CurrentPage = _currentPageNumber;

        entryCriteria.AddFilter(EntryProperty.CatalogId, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, m_iID);
        entryCriteria.AddFilter(EntryProperty.LanguageId, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, m_refContentApi.RequestInformationRef.ContentLanguage);
        entryCriteria.AddFilter(EntryProperty.IsArchived, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, false);
        entryCriteria.AddFilter(EntryProperty.IsPublished, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, true);

        entryCriteria.OrderByDirection = Ektron.Cms.Common.EkEnumeration.OrderByDirection.Ascending;
        entryCriteria.OrderByField = Util_GetSortColumn();

        switch (m_sPageAction)
        {
            case "browsecrosssell":
            case "browseupsell":
            case "couponselect":

                // If m_sPageAction = "couponselect" Then entryCriteria.AddFilter(EntryProperty.EntryType, Ektron.Cms.Common.CriteriaFilterOperator.NotEqualTo, CatalogEntryType.SubscriptionProduct)
                entryList = CatalogManager.GetList(entryCriteria);
                break;

            case "browse":

                long[] IdList = new long[3];

                IdList[0] = Convert.ToInt64(Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Product);
                // IdList(1) = Ektron.Cms.Common.EkEnumeration.CatalogEntryType.ComplexProduct
                entryCriteria.AddFilter(EntryProperty.EntryType, Ektron.Cms.Common.CriteriaFilterOperator.In, IdList);
                if (excludeId > 0)
                {
                    entryCriteria.AddFilter(EntryProperty.Id, Ektron.Cms.Common.CriteriaFilterOperator.NotEqualTo, excludeId);
                }
                entryList = CatalogManager.GetList(entryCriteria);
                break;

            default:

                pnl_catalogs.Visible = true;
                pnl_viewall.Visible = false;
                System.Collections.Generic.List<CatalogData> catalogList = new System.Collections.Generic.List<CatalogData>();
                catalogList = CatalogManager.GetCatalogList(1, 1);
                Util_ShowCatalogs(catalogList);
                break;

        }

        TotalPagesNumber = System.Convert.ToInt32(entryCriteria.PagingInfo.TotalPages);

        if (TotalPagesNumber > 1) {
            SetPagingUI();
        }

        Populate_ViewCatalogGrid(entryList);
    }
Exemplo n.º 2
0
    protected override void Page_Load(object sender, System.EventArgs e)
    {
        base.Page_Load(sender, e);
        Utilities.ValidateUserLogin();
        if (!Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(m_refContentApi.RequestInformationRef, Ektron.Cms.DataIO.LicenseManager.Feature.eCommerce))
        {
            Utilities.ShowError(m_refContentApi.EkMsgRef.GetMessage("feature locked error"));
        }
        CatalogEntry CatalogManager = new CatalogEntry(m_refContentApi.RequestInformationRef);
        System.Collections.Generic.List<CatalogData> catalogData = new System.Collections.Generic.List<CatalogData>();

        TotalPages.Visible = false;
        CurrentPage.Visible = false;
        PageLabel.Visible = false;
        OfLabel.Visible = false;

        switch (m_sPageAction)
        {
            case "crosssellselect":
            case "upsellselect":
            case "couponselect":
            case "select":
            case "reportingselect":
                Display_ViewAll();
                break;
            default:
                catalogData = CatalogManager.GetCatalogList(1, 1);
                populateFolder(catalogData);
                break;
        }
    }