public ActionResult OLDBidWinningTransporters_read([DataSourceRequest] DataSourceRequest request) { var winningTransprters = _bidWinnerService.Get(t => t.Position == 1 && t.Status == 1).Select(t => t.Transporter).Distinct(); var winningTransprterViewModels = TransporterListViewModelBinder(winningTransprters.ToList()); return(Json(winningTransprterViewModels.ToDataSourceResult(request))); }
public ActionResult BidAdminSigned_Read([DataSourceRequest] DataSourceRequest request, int id = 0) { var bids = _bidWinnerService.Get(m => m.BidID == id).Where(m => m.Status == (int)BidWinnerStatus.Signed); var bidsToDisplay = GetBidWinners(bids).ToList(); return(Json(bidsToDisplay.ToDataSourceResult(request))); }
public ActionResult WoredasInCurrentContract_Read([DataSourceRequest] DataSourceRequest request, int transporterID) { var bidWinnerDestinations = _bidWinnerService.Get(t => t.Status == 3 && t.TransporterID == transporterID, null, "AdminUnit, AdminUnit.AdminUnit2, AdminUnit.AdminUnit2.AdminUnit2").ToList(); var woredasInCurrentContract = GetWoredasInCurrentContract(bidWinnerDestinations); return(Json(woredasInCurrentContract.ToDataSourceResult(request))); }
public ActionResult MergeBidWinners(WoredaBidWinnerViewModel woredaBidWinnerViewModel) { var bidWinnerObj = _bidWinnerService.Get(t => t.SourceID == woredaBidWinnerViewModel.SourceId && t.DestinationID == woredaBidWinnerViewModel.DestinationId && t.BidID == woredaBidWinnerViewModel.BidID && t.TransporterID == woredaBidWinnerViewModel.LeavingTransporterID && t.Position == 1 && t.Status == 1).FirstOrDefault(); if (bidWinnerObj != null) { bidWinnerObj.Status = (int)BIDWINNER.Left; _bidWinnerService.EditBidWinner(bidWinnerObj); } var regionObj = _adminUnitService.FindById(woredaBidWinnerViewModel.DestinationId).AdminUnit2.AdminUnit2; //var filter = new PriceQuotationFilterOfferlessViewModel() // { // BidID = woredaBidWinnerViewModel.BidID, // HubID = woredaBidWinnerViewModel.SourceId, // RegionID = regionObj.AdminUnitID // }; return(RedirectToAction("WoredasBidStatus")); }