Exemple #1
0
        private dynamic HandleMemberDetailPage(dynamic arg)
        {
            if (!this.CurrentUser.HasClaim("admin"))
            {
                return(403);
            }

            var member = this.SiteDatabase.GetById <NcbUser>((int)arg.id);

            var dummyPage = new Page();

            var data = new
            {
                Member                 = member,
                LogisticsCompanies     = this.SiteDatabase.Query <LogisticsCompany>().ToList(),
                AffiliateRewardsClaims = AffiliateRewardsClaim.GetRewards(this.SiteDatabase, member.Id),
                AffiliateDiscountCodes = AffiliateRewardsClaim.GetDiscountCodes(this.SiteDatabase, member.Id),
                PurchaseHistory        = SaleOrder.GetFromNcbUserId(member.Id, this.SiteDatabase)
            };


            return(View["Admin/memberprofile-admin", new StandardModel(this, dummyPage, data)]);
        }