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


C# ProductType.GetItem方法代码示例

本文整理汇总了C#中ProductType.GetItem方法的典型用法代码示例。如果您正苦于以下问题:C# ProductType.GetItem方法的具体用法?C# ProductType.GetItem怎么用?C# ProductType.GetItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ProductType的用法示例。


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

示例1: Display_EditProductType

    protected void Display_EditProductType()
    {
        _ProductType = new ProductType(m_refContentApi.RequestInformationRef);
            _ProductTypeData = _ProductType.GetItem(m_iID, true);

            phTabAttributes.Visible = true;
            phTabMediaDefaults.Visible = true;

            tr_id.Visible = true;
            txt_id.Text = _ProductTypeData.Id.ToString();
            phAddEdit.Visible = true;
            txtTitle.Attributes.Add("onkeypress", "return " + JSLibrary.CheckKeyValueName+ "(event, \'34,13\');");
            txtDescription.Attributes.Add("onkeypress", "return " + JSLibrary.CheckKeyValueName+ "(event, \'34,13\');");

            Util_PopulateData();
            drp_type.Enabled = false;

            if (_ProductTypeData.EntryClass == Ektron.Cms.Common.EkEnumeration.CatalogEntryType.SubscriptionProduct)
            {

                drp_SubscriptionProvider.Items.Add(new ListItem("MembershipSubscriptionProvider"));
                drp_SubscriptionProvider.SelectedIndex = 0;

            }

            Util_XSLTLinks();
            Util_AddProductTypeItems(_ProductTypeData.EntryClass);
            Util_SetJs();
            Util_SetLabels();
    }
开发者ID:jaytem,项目名称:minGit,代码行数:30,代码来源:producttypes.aspx.cs

示例2: Display_ViewProductType

    protected void Display_ViewProductType()
    {
        _ProductType = new ProductType(m_refContentApi.RequestInformationRef);
            _ProductTypeData = _ProductType.GetItem(m_iID, true);

            _IsUsed = _ProductType.IsProductTypeUsed(m_iID);

            tr_id.Visible = true;
            txt_id.Text = _ProductTypeData.Id.ToString();
            phAddEdit.Visible = false;
            phView.Visible = true;
            phTabAttributes.Visible = true;
            phTabMediaDefaults.Visible = true;
            txtTitle.Attributes.Add("onkeypress", "return " + JSLibrary.CheckKeyValueName+ "(event, \'34,13\');");
            txtDescription.Attributes.Add("onkeypress", "return " + JSLibrary.CheckKeyValueName+ "(event, \'34,13\');");

            XmlConfigData xml_config_data;
            xml_config_data = m_refContentApi.GetXmlConfiguration(m_iID);
            PopulatePropertiesGrid(xml_config_data, Convert.ToInt64(_ProductTypeData.EntryClass), _ProductTypeData.SubscriptionProvider);
            PopulateDisplayGrid(xml_config_data);
            if (xml_config_data.PackageDisplayXslt.Length > 0)
            {
                PopulatePreviewGrid(xml_config_data);
                phPreview.Visible = true;
                phTabPreview.Visible = true;
            }
            else
            {
                phTabPreview.Visible = false;
                phPreview.Visible = false;
            }

            Util_PopulateData();
            Util_XSLTLinks();
            Util_AddProductTypeItems(_ProductTypeData.EntryClass);
            Util_SetJs();
            Util_SetLabels();
    }
开发者ID:jaytem,项目名称:minGit,代码行数:38,代码来源:producttypes.aspx.cs

