protected void initializeAccountability(IAccountability accountabilityEntity, IParty responsible, IParty commissioner) { _accountabilityEntity = accountabilityEntity; Responsible = responsible; Commissioner = commissioner; }
protected void validateCommissioner(IParty value) { if (value == null) { throw new ArgumentOutOfRangeException("Payee was not found"); } }
public IPayment CreatePayment(DateTime dueDate, decimal dueAmount, IParty payer, IParty payee, PaymentType type, string sale, int booking) { //Calls the paymentCollection class for create return paymentCollection.Create(dueDate, dueAmount, payer, payee, type, sale, booking); }
public IPayment CreatePayment(DateTime dueDate, decimal dueAmount, IParty payer, IParty payee, PaymentType type, string sale, int booking) { PaymentEntity entity = new PaymentEntity(dueDate, dueAmount, payer, payee, type, sale, booking); payments.Add(entity); return entity; }
public void SetValidData() { dataAccessFacadeStub = new DataAccessFacadeStub(); validDueDate = new DateTime(2010, 10, 10); validDueAmount = 1m; validPayer = new Customer(CustomerType.Bureau, "", "Lonely Tree", dataAccessFacadeStub); validPayee = new Supplier("Galasam", "", SupplierType.Cruise, dataAccessFacadeStub); validType = PaymentType.Balance; validSale = "VF Jan"; validBooking = 2; }
public PaymentEntity(DateTime dueDate, decimal dueAmount, IParty payer, IParty payee, PaymentType type, string sale, int booking) { _attachments = new List<string>(); Payee = payee; Payer = payer; Note = ""; DueDate = dueDate; DueAmount = dueAmount; PaidDate = new DateTime(1900,01,01); PaidAmount = 0m; Paid = false; Archived = false; Type = type; Sale = sale; Booking = booking; Invoice = ""; }
internal Payment(DateTime dueDate, decimal dueAmount, IParty payer, IParty payee, PaymentType type, string sale, int booking, IDataAccessFacade dataAccessFacade) { validateDueAmount(dueAmount); validateParty(payer); validateParty(payee); validateSale(sale); // Get entities for DataAccess IParty payerEntity = ((AParty)payer)._partyEntity; IParty payeeEntity = ((AParty)payee)._partyEntity; this.dataAccessFacade = dataAccessFacade; _paymentEntity = dataAccessFacade.CreatePayment(dueDate, dueAmount, payerEntity, payeeEntity, type, sale, booking); Payer = payer; Payee = payee; }
public void AddReciever(IParty recevier) { this._receiver.Add(recevier); }
public static IList <IAddress> GetAddresses(this IParty party, AddressType?type = null) { return(GetAddresses <IAddress>(party, type)); }
public IPayment CreatePayment(DateTime dueDate, decimal dueAmount, IParty payer, IParty payee, PaymentType type, string sale, int booking) { //Calls create in the mapper and gives it the neccessary parameters. return paymentMapper.Create(dueDate, dueAmount, payer, payee, type, sale, booking); }
internal void CreatePayment(List <ISupplier> suppliers, List <ICustomer> customers) { if (dueDateDatePicker.SelectedDate != null) { try { decimal dueAmount; decimal.TryParse(dueAmountTextBox.Text, NumberStyles.Any, culture, out dueAmount); DateTime dueDate = dueDateDatePicker.SelectedDate.Value; int booking; int.TryParse(bookingTextBox.Text, out booking); IParty supplier = null; for (int i = 0; i < suppliers.Count; i++) { if (suppliers[i].Name == payeeTextBox.Text) { supplier = suppliers[i]; break; } } IParty customer = null; for (int i = 0; i < customers.Count; i++) { if (customers[i].Name == payerTextBox.Text) { customer = customers[i]; break; } } IPayment payment = paymentController.CreatePayment(dueDate, dueAmount, customer, supplier, (PaymentType)paymentTypeComboBox.SelectedItem, saleTextBox.Text, booking); decimal paidAmount; decimal.TryParse(paidAmountTextBox.Text, NumberStyles.Any, culture, out paidAmount); payment.PaidAmount = paidAmount; payment.Paid = paidCheckBox.IsChecked.Value; if (paidDateDatePicker.SelectedDate != null) { payment.PaidDate = paidDateDatePicker.SelectedDate.Value; } payment.Note = noteTextBox.Text; foreach (string attachment in attachments) { payment.AddAttachment(attachment); } payment.Invoice = invoiceTextBox.Text; paymentController.UpdatePayment(payment); SetSelectedPayment(null); } catch (Exception ex) { MessageBox.Show(ex.Message); } } else { MessageBox.Show("Must select a due date"); } }
void SendResponse(mvResponse resp, IParty party) { if (user == null) return; var groupName = user.PartyId.ToString(); var items = resp.GetItems(); foreach (mvResponseMsgItem item in items.OfType<mvResponseMsgItem>()) { Clients.Group(groupName).msg(item.Message); } foreach (mvResponseActionItem item in items.OfType<mvResponseActionItem>()) { var args = item.Items; switch (item.ActionKind) { case ActionKind.FullStatus: if (party != null) Clients.Group(groupName).setStatus(party.Data); break; case ActionKind.SelectBabu: Clients.Group(groupName).processBabu(args[0]); break; case ActionKind.DrawBabuk: Clients.Group(groupName).drawBabuk(args[0], args[1], args[2]); break; case ActionKind.UpdateCurrentPlayer: Clients.Group(groupName).updateCurrentPlayer(args[0], args[1], args[2]); break; case ActionKind.TileRemoved: Clients.Group(groupName).tileRemoved(args[0], args[1]); break; case ActionKind.RemoveIsolated: Clients.Group(groupName).removeIsolated(args[0], args[1]); break; case ActionKind.RemoveBabu: Clients.Group(groupName).removeBabu(args[0]); break; case ActionKind.LadaDeployed: Clients.Group(groupName).ladaDeployed(args[0], args[1]); break; case ActionKind.WinterStart: Clients.Group(groupName).winterStart(args[0]); break; case ActionKind.GameEnd: Clients.Group(groupName).endGame(args[0]); break; } } }
public static Func <IAdventure, bool> GetPartySizeRequirementPredicate(IParty party) { return(new Func <IAdventure, bool>(a => { return a.PartySize == party.Size; })); }
/// <summary> /// Initializes a new instance of the <see cref="EdiDocumentPosition"/> class. /// </summary> /// <param name="startLine"> /// The start line. /// </param> /// <param name="endLine"> /// The end line. /// </param> /// <param name="isStructure"> /// The is structure. /// </param> /// <param name="datasetId"> /// The dataset id. /// </param> /// <param name="messageAgency"> /// The message agency. /// </param> /// <param name="sendingAgency"> /// The sending agency. /// </param> /// <param name="recievingAgency"> /// The receiving agency. /// </param> /// <param name="datasetAction"> /// The dataset action. /// </param> /// <param name="keyFamilyIdentifier"> /// The key family identifier. /// </param> /// <param name="missingValue"> /// The missing value. /// </param> /// <param name="datasetPreparation"> /// The dataset preparation. /// </param> /// <param name="reportingPeriod"> /// The reporting period. /// </param> /// <param name="datasetAttributes"> /// The dataset attributes. /// </param> public EdiDocumentPosition( int startLine, int endLine, bool isStructure, string datasetId, string messageAgency, IParty sendingAgency, string recievingAgency, DatasetAction datasetAction, string keyFamilyIdentifier, string missingValue, DateTime datasetPreparation, DateTime reportingPeriod, IList<IKeyValue> datasetAttributes) { this._startLine = startLine; this._endLine = endLine; this._isStructure = isStructure; this._datasetId = datasetId; this._messageAgency = messageAgency; this._sendingAgency = sendingAgency; this._recievingAgency = recievingAgency; this._datasetAction = datasetAction; this._keyFamilyIdentifier = keyFamilyIdentifier; this._missingValue = missingValue; this._datasetPreparation = datasetPreparation; this._reportingPeriod = reportingPeriod; this._datasetAttributes = datasetAttributes; }
public TreePartyIterator(IParty aRoot) { nodeQueue.Enqueue(aRoot); }
public int SaveParty(IParty Party, string Mode) { return(PartyDAL.SaveParty(Party, Mode)); }
public ActionTarget(IParty target) { TargetType = ActionTargetType.SingleParty; PartyTargets = new IParty[] { target }; }
public static IList <IPhone> GetPhones(this IParty party) { return(GetPhones <IPhone>(party)); }
public static IPhone AddPhone(this IParty party, PhoneType type, string phoneNo, string phoneExt = null) { return(AddPhone <IPhone>(party, type, phoneNo, phoneExt)); }
public bool IsMy(IParty party) { return(ID == party.ID); }
/// <summary> /// Constructor for the Request Repository /// Uses DI for the App Db Context and Party interface to update user's party info /// </summary> /// <param name="context">AppDbContext</param> /// <param name="party">Party interface</param> public RequestRepository(AppDbContext context, IParty party) { _context = context; _party = party; }
private static int GetSeats(IParty party, double divisor) { return((int)Math.Round(party.Votes / divisor)); }
protected void initializeParty(IParty partyEntity) { _partyEntity = partyEntity; }
/// <summary> /// Determines whether the specified member is active. /// </summary> /// <param name="party">The party.</param> /// <param name="member">The member.</param> /// <returns> /// <c>true</c> if the specified member is active; otherwise, <c>false</c>. /// </returns> public static bool IsMemberActive(this IParty party, CharacterSpawn member) { // TODO: Check if member is in combat return(true); }
public static string Run(int totalGold, IParty party) { party.Gold += totalGold; return(party.Stats()); }
/// <summary> /// To create an empty record /// </summary> protected Record(IParty createdBy) { CreatedBy = createdBy; DateCreated = DateTime.UtcNow; Status = RecordState.Draft; }
public IPartyMap CreatePartyMap(ushort id, MapDefinition definition, MapConfiguration config, IParty party) { return(new PartyMap(party, id, definition, config, _logger, _databasePreloader, _mobFactory, _npcFactory, _obeliskFactory)); }
public IPayment CreatePayment(DateTime dueDate, decimal dueAmount, IParty payer, IParty payee, PaymentType type, string sale, int booking) { PaymentEntity entity = new PaymentEntity(dueDate, dueAmount, payer, payee, type, sale, booking); payments.Add(entity); return(entity); }
public void Unregister(IParty party) { ALL.Remove(party); }
public void Save(IParty party) { PartyRepository.Save(party); }
protected void validateResponsible(IParty value) { if (value == null) { throw new ArgumentOutOfRangeException("Payer was not found"); } }
// PI #region Public Payment Methods public IPayment CreatePayment(DateTime dueDate, decimal dueAmount, IParty payer, IParty payee, PaymentType type, string sale, int booking) { //Calls create in the mapper and gives it the neccessary parameters. return(paymentMapper.Create(dueDate, dueAmount, payer, payee, type, sale, booking)); }
/// <summary> /// Use a party's tax identifer to make a call into a 3rd party credit score calculation service to determine a Party's credit score /// </summary> /// <param name="party">person or a business</param> /// <returns>a credit score</returns> public int CalculateCreditScore(IParty party) { throw new Exception("[ERR 800] :: Unable to connect to 3rd party credit score calculation service"); }
internal AAccountabilityEntity(IParty responsible, IParty commissioner) { Responsible = responsible; Commissioner = commissioner; Note = ""; }
/// <inheritdoc/> public IPartyMap CreatePartyMap(ushort id, MapDefinition definition, Svmap config, IParty party) { return(new PartyMap(party, id, definition, config, _logger, _packetFactory, _databasePreloader, _mobFactory, _npcFactory, _obeliskFactory, _timeService)); }
/// <summary> /// Initializes a new instance of the <see cref="HeaderImpl"/> class. /// </summary> /// <param name="id"> /// The id. /// </param> /// <param name="senderId"> /// The sender id. /// </param> public HeaderImpl(string id, string senderId) { this._additionalAttributes = new Dictionary<string, string>(); this._name = new List<ITextTypeWrapper>(); this._source = new List<ITextTypeWrapper>(); this._receiver = new List<IParty>(); this._structureReferences = new List<IDatasetStructureReference>(); if (id == null) { throw new ArgumentException("The ID may not be null"); } if (Char.IsDigit(id, 0)) { throw new ArgumentException("An ID may not start with a digit!"); } this._id = id; this._sender = new PartyCore(null, senderId, null, null); this._prepared = DateTime.Now; }
/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////BUILD FROM ATTRIBUTES //////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <see cref="HeaderImpl"/> class. /// Minimal Constructor /// </summary> /// <param name="id">Id string /// </param> /// <param name="prepared">DateTime parameter /// </param> /// <param name="receiver">Reciever list /// </param> /// <param name="sender">Sender list /// </param> public HeaderImpl(string id, DateTime prepared, DateTime reportingBegin, DateTime reportingEnd, IList<IParty> receiver, IParty sender ,bool isTest) : this( null, null, null, null, id, null, null, null, prepared, reportingBegin, reportingEnd, null, null, receiver, sender, isTest) { }
public void Update(IParty party) { PartyRepository.Update(party); }
/// <summary> /// Initializes a new instance of the <see cref="HeaderImpl"/> class. /// </summary> /// <param name="additionalAttributes"> /// The additional attribtues. /// </param> /// <param name="structures"> /// The structures. /// </param> /// <param name="dataProviderReference"> /// The data provider reference. /// </param> /// <param name="datasetAction"> /// The dataset action. /// </param> /// <param name="id"> /// The id. /// </param> /// <param name="datasetId"> /// The dataset id. /// </param> /// <param name="embargoDate"> /// The embargo date. /// </param> /// <param name="extracted"> /// The extracted. /// </param> /// <param name="prepared"> /// The prepared. /// </param> /// <param name="reportingBegin"> /// The reporting begin. /// </param> /// <param name="reportingEnd"> /// The reporting end. /// </param> /// <param name="name"> /// The name. /// </param> /// <param name="source"> /// The source. /// </param> /// <param name="receiver"> /// The receiver. /// </param> /// <param name="sender"> /// The sender. /// </param> /// <param name="test"> /// The test. /// </param> public HeaderImpl( IDictionary<string, string> additionalAttributes, IList<IDatasetStructureReference> structures, IStructureReference dataProviderReference, DatasetAction datasetAction, string id, string datasetId, DateTime? embargoDate, DateTime? extracted, DateTime? prepared, DateTime? reportingBegin, DateTime? reportingEnd, IList<ITextTypeWrapper> name, IList<ITextTypeWrapper> source, IList<IParty> receiver, IParty sender, bool test) { this._additionalAttributes = new Dictionary<string, string>(); this._name = new List<ITextTypeWrapper>(); this._source = new List<ITextTypeWrapper>(); this._receiver = new List<IParty>(); this._structureReferences = new List<IDatasetStructureReference>(); if (additionalAttributes != null) { this._additionalAttributes = new Dictionary<string, string>(additionalAttributes); } if (structures != null) { this._structureReferences = new List<IDatasetStructureReference>(structures); } this._dataProviderReference = dataProviderReference; this._datasetAction = datasetAction; this._id = id; this._datasetId = datasetId; if (embargoDate != null) { this._embargoDate = embargoDate.Value; } if (extracted != null) { this._extracted = extracted.Value; } if (prepared != null) { this._prepared = prepared.Value; } if (reportingBegin != null) { this._reportingBegin = reportingBegin.Value; } if (reportingEnd != null) { this._reportingEnd = reportingEnd.Value; } if (name != null) { this._name = new List<ITextTypeWrapper>(name); } if (source != null) { this._source = new List<ITextTypeWrapper>(source); } if (receiver != null) { this._receiver = new List<IParty>(receiver); } this._sender = sender; this._test = test; this.Validate(); }
public Engine() { Combat = new Combat(); Event = new Event(); Party = new Party(); }
/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////BUILD FROM V2.1 SCHEMA //////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <see cref="HeaderImpl"/> class. /// </summary> /// <param name="headerType"> /// The header type. /// </param> public HeaderImpl(BaseHeaderType headerType) { this._additionalAttributes = new Dictionary<string, string>(); this._name = new List<ITextTypeWrapper>(); this._source = new List<ITextTypeWrapper>(); this._receiver = new List<IParty>(); this._structureReferences = new List<IDatasetStructureReference>(); this._test = headerType.Test; if (headerType.DataProvider != null) { this._dataProviderReference = RefUtil.CreateReference(headerType.DataProvider); } if (headerType.DataSetAction != null) { switch (headerType.DataSetAction) { case ActionTypeConstants.Append: this._datasetAction = DatasetAction.GetFromEnum(DatasetActionEnumType.Append); break; case ActionTypeConstants.Replace: this._datasetAction = DatasetAction.GetFromEnum(DatasetActionEnumType.Replace); break; case ActionTypeConstants.Delete: this._datasetAction = DatasetAction.GetFromEnum(DatasetActionEnumType.Delete); break; } } if (ObjectUtil.ValidCollection(headerType.DataSetID)) { this._datasetId = headerType.DataSetID[0]; } this._id = headerType.ID; if (headerType.EmbargoDate != null) { this._embargoDate = headerType.EmbargoDate.Value; } if (headerType.Extracted != null) { this._extracted = headerType.Extracted; } if (ObjectUtil.ValidCollection(headerType.Name)) { foreach (Name tt in headerType.Name) { this._name.Add(new TextTypeWrapperImpl(tt, null)); } } var prepared = headerType.Prepared as DateTime?; if (prepared != null) { this._prepared = prepared; } if (ObjectUtil.ValidCollection(headerType.Receiver)) { foreach (PartyType party in headerType.Receiver) { this._receiver.Add(new PartyCore(party)); } } if (headerType.ReportingBegin != null) { this._reportingBegin = DateUtil.FormatDate(headerType.ReportingBegin, true); } if (headerType.ReportingEnd != null) { this._reportingEnd = DateUtil.FormatDate(headerType.ReportingEnd, true); } if (headerType.Sender != null) { this._sender = new PartyCore(headerType.Sender); } if (ObjectUtil.ValidCollection(headerType.Source)) { foreach (TextType textType in headerType.Source) { this._source.Add(new TextTypeWrapperImpl(textType, null)); } } if (ObjectUtil.ValidCollection(headerType.Structure)) { foreach (PayloadStructureType payloadSt in headerType.Structure) { this._structureReferences.Add(new DatasetStructureReferenceCore(payloadSt)); } } this.Validate(); }
public void Unregister() { this.party.Remove(this); this.party = null; }
/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////BUILD FROM V1.0 SCHEMA /////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <see cref="HeaderImpl"/> class. /// </summary> /// <param name="headerType"> /// The header type. /// </param> public HeaderImpl(Org.Sdmx.Resources.SdmxMl.Schemas.V10.message.HeaderType headerType) { this._additionalAttributes = new Dictionary<string, string>(); this._name = new List<ITextTypeWrapper>(); this._source = new List<ITextTypeWrapper>(); this._receiver = new List<IParty>(); this._structureReferences = new List<IDatasetStructureReference>(); this._test = headerType.Test; if (headerType.DataSetAction != null) { switch (headerType.DataSetAction) { case Org.Sdmx.Resources.SdmxMl.Schemas.V10.common.ActionTypeConstants.Update: this._datasetAction = DatasetAction.GetFromEnum(DatasetActionEnumType.Replace); break; case Org.Sdmx.Resources.SdmxMl.Schemas.V10.common.ActionTypeConstants.Delete: this._datasetAction = DatasetAction.GetFromEnum(DatasetActionEnumType.Replace); break; } } this._id = headerType.ID; this._datasetId = headerType.DataSetID; if (headerType.Extracted != null) { this._extracted = headerType.Extracted; } if (ObjectUtil.ValidCollection(headerType.Name)) { foreach (Org.Sdmx.Resources.SdmxMl.Schemas.V10.common.TextType tt in headerType.Name) { this._name.Add(new TextTypeWrapperImpl(tt, null)); } } var prepared = headerType.Prepared as DateTime?; if (prepared != null) { this._prepared = prepared; } if (ObjectUtil.ValidCollection(headerType.Receiver)) { foreach (Org.Sdmx.Resources.SdmxMl.Schemas.V10.message.PartyType party in headerType.Receiver) { this._receiver.Add(new PartyCore(party)); } } if (headerType.ReportingBegin != null) { this._reportingBegin = DateUtil.FormatDate(headerType.ReportingBegin, true); } if (headerType.ReportingEnd != null) { this._reportingEnd = DateUtil.FormatDate(headerType.ReportingEnd, true); } if (headerType.Sender != null) { this._sender = new PartyCore(headerType.Sender); } if (ObjectUtil.ValidCollection(headerType.Source)) { foreach (Org.Sdmx.Resources.SdmxMl.Schemas.V10.common.TextType textType in headerType.Source) { this._source.Add(new TextTypeWrapperImpl(textType, null)); } } if (!string.IsNullOrWhiteSpace(headerType.KeyFamilyAgency)) { this._additionalAttributes.Add(Header.DsdAgencyRef, headerType.KeyFamilyAgency); } if (!string.IsNullOrWhiteSpace(headerType.KeyFamilyRef)) { this._additionalAttributes.Add(Header.DsdRef, headerType.KeyFamilyRef); } this.Validate(); }
private IParty parentParty; //link to parent party for this operation public Operation(int id, string name, TimeSpan duration, List <IOperation> prev, IEquipment equipment, IParty party) { this.id = id; this.name = name; this.duration = duration; previousOperations = new List <IOperation>(); foreach (IOperation operation in prev) { previousOperations.Add(operation); } enable = false; this.equipment = equipment; parentParty = party; }
public PartiesController(IParty party) { _party = party; }
/// <summary> /// Gets the maximum level difference. /// </summary> /// <param name="party">The party.</param> /// <param name="highestLevel">The highest level.</param> /// <returns>The maximum level difference.</returns> public static int GetMaxLevelDifference(this IParty party, int highestLevel) { // TODO: This could probably be replaced with a method in the Percent class return(highestLevel * party.SharedExpLevel.Value / 100); }
/// <summary> /// This is an internal method that is used to write the specified <paramref name="partyObj"/> /// </summary> /// <param name="partyObj"> /// The <see cref="IParty"/> object containing the data to be written /// </param> /// <param name="name"> /// The name of the xml element /// </param> private void WritePartyType(IParty partyObj, ElementNameTable name) { this.WriteStartElement(this.Namespaces.Message, name); this.TryWriteAttribute(AttributeNameTable.id, partyObj.Id); this.WriteTextType(this.NameNamespace, partyObj.Name, ElementNameTable.Name); foreach (IContact contact in partyObj.Contacts) { this.WriteContactType(contact); } this.WriteEndElement(); }
/// <summary> /// Constructor for the Player Repository /// </summary> /// <param name="context">AppDbContext</param> /// <param name="party">Party interface</param> /// <param name="request">Request interface</param> public PlayerRepository(AppDbContext context, IParty party, IRequest request) { _context = context; _party = party; _request = request; }
internal void UpdatePayment(List <ISupplier> suppliers, List <ICustomer> customers) { if (selectedPayment != null) { try { decimal dueAmount; decimal.TryParse(dueAmountTextBox.Text, NumberStyles.Any, culture, out dueAmount); decimal paidAmount; decimal.TryParse(paidAmountTextBox.Text, NumberStyles.Any, culture, out paidAmount); if (dueDateDatePicker.SelectedDate != null) { selectedPayment.DueDate = dueDateDatePicker.SelectedDate.Value; } selectedPayment.DueAmount = dueAmount; IParty supplier = null; for (int i = 0; i < suppliers.Count; i++) { if (suppliers[i].Name == payeeTextBox.Text) { supplier = suppliers[i]; break; } } selectedPayment.Payee = supplier; IParty customer = null; for (int i = 0; i < customers.Count; i++) { if (customers[i].Name == payerTextBox.Text) { customer = customers[i]; break; } } selectedPayment.Payer = customer; selectedPayment.PaidAmount = paidAmount; selectedPayment.Paid = paidCheckBox.IsChecked.Value; if (paidDateDatePicker.SelectedDate != null) { selectedPayment.PaidDate = paidDateDatePicker.SelectedDate.Value; } selectedPayment.Note = noteTextBox.Text; selectedPayment.Type = (PaymentType)paymentTypeComboBox.SelectedItem; selectedPayment.Sale = saleTextBox.Text; int booking; int.TryParse(bookingTextBox.Text, out booking); selectedPayment.Booking = booking; selectedPayment.Invoice = invoiceTextBox.Text; paymentController.UpdatePayment(selectedPayment); SetSelectedPayment(null); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }