Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Bid Status
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public bool QuoteRequestSMAttemptPending(int id) { bool success = false; try { QuoteRequestDomain model = GetQuoteRequestById(id); QuoteRequestStateService StateHandler = new QuoteRequestStateService(model); // Verify this is valid action StateHandler.StateMachine.Fire(QREvent.Review); // Update Status on THIS model model.Status = QRState.Pending; // Update status in DB QrUpdateStatusRequest QrUpdate = new QrUpdateStatusRequest { QrId = model.QrId, Status = model.Status }; UpdateQuoteRequestStatus(QrUpdate); //- Changing all Bids for QR to pending BidService BidService = new BidService(); QuoteRequestItemService QRIService = new QuoteRequestItemService(); List<QuoteRequestItemDomain> allQRItemsByQr = QRIService.GetAllQuoteRequestItems(model.QrId); if (allQRItemsByQr != null) { foreach (QuoteRequestItemDomain QRItem in allQRItemsByQr) { List<BidDomain> allBidsByQri = BidService.BidGetByQriId(QRItem.QrItemId); if (allBidsByQri != null) { foreach (BidDomain Bid in allBidsByQri) { BidDomain currentBid = Bid; QuoteRequestBidStatusRequest BidModel = BidService.GetQuoteRequestBidStatusId(currentBid.BidId); QuoteRequestBidStateService BidStateHandler = new QuoteRequestBidStateService(BidModel); BidStateHandler.StateMachine.Fire(QuoteRequestBidEvent.Review); currentBid.BidStatus = QuoteRequestBidState.Pending; QuoteRequestBidStatusRequest BidStateUpdate = new QuoteRequestBidStatusRequest { BidId = currentBid.BidId, BidStatus = currentBid.BidStatus }; BidService.UpdateQuoteRequestBidStatus(BidStateUpdate); } } } } } catch (InvalidOperationException) { return success; } catch (Exception ex) { throw ex; } return success; } } }
run
|
edit
|
history
|
help
0
aa
Programmes
Plt-D v.0.8.5
Binary search tree - In-order Traversal
Lambdas
Prsonal informashin
http://codegolf.stackexchange.com/questions/82526/sum-it-up-with-a-digital-triangle C# solution
Find if the given word occurs in the string necessarily in that order.
lilnq 1
Prime