示例3: Process_EditProductType

    public void Process_EditProductType()
    {
        try
            {
                _ProductType = new ProductType(m_refContentApi.RequestInformationRef);
                _ProductTypeData = _ProductType.GetItem(m_iID, true);

                _ProductTypeData.Title = (string) txtTitle.Text;
                _ProductTypeData.Description = (string) txtDescription.Text;
                _ProductTypeData.DefaultXslt = (string) (Request.Form["frm_xsltdefault"].Replace("frm_xsltdefault", ""));
                _ProductTypeData.Xslt1 = (string) txt_xslt1.Text;
                _ProductTypeData.Xslt2 = (string) txt_xslt2.Text;
                _ProductTypeData.Xslt3 = (string) txt_xslt3.Text;
                _ProductTypeData.PhysicalPath = Server.MapPath(m_refContentApi.XmlPath);
                _ProductTypeData.Attributes = Process_GetAttributes();
                _ProductTypeData.DefaultThumbnails = Process_GetThumbnails();
                if (_ProductTypeData.EntryClass == Ektron.Cms.Common.EkEnumeration.CatalogEntryType.SubscriptionProduct)
                {
                    _ProductTypeData.SubscriptionProvider = Request.Form["drp_SubscriptionProvider"];
                }

                _ProductType.Update(_ProductTypeData);
                Response.Redirect(_PageName + "?action=viewproducttype&id=" + m_iID, false);

            }
            catch (Ektron.Cms.Exceptions.SpecialCharactersException)
            {

                trError.Visible = true;
                litErrorMessage.Text = string.Format(GetMessage("js alert product type title cant include"), EkFunctions.HtmlEncode("<,>"));
                Display_EditProductType();

            }
            catch (Exception ex)
            {
                trError.Visible = true;
                litErrorMessage.Text = ex.Message.ToString();
                Display_EditProductType();
                // Utilities.ShowError()

            }
    }
开发者ID:jaytem,项目名称:minGit,代码行数:42,代码来源:producttypes.aspx.cs

示例4: Display_AddThumbnail

    protected void Display_AddThumbnail()
    {
        phAddThumbnail.Visible = true;
            _ProductType = new ProductType(m_refContentApi.RequestInformationRef);
            if (this.m_iID > 0)
            {
                _ProductTypeData = _ProductType.GetItem(m_iID, true);
            }

            Util_SetJs();
            Util_SetLabels();
    }
开发者ID:jaytem,项目名称:minGit,代码行数:12,代码来源:producttypes.aspx.cs

示例5: Page_Init

    private void Page_Init(System.Object sender, System.EventArgs e)
    {
        //register page resources
            this.RegisterJS();
            this.RegisterCSS();

            _MessageHelper = _ContentApi.EkMsgRef;

            if (!string.IsNullOrEmpty(Request.QueryString["id"]))
            {
                _ProductType = new ProductType(m_refContentApi.RequestInformationRef);
                ProductTypeData myProductTypeData = _ProductType.GetItem(Convert.ToInt64(Request.QueryString["id"]), true);

                this.ucAttributes.ProductData = myProductTypeData;
                this.ucAttributes.DisplayMode = Ektron.Cms.Commerce.Workarea.ProductTypes.Tabs.Attributes.DisplayModeValue.View;
                this.ucAttributesEdit.ProductData = myProductTypeData;
                this.ucAttributesEdit.DisplayMode = Ektron.Cms.Commerce.Workarea.ProductTypes.Tabs.Attributes.DisplayModeValue.Edit;

                this.ucMediaDefaults.ProductData = myProductTypeData;
                this.ucMediaDefaults.DisplayMode = Ektron.Cms.Commerce.Workarea.ProductTypes.Tabs.MediaDefaults.DisplayModeValue.View;
                this.ucMediaDefaultsEdit.ProductData = myProductTypeData;
                this.ucMediaDefaultsEdit.DisplayMode = Ektron.Cms.Commerce.Workarea.ProductTypes.Tabs.MediaDefaults.DisplayModeValue.Edit;
            }

            if (Request.QueryString["action"] == "addproducttype")
            {
                this.ucAttributesEdit.DisplayMode = Ektron.Cms.Commerce.Workarea.ProductTypes.Tabs.Attributes.DisplayModeValue.Edit;
                this.ucMediaDefaultsEdit.DisplayMode = Ektron.Cms.Commerce.Workarea.ProductTypes.Tabs.MediaDefaults.DisplayModeValue.Edit;
            }
    }
开发者ID:jaytem,项目名称:minGit,代码行数:30,代码来源:producttypes.aspx.cs

示例6: Process_Edit

 public void Process_Edit()
 {
     if (!string.IsNullOrEmpty(Request.Form["hdn_xmlid"]) && Convert.ToInt64(Request.Form["hdn_xmlid"]) > 0)
     {
         m_refProductType = new ProductType(m_refContentApi.RequestInformationRef);
         prod_type_data = m_refProductType.GetItem(Convert.ToInt64(Request.Form["hdn_xmlid"]), true);
         xid = prod_type_data.Id;
         Util_SetXmlId(xid);
     }
     if (Request.Form["hdn_entrytype"] == Ektron.Cms.Common.EkEnumeration.CatalogEntryType.SubscriptionProduct.ToString())
     {
         Process_EditSubscription();
     }
     else if (Request.Form["hdn_entrytype"] == Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Bundle.ToString())
     {
         Process_EditBundle();
     }
     else if (Request.Form["hdn_entrytype"] == Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Kit.ToString())
     {
         Process_EditKit();
     }
     else if ((Request.Form["hdn_entrytype"] == Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Product.ToString()) || (Request.Form["hdn_entrytype"] == Ektron.Cms.Common.EkEnumeration.CatalogEntryType.ComplexProduct.ToString()))
     {
         Process_EditProduct();
     }
 }
开发者ID:jaytem,项目名称:minGit,代码行数:26,代码来源:CatalogEntry.aspx.cs

示例7: Util_ObtainValues

        protected void Util_ObtainValues()
        {
            if (Request.QueryString["back_LangType"] != "")
            {
                backLangType = Convert.ToInt64(Request.QueryString["back_LangType"]);
            }
            if (Request.QueryString["content_id"] != "")
            {
                otherLangId = Convert.ToInt64(Request.QueryString["content_id"]);
            }
            if (Request.QueryString["type"] != "")
            {
                m_sEditAction = Request.QueryString["type"];
            }
            if (!(Request.QueryString["folder_id"] == null)) // add
            {
                m_iFolder = Convert.ToInt64(Request.QueryString["folder_id"]);
            }
            if (!(Request.QueryString["back_folder_id"] == null)) // edit
            {
                m_iFolder = Convert.ToInt64(Request.QueryString["back_folder_id"]);
            }
            if (Request.QueryString["xid"] != "")
            {
                xid = Convert.ToInt64(Request.QueryString["xid"]);
                if (xid > 0)
                {
                    m_refProductType = new ProductType(m_refContentApi.RequestInformationRef);
                    prod_type_data = m_refProductType.GetItem(xid, true);
                    this.editorPackage = prod_type_data.PackageXslt;
                    hdn_entrytype.Value = prod_type_data.EntryClass.ToString();
                }
            }
            Util_SetXmlId(xid);

            m_cPerms = m_refContentApi.LoadPermissions(m_iFolder, "folder", 0);

            if (Request.QueryString["incontext"] != "")
            {
                _inContextEditing = Convert.ToBoolean(Request.QueryString["incontext"]);
            }

            //m_mMeasures = New Measurements(m_refContentApi.RequestInformationRef).GetMeasurements()
        }
开发者ID:jaytem,项目名称:minGit,代码行数:44,代码来源:CatalogEntry.aspx.cs

