Example #1
0
        public override void DataBind()
        {
            if (_bound)
            {
                return;
            }
            _bound = true;


            _dataSrc = new EmptyDataSrc();

            PhotoAlbumsManager pMgr = new PhotoAlbumsManager();

            if (AlbumId != null)
            {
                DataView images = pMgr.GetImages(AlbumId.Value);

                this.Data = images;

                _dataSrc.RowsCount = images.Count;
                _dataSrc.Data      = this.Data;
                _dataSrc.HasData   = _dataSrc.RowsCount > 0;
            }

            base.DataBind();
        }
Example #2
0
        public override void DataBind()
        {
            PhotoAlbumsManager pMgr = new PhotoAlbumsManager();
            DataRow            dr   = pMgr.GetAlbumDetails(AlbumName);

            if (dr != null)
            {
                this.DataItem = pMgr.GetAlbumDetails(AlbumName);

                base.DataBind();
            }
        }
        public override void DataBind()
        {
            if (_bound)
            {
                return;
            }
            _bound = true;

            PhotoAlbumsManager pMgr = new PhotoAlbumsManager();

            if (AlbumId != null)
            {
                this.DataItem = pMgr.GetAlbumDetails(AlbumId.Value);
            }
            else if (AlbumName != "")
            {
                this.DataItem = pMgr.GetAlbumDetails(AlbumName);
            }



            base.DataBind();

            if (OverridePageTitle)
            {
                Config cfg = new Config();

                if (MyPage != null)
                {
                    DataRow album = this.DataItem as DataRow;

                    MyPage.CustomTitle = string.Format("{0} - {1}",
                                                       StringUtils.StripOutHtmlTags(album["DisplayName"].ToString()),
                                                       cfg.GetKey("SiteName"));

                    if (!String.IsNullOrEmpty(album["Description"].ToString()))
                    {
                        MyPage.Description = string.Format("{0}",
                                                           StringUtils.StripOutHtmlTags(album["Description"].ToString()));
                    }
                }
            }
        }
Example #4
0
 public PhotoAlbumsLink()
 {
     pMgr = new PhotoAlbumsManager();
 }
 public PhotoAlbumsDataSource()
 {
     this.DataLibrary = cte.lib;
     OrderBy          = "Sort Desc";
     pMgr             = new PhotoAlbumsManager();
 }
 public PhotoAlbumsCategoriesDS()
 {
     this.DataLibrary = cte.lib;
     OrderBy          = "CategoryId Desc";
     pMgr             = new PhotoAlbumsManager();
 }