本文整理汇总了C#中Result.Find_FinderTitleCatGroup方法的典型用法代码示例。如果您正苦于以下问题:C# Result.Find_FinderTitleCatGroup方法的具体用法?C# Result.Find_FinderTitleCatGroup怎么用?C# Result.Find_FinderTitleCatGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Result
的用法示例。
在下文中一共展示了Result.Find_FinderTitleCatGroup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FinderTitle
protected void FinderTitle()
{
//--
PageSize = 5;
PageNum = _pg;
FirstRow = PageNum * PageSize - PageSize;
int CurrentRow = 0;
//--
Result resultTitle = new Result();
string sTextFinder = _sTextFinder;
string findopt1 = Request["findopt1"]; //sSubjSubCateId
string findopt2 = Request["findopt2"]; //sTeacSubCateId
string findopt3 = Request["findopt3"]; //sGrade
string findopt4 = Request["findopt4"]; //sPlatformId
string findopt5 = Request["findopt5"]; //sPubId
string findopt6 = Request["findopt6"]; //sPubId
if (sTextFinder == null) sTextFinder = "";
if (findopt1 != null) findopt1 = (findopt1.Trim() == "" ? null : findopt1);
if (findopt2 != null) findopt2 = (findopt2.Trim() == "" ? null : findopt2);
if (findopt3 != null) findopt3 = (findopt3.Trim() == "" ? null : findopt3);
if (findopt4 != null) findopt4 = (findopt4.Trim() == "" ? null : findopt4);
if (findopt5 != null) findopt5 = (findopt5.Trim() == "" ? null : findopt5);
if (findopt6 != null) findopt6 = (findopt6.Trim() == "" ? null : findopt6);
//For to ShareThisUrl/
string strUrlST = "";
string am = Request["am"];
string asm = Request["asm"];
strUrlST = "?am=" + am + "&asm=" + asm +"&txtadv=" + sTextFinder;
if (findopt1 != null) strUrlST = strUrlST + "&findopt1=" + findopt1;
if (findopt2 != null) strUrlST = strUrlST + "&findopt2=" + findopt2;
if (findopt3 != null) strUrlST = strUrlST + "&findopt3=" + findopt3;
if (findopt4 != null) strUrlST = strUrlST + "&findopt4=" + findopt4;
if (findopt5 != null) strUrlST = strUrlST + "&findopt5=" + findopt5;
if (findopt6 != null) strUrlST = strUrlST + "&findopt6=" + findopt6;
Main_MasterPage main = (Main_MasterPage)Page.Master;
if (strUrlST != "")
{
main._site_ShareThisLink = Request.Url.AbsoluteUri + strUrlST;
}
//END For to ShareThisUrl/
DataSet dsfinder = new DataSet();
System.Text.StringBuilder sb = new System.Text.StringBuilder();
//---
dsfinder.Clear();
dsfinder = resultTitle.Find_FinderTitleCatGroup(sTextFinder, findopt1, findopt2, findopt3, findopt4, findopt5, _sb, findopt6);
// Added by Jordan Sherer - Sept 1, 2009
// Need to make sure we don't have a null value;
if(dsfinder == null || dsfinder.Tables == null || dsfinder.Tables.Count <= 0)
{
return;
}
_ds_nr = dsfinder.Tables[0].Rows.Count;
if (_ds_nr == 1) Response.Redirect("product.aspx?p=" + dsfinder.Tables[0].Rows[0].ItemArray[0].ToString());
LoadFinderPagination(_ds_nr, sTextFinder, findopt1, findopt2, findopt3, findopt4, findopt5, findopt6);
foreach (DataTable table in dsfinder.Tables)
{
foreach (DataRow row in table.Rows)
{
if ((FirstRow <= CurrentRow) && (CurrentRow < (PageNum * PageSize)))
{
sb.AppendLine("<div class=\"prodSrcRef\">");
sb.AppendLine("<div class=\"prodImg\">");
sb.AppendLine("<div id=\"boxContImage\" style=\"width:115px; height:115px;\">");
sb.AppendLine("<a href=\"product.aspx?p=" + row["titleid"].ToString() + "\"><img id=\"images\" title=\"" + row["pubname"].ToString() +" : " +row["title"].ToString() + "\" style=\"width: 115px;height:115px;\" src=\"" + strFolder + "tn_" + row["ImageTn"].ToString() + "\"></a>"); //sb.AppendLine("<img src=\"" + row["imagetn"].ToString() + "\">");
sb.AppendLine("</div>"); //onload=\"getDim(document.getElementById('boxContImage'),this)\"
sb.AppendLine("</div>");
sb.AppendLine("<div class=\"prodSrcDesc\">");
sb.AppendLine("<h2><a href=\"product.aspx?p=" + row["titleid"].ToString() + "\">" + row["title"].ToString() + "</a></h2>");
sb.AppendLine("<p><em>by: </em><a href=\"result.aspx?findopt5=" + row["PubId"].ToString() + "&am=1&asm=" + 3 + "\">" + row["pubname"].ToString() + "</a></p>");
if (Convert.ToDouble(row["yousave"].ToString()) > 0)
{
sb.AppendLine("<h3> $" + String.Format("{0:#,0.00}", row["Er_price"]) + "</h3>");
sb.AppendLine("<h4>Your DISCOUNTED price</h4>");
sb.AppendLine("<h5>You Save: $" + String.Format("{0:#,0.00}", row["yousave"]) + "</h5>");
}
else
{
if (row["TitleId"].ToString() != Resources.Resource.TorchProductId)
{
sb.AppendLine("<h6> $" + String.Format("{0:#,0.00}", row["Er_price"]) + "</h6>");
}
else {
sb.AppendLine("<h6> Configure First</h6>");
}
}
if (row["TitleId"].ToString() != Resources.Resource.TorchProductId)
{
sb.AppendLine(Cart.CreateAddToCartLink("<img src=\"" + Global.globalSiteImagesPath + "/addToCart.jpg\" width=\"109\" height=\"26\" />", row["titleid"].ToString(), row["defaultsku"].ToString(), 1, 0));
}
sb.AppendLine("</div>");
sb.AppendLine("<div class=\"prodNumber\">");
sb.AppendLine("<div class=\"prodNumCont\">");
if ((row["plat_win_flag"].ToString() == "1") && (row["plat_mac_flag"].ToString() == "1"))
{ sb.AppendLine("<p>Mac / Windows</p>"); }
else
//.........这里部分代码省略.........