protected void LoadResoucesInfoPurchasing() { MainContentGeneric resourcesinfo = new MainContentGeneric(); DataSet dsresourcesinfo = new DataSet(); StringBuilder sb = new StringBuilder(); Boolean ingreso = false; Boolean cerrarTag = true; //--- int cont = 1; int contAux = 1; dsresourcesinfo = resourcesinfo.getAllGenericResourcesPurchasing(Convert.ToInt32(GeneIdPurchasing)); sb.AppendLine("<div class=\"titleSupport\"><h1>Support</h1></div>"); foreach (DataTable table in dsresourcesinfo.Tables) { foreach (DataRow row in table.Rows) { if (ingreso == false) { ingreso = true; sb.AppendLine("<div class=\"boxResourceSupport\">"); sb.AppendLine("<div><h2>" + row["GeneTitle"].ToString() + "</h2></div>"); sb.AppendLine(" <div class=\"mainResourceSupport\">"); } if (cont == 3) { cont = 1; cerrarTag = true; } if (cont == 1) sb.AppendLine("<div class=\"list1ResourceSupport colorLinks\">"); sb.AppendLine("<p><span>" + contAux + ". </span><a href=\"Generic_d.aspx?id=" + GeneIdPurchasing + "&TypeGen=1#" + row["GeneDId"].ToString() + "\">" + row["GeneDTitle"].ToString() + "</a></p>"); if (cont == 2) { sb.AppendLine("</div>"); cerrarTag = false; } cont++; contAux++; } } if (cerrarTag == true) sb.AppendLine("</div>"); if (ingreso == true) { sb.AppendLine("</div>"); sb.AppendLine("<div class=\"bottonMore contSeeMore\">"); sb.AppendLine("<a href=\"Generic_d.aspx?id=" + GeneIdPurchasing + "&TypeGen=1\"><img src=\"" + Global.globalSiteImagesPath + "/plus_sign.gif\" width=\"8\" height=\"8\" /> see more purchasing information</a>"); sb.AppendLine("</div>"); sb.AppendLine("<div class=\"clear\"></div>"); sb.AppendLine("</div>"); PlaceHolder_Resources_Purchasing.Controls.Add(new LiteralControl(sb.ToString())); } sb = null; resourcesinfo = null; dsresourcesinfo = null; }