Exemple #1
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/html";
     BLL.Products bllPro = new BLL.Products();
     int cid = Convert.ToInt32(context.Request.Form["cid"]);
     int pid = Convert.ToInt32(context.Request.QueryString["pid"]);
     DataTable dt = bllPro.GetPagedList(cid,pid,10);
     //JavaScriptSerializer jss = new JavaScriptSerializer();
     context.Response.Write(dt);
 }
Exemple #2
0
 void LoadPhoto(int cid, int pid)
 {
     BLL.Products bllPro = new BLL.Products();
     DataTable dt = bllPro.GetPagedList(cid, pid, pageCount);
     if (dt.Rows.Count == 0)
     {
         sbHtml.Append("没有数据!");
     }
     else
     {
         foreach (DataRow row in dt.Rows)
         {
             sbHtml.Append("<li>");
             sbHtml.Append("<a href='" + row["path"] + "' class='fancybox' data-fancybox-group='gallery'><img src=" + row["path"] + " class='fancybox-image'></a>").Append(row["name"]);
             sbHtml.Append("</li>");
         }
     }
 }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     int cid = Convert.ToInt32(Context.Request.QueryString["cid"]);
     // int pageId = Context.Request.QueryString["pageId"] == null ? 1 : Convert.ToInt32(Context.Request.QueryString["pageId"]);
     int pageId = 1;
     BLL.Products bllPro = new BLL.Products();
     DataTable dt = bllPro.GetPagedList(cid, pageId, 10);
     if (dt.Rows.Count == 0)
         sbHtml.Append("没有数据!");
     else
     {
         foreach (DataRow dr in dt.Rows)
         {
             sbHtml.Append("<li><a href='#'  class='pics'  id=" + Convert.ToInt32(dr["id"]) + ">");
             sbHtml.Append("<img src=../" + dr["path"] + "><h2>" + dr["name"] + "</h2><p>" + dr["name"] + " </p></a></li>");
         }
     }
 }