Ejemplo n.º 1
0
        public void Process_EditSubscription()
        {
            SubscriptionProductData entry = null;
            UrlAliasInfo urlAliasInfo = new UrlAliasInfo();
            entry = (SubscriptionProductData)m_refCatalog.GetItemEdit(m_iID, m_refContentApi.RequestInformationRef.ContentLanguage, false);
            if (hdn_publishaction.Value != Convert.ToInt32(EkEnumeration.AssetActionType.UndoCheckout).ToString())
            {

                entry = (SubscriptionProductData)Process_GetEntryValues(entry);

                entry.SubscriptionInfo = Process_GetSubscriptionInfo(entry);

                urlAliasInfo = Process_Alias();

            }
            try
            {

                if (hdn_publishaction.Value == Convert.ToInt32(EkEnumeration.AssetActionType.Save).ToString())
                {
                    m_refCatalog.Save(entry, urlAliasInfo);
                    Process_Taxonomy(entry.Id);
                    Process_Inventory(entry.Id);
                    Util_ResponseHandler("catalogentry.aspx?close=false&LangType=" + entry.LanguageId + "&id=" + entry.Id + "&type=update&back_file=cmsform.aspx&back_action=ViewStaged&back_folder_id=" + entry.FolderId + "&back_callerpage=content.aspx&back_origurl=action%3dViewContentByCategory%26id%3d" + entry.FolderId + "&back_LangType=" + entry.LanguageId + "&rnd=6"); // goes to edit screen.
                }
                else if (hdn_publishaction.Value == Convert.ToInt32(EkEnumeration.AssetActionType.Checkin).ToString())
                {
                    m_refCatalog.SaveAndCheckIn(entry, urlAliasInfo);
                    Process_Taxonomy(entry.Id);
                    Process_Inventory(entry.Id);
                    Util_ResponseHandler((string)("../content.aspx?action=View&folder_id=" + entry.FolderId + "&id=" + entry.Id + "&LangType=" + entry.LanguageId + "&callerpage=content.aspx&origurl=action%3dViewContentByCategory%26id%3d" + entry.FolderId + "%26contentid%3d0%26form_id%3d0%26LangType%3d" + entry.LanguageId)); // goes to content view screen
                }
                else if (hdn_publishaction.Value == Convert.ToInt32(EkEnumeration.AssetActionType.Submit).ToString())
                {
                    m_refCatalog.SaveAndPublish(entry, urlAliasInfo);
                    Process_Taxonomy(entry.Id);
                    Process_Inventory(entry.Id);
                    Util_ResponseHandler((string)("../content.aspx?action=View&folder_id=" + entry.FolderId + "&id=" + entry.Id + "&LangType=" + entry.LanguageId + "&callerpage=content.aspx&origurl=action%3dViewContentByCategory%26id%3d" + entry.FolderId + "%26contentid%3d0%26form_id%3d0%26LangType%3d" + entry.LanguageId)); // goes to content view screen
                }
                else if (hdn_publishaction.Value == Convert.ToInt32(EkEnumeration.AssetActionType.UndoCheckout).ToString())
                {
                    m_refCatalog.UndoCheckOut(entry.Id);
                    Util_UndoCheckoutResponseHandler(entry.Id, entry.FolderId, entry.LanguageId, ContentLanguage);
                }
            }
            catch (Exception ex)
            {
                Util_ResponseHandler((string)("../reterror.aspx?info=" + EkFunctions.UrlEncode(ex.Message) + "&LangType=" + entry.LanguageId));
            }
        }
