本文整理汇总了C#中CY.GetGroupAlbum方法的典型用法代码示例。如果您正苦于以下问题:C# CY.GetGroupAlbum方法的具体用法?C# CY.GetGroupAlbum怎么用?C# CY.GetGroupAlbum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CY
的用法示例。
在下文中一共展示了CY.GetGroupAlbum方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BindData
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;
}
示例2: BingAlbumType
//绑定所有的相册
private string BingAlbumType(CY.UME.Core.Business.Account account,CY.UME.Core.Business.Group group)
{
if (group == null)
{
throw new Exception("该群组不存在或已被删除");
}
int pageSize = 8;
int viewPermission = 0;
int albumCount = 0;
if (!group.CheckIsGroupMember(account))
{//判断是否是群组成员
viewPermission = 1;
}
else
{
isManage = true;
}
albumList = group.GetGroupAlbum(viewPermission, new CY.UME.Core.PagingInfo { CurrentPage = 1, PageSize = pageSize });
albumCount = group.GetGroupAlbumCount(viewPermission);
if (albumList == null || albumCount == 0)
{
return "false";
}
DDLAlbum.DataTextField = "Name";
DDLAlbum.DataValueField = "Id";
DDLAlbum.DataSource = albumList;
DDLAlbum.DataBind();
return DDLAlbum.Items[0].Value;
}
示例3: BindData
protected void BindData(CY.UME.Core.Business.Group group)
{
TBXGroupName.Text = group.Name;//群组名
CY.UME.Core.Business.Album album = group.GetGroupAlbum();
string imgUrl = CY.UME.Core.Global.GroupCoverAddress;
if (album == null)
{
album = group.CreateGroupAlbum();
}
if (album.CoverPath.Length != 0)
{
imgUrl = album.CoverPath;
}
SelAddPermission.Value = group.AddPermission.ToString();
this.ScanRight.Value = group.ViewPermission.ToString();
DDLGroupType.SelectedValue = group.Type.ToString();
this.LeaveWords.Value = group.LeaveWordsPermission.ToString();
this.AddTopic.Value = group.AddTopicPermission.ToString();
this.AddPicture.Value = group.AddPicturePermission.ToString();
this.TopicReply.Value = group.AddTopicReplyPermission.ToString();
this.PictureReply.Value = group.AddPictureReplyPermission.ToString();
ImgGroupCover.ImageUrl = SiteUrl + imgUrl;//封面图片
TBXPlaCard.Text = group.PlaCard;//群组公告
}
示例4: SetGroupCover
protected void SetGroupCover(CY.UME.Core.Business.Group group)
{
if (group == null)
{
return;
}
CY.UME.Core.Business.Album album = group.GetGroupAlbum();
HttpPostedFile hpf = FUGroupCover.PostedFile;
string appPath = CY.Utility.Common.RequestUtility.CurPhysicalApplicationPath;
string dirPath = appPath + "/Content/Group/Album/" + group.Id + "/";
string fileName = "/Content/Group/Album/" + group.Id + "/" + DateTime.Now.ToString("yyyMMddhhmmss") + DateTime.Now.Millisecond.ToString() + ".jpg";//相册图片以加时间命名
string fileTempName = appPath + "/Content/temp/" + FUGroupCover.FileName;
System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(dirPath);
if (!di.Exists)
{
di.Create();
}
hpf.SaveAs(fileTempName);//临时保存原始图片
Bitmap bmp = new Bitmap(fileTempName);
int width = bmp.Width;
int height = bmp.Height;
bmp.Dispose();
if (height <= width && width >= 100)
{
height = Convert.ToInt32(width > 100 ? (100f / width) * height : height);
width = 100;
}
else if (width < height && height > 100)
{
width = Convert.ToInt32(height > 100 ? (100f / height) * width : height);
height = 100;
}
CY.Utility.Common.ImageUtility.ThumbAsJPG(FUGroupCover.FileContent, appPath + fileName, width, height);
if (File.Exists(fileTempName))
{
File.Delete(fileTempName);
}
CY.UME.Core.Business.Album albumTemp = CY.UME.Core.Business.Album.Load(album.Id);
if (albumTemp != null)
{
albumTemp.CoverPath = fileName;
albumTemp.Save();
}
}
示例5: BingAlbum
private void BingAlbum(CY.UME.Core.Business.Group group, long albumId)
{
if (group == null)
{
return;
}
IList<CY.UME.Core.Business.Album> albumList = group.GetGroupAlbum(0, new CY.UME.Core.PagingInfo { CurrentPage = 1, PageSize = int.MaxValue });
List<CY.UME.Core.Business.Album> albums = new List<CY.UME.Core.Business.Album>();
foreach (CY.UME.Core.Business.Album a in albumList)
{
if (a.Id == albumId)
{
continue;
}
albums.Add(a);
}
if (albums.Count == 0)
{
toGroupAlbum.Visible = false;
return;
}
DDLGroupAlbum.DataTextField = "Name";
DDLGroupAlbum.DataValueField = "Id";
DDLGroupAlbum.DataSource = albums;
DDLGroupAlbum.DataBind();
}