示例8: Page_Load

        protected override void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                base.Page_Load(sender, e);
                if (!Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(m_refContentApi.RequestInformationRef, Ektron.Cms.DataIO.LicenseManager.Feature.eCommerce))
                {
                    throw (new Exception(GetMessage("feature locked error")));
                }
                Util_ObtainValues();
                Util_CheckAccess();
                m_refCatalog = new Ektron.Cms.Commerce.CatalogEntry(m_refContentApi.RequestInformationRef);
                m_refCurrency = new Currency(m_refContentApi.RequestInformationRef);
                m_refContent = m_refContentApi.EkContentRef;
                hdn_defaultCurrency.Value = m_refContentApi.RequestInformationRef.CommerceSettings.DefaultCurrencyId.ToString();

                switch (this.m_sEditAction)
                {
                    case "add":
                    case "addlang":
                        m_iFolder = this.m_iID;
                        if (!Page.IsPostBack)
                        {
                            UserRights = m_refContentApi.LoadPermissions(m_iFolder, "folder", ContentAPI.PermissionResultType.Folder);
                            ContentMetaData[] defaultMeta;
                            Util_CheckFolderType();
                            if (m_sEditAction == "addlang")
                            {
                                entry_edit_data = m_refCatalog.GetItem(otherLangId, backLangType);
                                if (entry_edit_data.ProductType.Id > 0)
                                {
                                    m_refProductType = new ProductType(m_refContentApi.RequestInformationRef);
                                    prod_type_data = m_refProductType.GetItem(entry_edit_data.ProductType.Id, true);
                                    editorPackage = prod_type_data.PackageXslt;
                                    xid = prod_type_data.Id;
                                    Util_SetXmlId(xid);
                                    hdn_entrytype.Value = entry_edit_data.EntryType.ToString();
                                }
                            }
                            if (entry_edit_data == null)
                            {
                                Util_GetEntryType();
                            }
                            defaultMeta = m_refContentApi.GetMetaDataTypes("id");
                            if ((defaultMeta != null) && defaultMeta.Length > 0)
                            {
                                meta_data.AddRange(defaultMeta);
                            }
                            Display_ContentTab();
                            Display_SummaryTab();
                            Display_EntryTab();
                            Display_PricingTab();
                            Display_MediaTab();
                            Display_ItemTab();
                            Display_MetadataTab();
                            Display_ScheduleTab();
                            Display_TaxonomyTab();
                            Display_CommentTab();
                            Display_TemplateTab();
                            if ((_urlAliasSettingApi.IsManualAliasEnabled || _urlAliasSettingApi.IsAutoAliasEnabled) && m_refContentApi.IsARoleMember(Ektron.Cms.Common.EkEnumeration.CmsRoleIds.EditAlias))
                            {
                                Display_AliasTab();
                            }
                            Util_SetLabels();
                        }
                        else
                        {
                            Process_Add();
                        }
                        break;
                    case "update":
                        if (!Page.IsPostBack)
                        {
                            UserRights = m_refContentApi.LoadPermissions(m_iID, "content", ContentAPI.PermissionResultType.Content);
                            if (PullApproval)
                                this.m_refContent.TakeOwnership(m_iID);
                            entry_edit_data = m_refCatalog.GetItemEdit(m_iID, m_refContentApi.RequestInformationRef.ContentLanguage, true);
                            if (entry_edit_data.ProductType.Id > 0)
                            {
                                m_refProductType = new ProductType(m_refContentApi.RequestInformationRef);
                                prod_type_data = m_refProductType.GetItem(entry_edit_data.ProductType.Id, true);
                                editorPackage = prod_type_data.PackageXslt;
                                xid = prod_type_data.Id;
                                Util_SetXmlId(xid);
                                hdn_entrytype.Value = entry_edit_data.EntryType.ToString();
                            }
                            meta_data = entry_edit_data.Metadata;
                            m_iFolder = entry_edit_data.FolderId;
                            Util_CheckFolderType();
                            Display_ContentTab();
                            Display_SummaryTab();
                            Display_EntryTab();
                            Display_PricingTab();
                            Display_MediaTab();
                            Display_ItemTab();
                            Display_MetadataTab();
                            Display_ScheduleTab();
                            Display_TaxonomyTab();
                            Display_CommentTab();
                            Display_TemplateTab();
//.........这里部分代码省略.........
开发者ID:jaytem,项目名称:minGit,代码行数:101,代码来源:CatalogEntry.aspx.cs

示例9: Page_Init

        protected void Page_Init(object sender, System.EventArgs e)
        {
            _MessageHelper = _ContentApi.EkMsgRef;
                _ProductType = new ProductType(_ContentApi.RequestInformationRef);
                Response.CacheControl = "no-cache";
                Response.AddHeader("Pragma", "no-cache");
                Response.Expires = -1;

                if (! Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(_ContentApi.RequestInformationRef, Ektron.Cms.DataIO.LicenseManager.Feature.eCommerce))
                {
                    Utilities.ShowError(_ContentApi.EkMsgRef.GetMessage("feature locked error"));
                }

                if (!string.IsNullOrEmpty(Request.QueryString["productTypeId"]))
                {
                    _Id = Convert.ToInt64(Request.QueryString["productTypeId"]);
                }

                lib_settings_data = this._ContentApi.GetLibrarySettings(0);

                SetLocalizedStrings();

                btnUpload.Attributes.Add("onclick", "return checkForEmptyTitleAndAlt(); return checkntoggle(document.getElementById(\'dvHoldMessage\'),document.getElementById(\'dvErrorMessage\'));");
                btnUpload.Text = this.GetMessage("upload txt");

                _ProductTypeData = _ProductType.GetItem(_Id);
        }
开发者ID:jaytem,项目名称:minGit,代码行数:27,代码来源:AddImage.aspx.cs


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