コード例 #1
0
        public List <Member> ListMembersForOrganization(string accessToken, int organizationID)
        {
            var query = new ListMembersForOrganization_Q
            {
                OrganizationID = organizationID
            };

            var result = _queryDispatcher.Dispatch <ListMembersForOrganization_Q, List <Member> >(accessToken, query);

            return(result);
        }
コード例 #2
0
        public List <Member> Handle(string accessTokenID, ListMembersForOrganization_Q query)
        {
            using (var connection = _connFactory.GetConnection())
            {
                connection.Open();

                var sql = @"
                    select
	                    m.ID
	                    ,m.UserName
	                    ,m.RSIHandle
	                    ,m.OrganizationID
                        ,m.UserType
	                    ,m.IsActive
	                    ,m.CreatedOn
	                    ,m.CreatedBy
	                    ,m.ModifiedOn
	                    ,m.ModifiedBy
	                    ,pg.ID [PayGradeID]
	                    ,pg.PayGradeName
	                    ,pg.PayGradeDisplayName
	                    ,pg.PayGradeGroup
	                    ,r1.ID [RankID]
	                    ,r1.RankName
	                    ,r1.RankAbbr
	                    ,r1.RankType
	                    ,r1.RankImage
	                    ,r1.RankGroupName
	                    ,r1.RankGroupImage
                    from People.Members m
                    join People.Ranks r1
	                    on r1.ID = m.RankID
                    join People.PayGrades pg
	                    on pg.ID = r1.PayGradeID
                    where m.OrganizationID = @OrganizationID            
                ";

                var res = connection.Query <Member>(sql, new { OrganizationID = query.OrganizationID }).ToList();

                return(res);
            }
        }