private void barButtonItem_Save_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (AllFieldsAreValid() != true) return; var currentTransaction = new Transaction() { TransactionTypeID = int.Parse(lookupEdit_TransactionType.EditValue.ToString()), Amount = (int) textEdit_Amount.EditValue, Notes = memoEdit_Notes.EditValue.ToString(), DateRecorded = DateTime.Now, RecordedByUserID = CurrentlyLoggedInUser.UserID }; var evtArgs = new BuzzleSaveTransactionEventArgs() { TransactionToBeSaved = currentTransaction }; TransactionReady(this, evtArgs); this.Close(); }
private void NewTransactionView_TransactionSaved(object sender, BuzzleSaveTransactionEventArgs e) { ((AddTransactionView)sender).Close(); SaveNewTransaction(e.TransactionToBeSaved); }