コード例 #1
0
ファイル: AddTransactionView.cs プロジェクト: titusxp/buzzle
        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();
        }
コード例 #2
0
ファイル: TransactionsView.cs プロジェクト: titusxp/buzzle
 private void NewTransactionView_TransactionSaved(object sender, BuzzleSaveTransactionEventArgs e)
 {
     ((AddTransactionView)sender).Close();
     SaveNewTransaction(e.TransactionToBeSaved);
 }