Ejemplo n.º 2
0
        public void Process_AddProduct()
        {
            ProductData entry = new ProductData();
            UrlAliasInfo urlAliasInfo = new UrlAliasInfo();

            entry = (ProductData)Process_GetEntryAddValues(entry);

            this.ucItem.EntryEditData = entry;
            this.ucItem.ItemsFolderId = m_iFolder;
            entry.Variants = Process_GetVariants();

            if (entry.Variants.Count > 0)
            {
                entry.EntryType = Ektron.Cms.Common.EkEnumeration.CatalogEntryType.ComplexProduct;
            }

            urlAliasInfo = Process_Alias();

            try
            {
                if (hdn_publishaction.Value == Convert.ToInt32(EkEnumeration.AssetActionType.Save).ToString())
                {
                    m_refCatalog.AddAndSave(entry, urlAliasInfo);
                    Process_Taxonomy(entry.Id, entry.FolderId);
                    Process_Inventory(entry.Id);
                    Util_ResponseHandler("catalogentry.aspx?close=false&LangType=" + entry.LanguageId + "&id=" + entry.Id + "&type=update&back_file=cmsform.aspx&back_action=ViewStaged&back_folder_id=" + entry.FolderId + "&back_callerpage=content.aspx&back_origurl=action%3dViewContentByCategory%26id%3d" + entry.FolderId + "&back_LangType=" + entry.LanguageId + "&rnd=6"); // goes to edit screen.
                }
                else if (hdn_publishaction.Value == Convert.ToInt32(EkEnumeration.AssetActionType.Checkin).ToString())
                {
                    m_refCatalog.AddAndCheckIn(entry, urlAliasInfo);
                    Process_Taxonomy(entry.Id, entry.FolderId);
                    Process_Inventory(entry.Id);
                    Util_ResponseHandler((string)("../content.aspx?action=View&folder_id=" + entry.FolderId + "&id=" + entry.Id + "&LangType=" + entry.LanguageId + "&callerpage=content.aspx&origurl=action%3dViewContentByCategory%26id%3d" + entry.FolderId + "%26contentid%3d0%26form_id%3d0%26LangType%3d" + entry.LanguageId)); // goes to content view screen
                }
                else if (hdn_publishaction.Value == Convert.ToInt32(EkEnumeration.AssetActionType.Submit).ToString())
                {
                    m_refCatalog.AddAndPublish(entry, urlAliasInfo);
                    Process_Taxonomy(entry.Id, entry.FolderId);
                    Process_Inventory(entry.Id);
                    Util_ResponseHandler((string)("../content.aspx?action=ViewContentByCategory&id=" + this.m_iFolder.ToString())); // goes to folder
                }
            }
            catch (Exception ex)
            {
                Util_ResponseHandler((string)("../reterror.aspx?info=" + EkFunctions.UrlEncode(ex.Message) + "&LangType=" + entry.LanguageId));
            }
        }
