public async Task <OfferDetailsForCheckingModel> GetOfferDetailsForDirectPurchaseTenderChecking(int combinedId, int userId) { OfferSolidarity combined = await _offerQueries.FindOfferByCombinedSupplierId(combinedId); Tender tender = await _tenderQueries.FindTenderOfferDetailsByTenderIdForDirectPurchaseCheckStage(combined.Offer.TenderId, userId); var result = await _offerQueries.GetOfferDetailsForDirectPurchaseChecking(combinedId); if (result == null) { result = new OfferDetailsForCheckingModel { TenderID = tender.TenderId, TenderStatusId = tender.TenderStatusId, CombinedId = combinedId, OfferPresentationWayId = tender.OfferPresentationWayId.Value, TenderIdString = Util.Encrypt(tender.TenderId), OfferIdString = Util.Encrypt(combined.OfferId) }; result.TenderStatusId = tender.TenderStatusId; } result.SupplierName = (combined.Supplier.SelectedCrName); result.IsSupplierCombinedLeader = combined.SolidarityTypeId == (int)Enums.UnRegisteredSuppliersInvitationType.SolidarityLeader; result.CheckingTwoFilesModel = new OfferDetailsForCheckingTwoFilesModel { OfferIdString = result.OfferIdString, TechnicalOfferStatusId = result.TechnicalOfferStatusId, RejectionReason = result.RejectionReason, Notes = result.Notes, TenderStatusId = result.TenderStatusId, TechnicalOfferStatusString = result.TechnicalOfferStatusString }; return(result); }
public void Should_DeActive() { OfferSolidarity offerSolidarity = new OfferSolidarity(email, mobile, SupplierInvitationType, SolidarityStatus); offerSolidarity.DeActive(); Assert.False(offerSolidarity.IsActive); }
public void Should_Update() { OfferSolidarity offerSolidarity = new OfferSolidarity(email, mobile, SupplierInvitationType, SolidarityStatus); offerSolidarity.Update(); offerSolidarity.ShouldNotBeNull(); }
public void Should_UpdateStatus() { OfferSolidarity offerSolidarity = new OfferSolidarity(email, mobile, SupplierInvitationType, SolidarityStatus); offerSolidarity.UpdateStatus(SupplierSolidarityStatus.Approved); Assert.Equal((int)SupplierSolidarityStatus.Approved, offerSolidarity.StatusId); }
public async Task <OfferSolidarity> UpdateCombinedAsync(OfferSolidarity combined) { Check.ArgumentNotNull(nameof(combined), combined); _context.OfferSolidarities.Update(combined); await _context.SaveChangesAsync(); return(combined); }
public OfferSolidarity GetOfferSolidarityLeader() { OfferSolidarity offerSolidarity = new OfferSolidarity("1299659801", Enums.SupplierSolidarityStatus.Approved, Enums.UnRegisteredSuppliersInvitationType.SolidarityLeader); offerSolidarity.LinkOfferForTest(GetOfferDefaults()); offerSolidarity.Offer.Tender = new TenderDefault().GetGeneralTender(); return(offerSolidarity); }
public void Should_Delete() { OfferSolidarity offerSolidarity = new OfferSolidarity(email, mobile, SupplierInvitationType, SolidarityStatus); offerSolidarity.Delete(); Assert.False(offerSolidarity.IsActive); Assert.Equal(ObjectState.Deleted, offerSolidarity.State); }
public void Should_Construct_SupplierPreQualificationDocument() { OfferSolidarity offerSolidarity = new OfferSolidarity(email, mobile, SupplierInvitationType, SolidarityStatus); _ = new OfferSolidarity(); _ = offerSolidarity.Id; _ = offerSolidarity.SupplierCombinedDetail; _ = offerSolidarity.Offer; _ = offerSolidarity.RejectionReason; _ = offerSolidarity.SolidarityStatus; _ = offerSolidarity.SubmissionDate; _ = offerSolidarity.Supplier; offerSolidarity.ShouldNotBeNull(); }
public void Should_sendSolidarityInvitations() { Offer offer = new Offer(tenderId, commericalRegisterNo, new List <SupplierTenderQuantityTable> { new SupplierTenderQuantityTable() { Id = 1, QuantitiyItemsJson = new SupplierTenderQuantityTableItemJson(new List <SupplierTenderQuantityTableItem>() { new SupplierTenderQuantityTableItem() { Id = 1 } }) } }, offerPresentationWayid); OfferSolidarity solidarity = new OfferSolidarity(commericalRegisterNo, SharedKernel.Enums.SupplierSolidarityStatus.Approved); offer.AddRegisteredSolidaritySupplier(new List <OfferSolidarity>() { solidarity }); offer.sendSolidarityInvitations(SharedKernel.Enums.SupplierSolidarityStatus.Approved); Assert.NotEmpty(offer.Combined); }
public void Should_Construct_SupplierPreQualificationDocument_Fifth() { OfferSolidarity offerSolidarity = new OfferSolidarity(commericalRegisterNo, SolidarityStatus, SupplierInvitationType); offerSolidarity.ShouldNotBeNull(); }
public void Should_Construct_SupplierPreQualificationDocument_Third() { OfferSolidarity offerSolidarity = new OfferSolidarity(offerId, commericalRegisterNo); offerSolidarity.ShouldNotBeNull(); }
public void Should_Construct_SupplierPreQualificationDocument_Second() { OfferSolidarity offerSolidarity = new OfferSolidarity(offerId); offerSolidarity.ShouldNotBeNull(); }