Beispiel #1
0
        public async Task <IActionResult> getUsersToApprove()
        {
            string      signedInUser = this.userManager.GetUserId(User);
            List <User> users        = await this.context.Users.Where(u => u.Id != signedInUser).ToListAsync();

            AdminApproveModel model = new AdminApproveModel();

            model.Users = users;
            return(View("AdminApprove", model));
        }
Beispiel #2
0
        public async Task <IActionResult> getAuctionsToApprove()
        {
            List <Auction> auctions = await this.context.auction.Where(u => u.state == State.DRAFT).ToListAsync();

            List <string> images = new List <string>();

            foreach (Auction auction in auctions)
            {
                string image = Convert.ToBase64String(auction.image);
                images.Add(image);
            }
            AdminApproveModel model = new AdminApproveModel();

            model.Auctions = auctions;
            model.images   = images;
            return(View("AdminApproveAuctions", model));
        }