本文整理汇总了C#中ProductType.GetList方法的典型用法代码示例。如果您正苦于以下问题:C# ProductType.GetList方法的具体用法?C# ProductType.GetList怎么用?C# ProductType.GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProductType
的用法示例。
在下文中一共展示了ProductType.GetList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Display_ViewAll
protected void Display_ViewAll()
{
_ProductType = new ProductType(m_refContentApi.RequestInformationRef);
List<ProductTypeData> producttypeList = new List<ProductTypeData>();
Criteria<ProductTypeProperty> criteria = new Criteria<ProductTypeProperty>();
criteria.PagingInfo.RecordsPerPage = m_refContentApi.RequestInformationRef.PagingSize;
criteria.PagingInfo.CurrentPage = _CurrentPage;
producttypeList = _ProductType.GetList(criteria);
_TotalPages = System.Convert.ToInt32(criteria.PagingInfo.TotalPages);
if (_TotalPages <= 1)
{
divPaging.Visible = false;
}
else
{
this.SetPagingUI();
divPaging.Visible = true;
litTotalPages.Text = (System.Math.Ceiling(Convert.ToDouble(_TotalPages))).ToString();
txtCurrentPage.Text = _CurrentPage.ToString();
}
if (dgList.Columns != null && dgList.Columns.Count >= 4)
{
dgList.Columns[0].HeaderText = m_refMsg.GetMessage("generic title");
dgList.Columns[1].HeaderText = m_refMsg.GetMessage("generic id");
dgList.Columns[2].HeaderText = m_refMsg.GetMessage("lbl product type class");
dgList.Columns[3].HeaderText = m_refMsg.GetMessage("generic date modified");
}
dgList.DataSource = producttypeList;
dgList.DataBind();
Util_SetLabels();
}
示例2: ProcessProductTemplatesPostBack
private void ProcessProductTemplatesPostBack()
{
_ProductType = new Ektron.Cms.Commerce.ProductType(_ContentApi.RequestInformationRef);
string IsInheritingTemplates = Request.Form["TemplateTypeBreak"];
string IsInheritingXml = Request.Form["TypeBreak"];
List<Ektron.Cms.Commerce.ProductTypeData> prod_type_list = new List<Ektron.Cms.Commerce.ProductTypeData>();
TemplateData[] template_data;
Criteria<ProductTypeProperty> criteria = new Criteria<ProductTypeProperty>();
prod_type_list = _ProductType.GetList(criteria);
template_data = _ContentApi.GetAllTemplates("TemplateFileName");
int i = 0;
Collection active_prod_list = new Collection();
Collection template_active_list = new Collection();
long default_xml_id = -1;
if (IsInheritingTemplates == null)
{
for (i = 0; i <= template_data.Length - 1; i++)
{
if (!string.IsNullOrEmpty(Request.Form["tinput_" + template_data[i].Id]))
{
template_active_list.Add(template_data[i].Id, template_data[i].Id.ToString(), null, null);
}
}
}
if (IsInheritingXml == null)
{
for (i = 0; i <= prod_type_list.Count - 1; i++)
{
if (!string.IsNullOrEmpty(Request.Form["input_" + prod_type_list[i].Id]))
{
active_prod_list.Add(prod_type_list[i].Id, prod_type_list[i].Id.ToString(), null, null);
}
}
if (!string.IsNullOrEmpty(Request.Form["sfdefault"]))
{
default_xml_id = Convert.ToInt64(Request.Form["sfdefault"]);
}
if (string.IsNullOrEmpty(Request.Form["requireSmartForms"]))
{
if (!active_prod_list.Contains("0"))
{
active_prod_list.Add("0", "0", null, null);
}
}
}
_ContentApi.UpdateFolderMultiConfig(_FolderId, default_xml_id, template_active_list, active_prod_list);
}
示例3: 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();
}
示例4: 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;
//.........这里部分代码省略.........