public ActionResult Edit(BidWinner bidWinner) { if (ModelState.IsValid) { _bidWinnerService.EditBidWinner(bidWinner); return(RedirectToAction("Index")); } return(View(bidWinner)); }
public bool DeleteBidWinner(BidWinner bidWinner) { if (bidWinner == null) { return(false); } _unitOfWork.BidWinnerRepository.Delete(bidWinner); _unitOfWork.Save(); return(true); }
public bool Disqualified(BidWinner bidWinner) { if (bidWinner != null) { bidWinner.Status = (int)BidWinnerStatus.Disqualified; _unitOfWork.BidWinnerRepository.Edit(bidWinner); _unitOfWork.Save(); return(true); } return(false); }
public List <BidWinner> TransformBidQuotationToBidWinner(List <TransportBidQuotation> proposals, int rank) { var winners = new List <BidWinner>(); foreach (var proposal in proposals) { var winner = new BidWinner(); winner.SourceID = proposal.SourceID; winner.DestinationID = proposal.DestinationID; winner.BidID = proposal.BidID; winner.CommodityID = 1; winner.TransporterID = proposal.TransporterID; winner.Amount = 0; winner.Tariff = proposal.Tariff; winner.Position = rank; winner.Status = 1; winner.ExpiryDate = DateTime.Today; winner.BidWinnerID = 0; winners.Add(winner); } return(winners); }
public bool EditBidWinner(BidWinner bidWinner) { _unitOfWork.BidWinnerRepository.Edit(bidWinner); _unitOfWork.Save(); return(true); }
public bool AddBidWinner(BidWinner bidWinner) { _unitOfWork.BidWinnerRepository.Add(bidWinner); _unitOfWork.Save(); return(true); }