private string Get_BannerID(string strBannerGUID)
        {
            zlzw.BLL.BannerListBLL bannerListBLL = new zlzw.BLL.BannerListBLL();
            DataTable dt = bannerListBLL.GetList("BannerGUID='" + strBannerGUID + "'").Tables[0];

            return(dt.Rows[0]["BannerID"].ToString());
        }
        private void BannerList_BindGrid()
        {
            zlzw.BLL.BannerListBLL bannerListBLL = new zlzw.BLL.BannerListBLL();
            DataTable dt = bannerListBLL.GetList(grid1.PageSize, grid1.PageIndex + 1, "*", "PublishDate", 0, "desc", "IsEnable=1 and BannerType=0").Tables[0];

            grid1.DataSource = dt;
            grid1.DataBind();
        }
Exemple #3
0
        private void Load_labAdvertisingInfo()
        {
            zlzw.BLL.BannerListBLL bannerListBLL = new zlzw.BLL.BannerListBLL();
            DataTable dt = bannerListBLL.GetList(1, "BannerType=1 and IsEnable=1 and IsHot=1", "PublishDate desc").Tables[0];

            if (dt.Rows.Count > 0)
            {
                labAdvertising.Text = "<a href='" + dt.Rows[0]["BannerLinks"].ToString() + "' target='_blank'><img style='border:0px;' width='1000' src='" + dt.Rows[0]["BannerImage"].ToString().Split('~')[1] + "' alt='" + dt.Rows[0]["BannerTitle"].ToString() + "'/></a>";
            }
        }
 /// <summary>
 /// 获取总页数
 /// </summary>
 /// <returns></returns>
 private int Get_BannerListTotalCount()
 {
     zlzw.BLL.BannerListBLL bannerListBLL = new zlzw.BLL.BannerListBLL();
     DataTable dt = bannerListBLL.GetList("").Tables[0];
     if (dt.Rows.Count > 0)
     {
         return dt.Rows.Count;
     }
     else
     {
         return 0;
     }
 }
        public string Get_BannerList()
        {
            zlzw.BLL.BannerListBLL bannerListBLL = new zlzw.BLL.BannerListBLL();
            DataTable dt = bannerListBLL.GetList("BannerType=0 and IsHot=1 and IsEnable=1").Tables[0];

            System.Text.StringBuilder strBuilder = new System.Text.StringBuilder();
            for (int nCount = 0; nCount < dt.Rows.Count; nCount++)
            {
                strBuilder.Append("<div><a target='_blank' href='" + dt.Rows[nCount]["BannerLinks"].ToString() + "'><img style='border:0px;' src='" + dt.Rows[nCount]["BannerImage"].ToString().Split('~')[1] + "' alt='' /></a></div>");
            }

            return(strBuilder.ToString());
        }
Exemple #6
0
        /// <summary>
        /// 获取总页数
        /// </summary>
        /// <returns></returns>
        private int Get_SpecialTopicTotalCount()
        {
            zlzw.BLL.BannerListBLL bannerListBLL = new zlzw.BLL.BannerListBLL();
            DataTable dt = bannerListBLL.GetList("IsEnable=1 and BannerType=1").Tables[0];

            if (dt.Rows.Count > 0)
            {
                return(dt.Rows.Count);
            }
            else
            {
                return(0);
            }
        }