protected void BindData(CY.UME.Core.Business.Activities active) { CY.UME.Core.PagingInfo pageInfo = new CY.UME.Core.PagingInfo(); pageInfo.CurrentPage = 1; pageInfo.PageSize = 15; CY.UME.Core.Business.Album album = new CY.UME.Core.Business.Album(); if (active != null) { album = active.GetActiveAlbum(); picList = album.GetPictures(pageInfo); } int count = album.GetPictureCount(); minPubDate.Value = ""; maxPubDate.Value = ""; picname.Value = ""; authorName.Value = ""; gpm_HiddenPageSize.Value = "15"; gpm_HiddenRecordCount.Value = count.ToString(); gpm_HiddenSiteUrl.Value = SiteUrl; }
protected void BindData(CY.UME.Core.Business.Group group) { CY.UME.Core.PagingInfo pageInfo = new CY.UME.Core.PagingInfo(); pageInfo.CurrentPage = 1; pageInfo.PageSize = 15; CY.UME.Core.Business.Album album =new CY.UME.Core.Business.Album(); if (group != null) { album = group.GetGroupAlbum(); picList = album.GetPictures(pageInfo); } int count = album.GetPictureCount(); DDLGroup.SelectedValue = group.Id.ToString(); minPubDate.Value = ""; maxPubDate.Value = ""; picname.Value = ""; authorName.Value = ""; gpm_HiddenPageSize.Value = "15"; gpm_HiddenRecordCount.Value = count.ToString(); gpm_HiddenSiteUrl.Value = SiteUrl; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { long albumId = 0; if (Request.QueryString["albumId"] == null) { throw new Exception("页面不存在"); } if (!long.TryParse(Request.QueryString["albumId"].ToString(), out albumId)) { throw new Exception("页面不存在"); } album = CY.UME.Core.Business.Album.Load(albumId); if (album == null) { throw new Exception("该相册不存在或已被删除"); } CY.UME.Core.Business.AlbumExtend ae = CY.UME.Core.Business.AlbumExtend.Load(album.Id); if (ae == null) { throw new Exception("系统异常错误"); } if (ae.Type != "group" || !int.TryParse(ae.InstanceId, out groupId)) { throw new Exception("该群组相册不存在或已被删除"); } group = CY.UME.Core.Business.Group.Load(groupId); if (group == null) { throw new Exception("该相册所在群组不存在或已被删除"); } LBLAlbumList.Text = "<a href=\"AlbumList.aspx?groupId=" + group.Id + "\">" + group.Name + "的相册</a>"; LblAlbumName.Text = CY.Utility.Common.StringUtility.CutString(album.Name,20,"..."); if (group.CheckIsManager(CurrentAccount)) {//判断是否是群组管理员 isMagager = true; } picList = CY.UME.Core.Business.Picture.GetAllPicture(album, new CY.UME.Core.PagingInfo { CurrentPage = 1, PageSize = CY.Utility.Common.ConvertUtility.ConvertToInt(pl_HiddenPageSize.Value, 15) }); RPT_PictureList.DataSourceID = ""; RPT_PictureList.DataSource = picList; RPT_PictureList.DataBind(); int PictureCount = album.GetPictureCount(); if (PictureCount > picList.Count) { isShowPaged = true; } //uc_GroupInfo.group = group; //uc_NewestTopices.group = group; BingAlbum(group, album.Id); pl_HiddenPageSize.Value = "15"; pl_HiddenAlbumId.Value = albumId.ToString(); pl_HiddenCurrentAccountId.Value = CurrentAccount.Id.ToString(); pl_HiddenGroupId.Value = groupId.ToString(); pl_HiddenSiteUrl.Value = SiteUrl; pl_HiddenTotalRecords.Value = PictureCount.ToString(); SetTitle(group.Name + " - " + album.Name); } //base.CSSName = "ume2"; }