Esempio n. 1
0
        public ViewResult Add(int id)
        {
            BidViewModel bview = new BidViewModel();
            Tender       t     = _tenderRepo.GetTender(id);

            bview.tender     = id;
            bview.tenderName = t.Tender_name;
            return(View(bview));
        }
Esempio n. 2
0
        public IActionResult Details(int id)
        {
            Tender tender = _tenderRepo.GetTender(id);

            if (tender == null)
            {
                return(RedirectToAction("index"));
            }
            return(View(tender));
        }
Esempio n. 3
0
        public async Task <IActionResult> Bids()
        {
            var user = await _userManager.GetUserAsync(User);

            var userID = user.Id.ToString();
            IEnumerable <Bidding>   model   = _bidRepo.GetBidsByCompany(user);
            List <BidListViewModel> bidList = new List <BidListViewModel>();

            foreach (Bidding b in model)
            {
                BidListViewModel bl = new BidListViewModel();
                bl.amount      = b.amount;
                bl.companyName = user.UserName;
                Tender t = _tenderRepo.GetTender(b.tender_id);
                bl.tenderName = t.Tender_name;
                bl.status     = t.status;
                bl.tenderId   = t.Tender_Id;
                bidList.Add(bl);
            }
            IEnumerable <BidListViewModel> model1 = bidList;

            return(View(model1));
        }