本文整理汇总了C#中ProductType.GetFolderProductTypeList方法的典型用法代码示例。如果您正苦于以下问题:C# ProductType.GetFolderProductTypeList方法的具体用法?C# ProductType.GetFolderProductTypeList怎么用?C# ProductType.GetFolderProductTypeList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProductType
的用法示例。
在下文中一共展示了ProductType.GetFolderProductTypeList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawProductTypesTable
private void DrawProductTypesTable()
{
_ProductType = new Ektron.Cms.Commerce.ProductType(_ContentApi.RequestInformationRef);
List<ProductTypeData> prod_type_list = new List<ProductTypeData>();
Criteria<ProductTypeProperty> criteria = new Criteria<ProductTypeProperty>();
criteria.PagingInfo.RecordsPerPage = 1000;
prod_type_list = _ProductType.GetList(criteria);
List<ProductTypeData> active_prod_list = new List<ProductTypeData>();
active_prod_list = _ProductType.GetFolderProductTypeList(_FolderData.Id);
Collection addNew = new Collection();
int k = 0;
int row_id = 0;
bool smartFormsRequired = true;
bool isEnabled = IsInheritingXmlMultiConfig();
System.Text.StringBuilder str = new System.Text.StringBuilder();
str.Append(DrawProductTypesBreaker(isEnabled));
str.Append("<div class=\"ektronTopSpace\"></div>");
str.Append("<div class=\"\">");
str.Append(DrawProductTypesHeader());
Collection ActiveXmlIdList = new Collection();
for (k = 0; k <= active_prod_list.Count - 1; k++)
{
if (!ActiveXmlIdList.Contains(active_prod_list[k].Id.ToString()))
{
ActiveXmlIdList.Add(active_prod_list[k].Id, active_prod_list[k].Id.ToString(), null, null);
}
}
if (_FolderData.XmlConfiguration != null)
{
for (int j = 0; j <= (_FolderData.XmlConfiguration.Length - 1); j++)
{
if (!ActiveXmlIdList.Contains(_FolderData.XmlConfiguration[j].Id.ToString()))
{
ActiveXmlIdList.Add(_FolderData.TemplateId, _FolderData.TemplateId.ToString(), null, null);
}
}
}
for (k = 0; k <= prod_type_list.Count - 1; k++)
{
if (ActiveXmlIdList.Contains(prod_type_list[k].Id.ToString()))
{
str.Append(DrawProductTypesEntry(row_id, (string)(prod_type_list[k].Title), prod_type_list[k].Id, Utilities.IsDefaultXmlConfig(prod_type_list[k].Id, active_prod_list.ToArray())));
row_id++;
}
else
{
Collection cRow = new Collection();
cRow.Add(prod_type_list[k].Title, "xml_name", null, null);
cRow.Add(prod_type_list[k].Id, "xml_id", null, null);
addNew.Add(cRow, null, null, null);
}
}
if (!smartFormsRequired)
{
str.Append(DrawProductTypesEntry(row_id, _MessageHelper.GetMessage("lbl Blank HTML"), 0, Utilities.IsHTMLDefault(active_prod_list.ToArray())));
}
str.Append(DrawContentTypesFooter());
str.Append("</div>");
if (row_id % 2 == 0)
{
str.Append("<input type=\"hidden\" name=\"isEven\" id=\"isEven\" value=\"1\" />");
}
else
{
str.Append("<input type=\"hidden\" name=\"isEven\" id=\"isEven\" value=\"0\" />");
}
ltr_vf_smartforms.Text = str.ToString();
}
示例2: DrawProductTypesTable
private void DrawProductTypesTable()
{
_ProductType = new Ektron.Cms.Commerce.ProductType(_ContentApi.RequestInformationRef);
List<Ektron.Cms.Commerce.ProductTypeData> prod_type_list = new List<Ektron.Cms.Commerce.ProductTypeData>();
Criteria<ProductTypeProperty> criteria = new Criteria<ProductTypeProperty>();
criteria.PagingInfo = new PagingInfo(10000);
prod_type_list = _ProductType.GetList(criteria);
List<Ektron.Cms.Commerce.ProductTypeData> active_prod_list = new List<Ektron.Cms.Commerce.ProductTypeData>();
active_prod_list = _ProductType.GetFolderProductTypeList(_FolderData.Id);
Collection addNew = new Collection();
int k = 0;
int row_id = 0;
bool smartFormsRequired = true;
//bool broken = false;
//if (active_prod_list.Count > 0)
//{
// broken = true;
//}
bool isParentCatalog = System.Convert.ToBoolean(_ContentApi.EkContentRef.GetFolderType(_FolderData.ParentId) == Ektron.Cms.Common.EkEnumeration.FolderType.Catalog);
bool isInheriting = System.Convert.ToBoolean(isParentCatalog && IsInheritingXmlMultiConfig()); // folder_data.XmlInherited
bool isEnabled = System.Convert.ToBoolean(!isInheriting);
System.Text.StringBuilder str = new System.Text.StringBuilder();
str.Append(DrawProductTypesBreaker(isInheriting, isParentCatalog));
str.Append("<div class=\"ektronTopSpace\"></div>");
str.Append(DrawProductTypesHeader());
Collection ActiveXmlIdList = new Collection();
for (k = 0; k <= active_prod_list.Count - 1; k++)
{
if (!ActiveXmlIdList.Contains(active_prod_list[k].Id.ToString()))
{
ActiveXmlIdList.Add(active_prod_list[k].Id, active_prod_list[k].Id.ToString(), null, null);
}
}
if (_FolderData.XmlConfiguration != null)
{
for (int j = 0; j <= (_FolderData.XmlConfiguration.Length - 1); j++)
{
if (!ActiveXmlIdList.Contains(_FolderData.XmlConfiguration[j].Id.ToString()))
{
ActiveXmlIdList.Add(_FolderData.TemplateId, _FolderData.TemplateId.ToString(), null, null);
}
}
}
for (k = 0; k <= prod_type_list.Count - 1; k++)
{
if (ActiveXmlIdList.Contains(prod_type_list[k].Id.ToString()))
{
str.Append(DrawProductTypesEntry(row_id, prod_type_list[k].Title, prod_type_list[k].Id, Utilities.IsDefaultXmlConfig(prod_type_list[k].Id, active_prod_list.ToArray()), isEnabled));
row_id++;
}
else
{
Collection cRow = new Collection();
cRow.Add(prod_type_list[k].Title, "xml_name", null, null);
cRow.Add(prod_type_list[k].Id, "xml_id", null, null);
addNew.Add(cRow, null, null, null);
}
}
if (!smartFormsRequired)
{
str.Append(DrawProductTypesEntry(row_id, _MessageHelper.GetMessage("lbl Blank HTML"), 0, Utilities.IsHTMLDefault(active_prod_list.ToArray()), isEnabled));
}
str.Append("</tbody></table>");
str.Append("<table width=\"100%\"><tbody>");
str.Append("<tr><td width=\"90%\">");
str.Append("<br /><select name=\"addContentType\" id=\"addContentType\" " + (isEnabled || _FolderData.Id == 0 ? "" : " disabled ") + ">");
str.Append("<option value=\"-1\">" + "[" + _MessageHelper.GetMessage("lbl select prod type") + "]" + "</option>");
foreach (Collection row in addNew)
{
str.Append("<option value=\"" + row["xml_id"] + "\">" + row["xml_name"] + "</option>");
}
str.Append("</select>");
str.Append("<span class=\'hiddenWhenInheriting\' style=\'display:" + (isEnabled ? "inline; padding: .25em;" : "none;") + "\' ><a href=\"#\" onclick=\"PreviewSelectedProductType(\'" + _ContentApi.SitePath + "\', 800,600);return false;\"><img src=\"" + _ContentApi.AppPath + "images/UI/Icons/preview.png" + "\" alt=" + _MessageHelper.GetMessage("lbl Preview Smart Form") + " title=" + _MessageHelper.GetMessage("lbl Preview Smart Form") + "></a></span>");
str.Append("<span class=\'hiddenWhenInheriting\' style=\'display:" + (isEnabled ? "inline; padding: .25em;" : "none;") + "\' ><a href=\"#\" onclick=\"ActivateContentType(true);\"><img src=\"" + _ContentApi.AppPath + "images/ui/icons/Add.png" + "\" title=" + _MessageHelper.GetMessage("lbl add link") + " alt=" + _MessageHelper.GetMessage("lbl add link") + "/></a></span></td></tr>");
str.Append(DrawContentTypesFooter());
if (row_id % 2 == 0)
{
str.Append("<input type=\"hidden\" name=\"isEven\" id=\"isEven\" value=\"1\" />");
}
else
{
str.Append("<input type=\"hidden\" name=\"isEven\" id=\"isEven\" value=\"0\" />");
}
if (_FolderData.Id == 0)
{
isEnabled = true;
//.........这里部分代码省略.........