Ejemplo n.º 3
0
        public void Process_EditProduct()
        {
            ProductData entry = null;
            UrlAliasInfo urlAliasInfo = new UrlAliasInfo();
            entry = (ProductData)m_refCatalog.GetItemEdit(m_iID, m_refContentApi.RequestInformationRef.ContentLanguage, false);
            if (hdn_publishaction.Value != EkEnumeration.AssetActionType.UndoCheckout.ToString())
            {

                entry = (ProductData)Process_GetEntryValues(entry);

                this.ucItem.EntryEditData = entry;
                this.ucItem.ItemsFolderId = m_iFolder;
                entry.Variants = Process_GetVariants();

                urlAliasInfo = Process_Alias();

                if (entry.Variants.Count > 0)
                {
                    entry.EntryType = Ektron.Cms.Common.EkEnumeration.CatalogEntryType.ComplexProduct;
                }
                if (entry.Variants.Count == 0)
                {
                    entry.EntryType = Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Product;
                }

            }
            if (hdn_publishaction.Value == Convert.ToInt32(EkEnumeration.AssetActionType.Save).ToString())
            {
                m_refCatalog.Save(entry, urlAliasInfo);
                Process_Taxonomy(entry.Id, entry.FolderId);
                Process_Inventory(entry.Id);
                Util_ResponseHandler("catalogentry.aspx?close=false&LangType=" + entry.LanguageId + "&id=" + entry.Id + "&type=update&back_file=cmsform.aspx&back_action=ViewStaged&back_folder_id=" + entry.FolderId + "&back_callerpage=content.aspx&back_origurl=action%3dViewContentByCategory%26id%3d" + entry.FolderId + "&back_LangType=" + entry.LanguageId + "&rnd=6"); // goes to edit screen.
            }
            else if (hdn_publishaction.Value == Convert.ToInt32(EkEnumeration.AssetActionType.Checkin).ToString())
            {
                m_refCatalog.SaveAndCheckIn(entry, urlAliasInfo);
                Process_Taxonomy(entry.Id, entry.FolderId);
                Process_Inventory(entry.Id);
                Util_ResponseHandler((string)("../content.aspx?action=View&folder_id=" + entry.FolderId + "&id=" + entry.Id + "&LangType=" + entry.LanguageId + "&callerpage=content.aspx&origurl=action%3dViewContentByCategory%26id%3d" + entry.FolderId + "%26contentid%3d0%26form_id%3d0%26LangType%3d" + entry.LanguageId)); // goes to content view screen
            }
            else if (hdn_publishaction.Value == Convert.ToInt32(EkEnumeration.AssetActionType.Submit).ToString())
            {
                m_refCatalog.SaveAndPublish(entry, urlAliasInfo);
                Process_Taxonomy(entry.Id, entry.FolderId);
                Process_Inventory(entry.Id);
                Util_ResponseHandler((string)("../content.aspx?action=View&folder_id=" + entry.FolderId + "&id=" + entry.Id + "&LangType=" + entry.LanguageId + "&callerpage=content.aspx&origurl=action%3dViewContentByCategory%26id%3d" + entry.FolderId + "%26contentid%3d0%26form_id%3d0%26LangType%3d" + entry.LanguageId)); // goes to content view screen
            }
            else if (hdn_publishaction.Value == Convert.ToInt32(EkEnumeration.AssetActionType.UndoCheckout).ToString())
            {
                m_refCatalog.UndoCheckOut(entry.Id);
                Util_UndoCheckoutResponseHandler(entry.Id, entry.FolderId, entry.LanguageId, ContentLanguage);
            }
        }
Ejemplo n.º 4
0
        private UrlAliasInfo Process_Alias()
        {
            //Aliasing logic for 7.6 starts here
            UrlAliasInfo _manualAliasInfo = new UrlAliasInfo();
            if (!string.IsNullOrEmpty(Request.Form["frm_manalias"]))
            {
                m_strManualAlias = Request.Form["frm_manalias"].ToString().Trim();
            }
            if (!string.IsNullOrEmpty(Request.Form["frm_manaliasExt"]))
            {
                m_strManualAliasExt = Request.Form["frm_manaliasExt"].ToString();
            }
            if (!string.IsNullOrEmpty(Request.Form["prev_frm_manalias_name"]))
            {
                m_prevManualAliasName = Request.Form["prev_frm_manalias_name"].ToString();
            }
            if (!string.IsNullOrEmpty(Request.Form["prev_frm_manalias_ext"]))
            {
                m_prevManualAliasExt = Request.Form["prev_frm_manalias_ext"].ToString();
            }
            m_currManualAliasName = m_strManualAlias;
            m_currManualAliasExt = m_strManualAliasExt;

            if (!string.IsNullOrEmpty(Request.Form["frm_manalias_id"]))
            {
                m_manualAliasId = System.Convert.ToInt32(Request.Form["frm_manalias_id"]);
            }
            _manualAliasInfo.AliasId = m_manualAliasId;
            _manualAliasInfo.CurrentAliasName = m_currManualAliasName;
            _manualAliasInfo.CurrentAliasExtension = m_currManualAliasExt;
            _manualAliasInfo.PreviousAliasName = m_prevManualAliasName;
            _manualAliasInfo.PreviousAliasExtension = m_prevManualAliasExt;
            return _manualAliasInfo;
        }