コード例 #1
0
ファイル: GetClub.cs プロジェクト: xtxk110/ydl_project
        private static void SetClubUserList(Club club)
        {
            GetClubUserListFilter filter = new GetClubUserListFilter {
                ClubId = club.Id, PageIndex = 1, PageSize = 10
            };
            var teamListResult = ClubHelper.GetClubUserList(filter);

            if (teamListResult.Entities.IsNotNullOrEmpty())
            {
                club.ClubUserList = teamListResult.Entities.ToList <EntityBase, ClubUser>();
            }
        }
コード例 #2
0
        /// <summary>
        /// 获取俱乐部成员公共方法
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        public static Response GetClubUserList(GetClubUserListFilter filter)
        {
            var cmd = CommandHelper.CreateProcedure <ClubUser>(text: "sp_GetClubUserList");

            cmd.Params.Add(CommandHelper.CreateParam("@clubId", filter.ClubId));
            cmd.Params.Add(CommandHelper.CreateParam("@petName", filter.PetName));
            cmd.Params.Add(CommandHelper.CreateParam("@isAdmin", filter.IsAdmin, DataType.Boolean));
            cmd.CreateParamPager(filter);

            var result = DbContext.GetInstance().Execute(cmd);

            result.SetRowCount();

            return(result);
        }