public MaintBankTrans(PublicCorp corpData, BankTransactionType defaultType)
 {
     InitializeComponent();
     this.DialogResult = DialogResult.Cancel;
     _corpData = corpData;
     _defaultType = defaultType;
     _transactionData = new BankTransaction(corpData.BankAccountID, defaultType);
 }
        public static void StoreBankTransaction(BankTransaction data)
        {
            EMMADataSet.BankTransactionRow transaction = null;
            EMMADataSet.BankTransactionDataTable table = new EMMADataSet.BankTransactionDataTable();

            if (data.ID == 0)
            {
                transaction = table.NewBankTransactionRow();
            }
            transaction.AccountID = data.AccountID;
            transaction.DateTime = data.Date;
            transaction.Change = data.Change;
            transaction.Type = (short)data.Type;
            if (data.ID == 0)
            {
                table.AddBankTransactionRow(transaction);
            }
            bankTransactionTableAdapter.Update(table);
        }