. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 87.98.249.37 / Your IP : 216.73.216.208 [ Web Server : Microsoft-IIS/10.0 System : Windows NT NS3076740 10.0 build 17763 (Windows Server 2019) AMD64 User : IWPD_292(growel19p) ( 0) PHP Version : 8.3.12 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Inetpub/vhosts/growel.com/httpdocs/ |
Upload File : |
using GrowelBLL.Services;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GrowelWeb
{
public partial class New_products : System.Web.UI.Page
{
public string siteurl = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
NewProducts();
}
}
private void NewProducts()
{
//ltNews
try
{
StringBuilder sb = new StringBuilder();
AdminService adminService = new AdminService();
DataSet ds = adminService.GetAllNewProduct();
sb.Append("<section class='section section-md bg-white'>");
sb.Append(" <div class='shell'>");
sb.Append(" <div class='section__header'>");
sb.Append(" <h4>New Products</h4>");
// sb.Append(" <div class='section__header-element'><a class='link link-md' href='news.html'>See All News </a></div>");
sb.Append(" </div>");
sb.Append(" <div class='range range-50'>");
foreach (DataRow dr in ds.Tables[0].Rows)
{
sb.Append(" <div class='cell-sm-6 cell-md-4 wow fadeInRightSmall'>");
sb.Append(" <article class='post-minimal'>");
sb.Append(" <time style='font-size:20px' class='post-minimal__time' datetime='2017'><b>" + Convert.ToDateTime(dr["NewProduct_date_unique"]).ToString("dd-MMM-yyyy") + "</b></time>");
sb.Append(" <div class='post-minimal__divider'></div>");
// sb.Append(" <h6 class='post-minimal__title'><a href='single-post.html'>" + Convert.ToString( dr["News_Title"]) + "</a></h6>");
sb.Append(" <div style='min-height: 160px;'>");
if (Convert.ToString(dr["NewProduct_Details"]).Length > 250)
sb.Append(" <p>" + Convert.ToString(dr["NewProduct_Details"]).Substring(0, 250) + "...</p>");
else
sb.Append(" <p>" + Convert.ToString(dr["NewProduct_Details"]) + "...</p>");
sb.Append(" </div>");
sb.Append(" <a class='button button-xs button-lighter' href='" + siteurl + "NewProduct/" + Convert.ToDateTime(dr["NewProduct_date_unique"]).ToString("dd-MMM-yyyy") + "'>read more</a>");
sb.Append(" </article>");
sb.Append(" </div>");
}
sb.Append(" </div>");
sb.Append(" </div>");
sb.Append(" </section>");
ltNews.Text = sb.ToString();
}
catch (Exception ex)
{
throw ex;
}
}
}
}