当前位置: 首页>>代码示例>>C#>>正文


C# CY.GetGroupAlbum方法代码示例

本文整理汇总了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;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:27,代码来源:GroupPictureManage.aspx.cs

示例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;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:37,代码来源:UploadGroupImg.aspx.cs

示例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;//群组公告
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:28,代码来源:GroupManage.aspx.cs

示例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();
            }
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:56,代码来源:GroupManage.aspx.cs

示例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();
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:30,代码来源:PictureList.aspx.cs


注:本文中的CY.GetGroupAlbum方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。