public FFDataSet.BankRow NewBankRow() { FFDataSet.BankRow newRow = ffDataSet.Bank.NewBankRow(); newRow.id = getNextIDFromTableNamed("Bank"); newRow.name = ""; newRow.routingNumber = ""; ffDataSet.Bank.AddBankRow(newRow); return(newRow); }
private void Bank_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e) { FFDataSet.BankRow row = e.Row as FFDataSet.BankRow; int max = (from Bank in this.Bank select Bank.id).Max(); row.id = max + 1; row.name = ""; row.routingNumber = ""; }
private void addRequiredTableRows() { //////////////////////////// // Required Account type Rows FFDataSet.AccountTypeRow accountTypeNull = this.ffDataSet.AccountType.FindByid(AccountTypeCON.NULL.ID); if (accountTypeNull == null) { accountTypeNull = this.ffDataSet.AccountType.AddAccountTypeRow(AccountTypeCON.NULL.ID, AccountTypeCON.NULL.Name); } //////////////////////////// // Required Envelope Group Rows FFDataSet.EnvelopeGroupRow envelopeGroupNull = this.ffDataSet.EnvelopeGroup.FindByid(EnvelopeGroupCON.NULL.ID); if (envelopeGroupNull == null) { envelopeGroupNull = this.ffDataSet.EnvelopeGroup.AddEnvelopeGroupRow(EnvelopeGroupCON.NULL.ID, AccountTypeCON.NULL.Name, 0.0m, 0.0m); } //////////////////////////// // Required Transaction Type Rows FFDataSet.TransactionTypeRow transactionTypeNull = this.ffDataSet.TransactionType.FindByid(TransactionTypeCON.NULL.ID); if (transactionTypeNull == null) { transactionTypeNull = this.ffDataSet.TransactionType.AddTransactionTypeRow(TransactionTypeCON.NULL.ID, TransactionTypeCON.NULL.Name); } //////////////////////////// // Required Bank Rows FFDataSet.BankRow bankNull = this.ffDataSet.Bank.FindByid(BankCON.NULL.ID); if (bankNull == null) { bankNull = this.ffDataSet.Bank.AddBankRow(BankCON.NULL.ID, BankCON.NULL.Name, " "); } //////////////////////////// // Required Account Rows FFDataSet.AccountRow accountNull = this.ffDataSet.Account.FindByid(AccountCON.NULL.ID); if (accountNull == null) { accountNull = this.ffDataSet.Account.AddAccountRow(AccountCON.NULL.ID, AccountCON.NULL.Name, accountTypeNull, CatagoryCON.NULL.ID, false, false); } //////////////////////////// // Required Envelope Rows FFDataSet.EnvelopeRow envelopeNull = this.ffDataSet.Envelope.FindByid(EnvelopeCON.NULL.ID); FFDataSet.EnvelopeRow envelopeNoEnvelope = this.ffDataSet.Envelope.FindByid(EnvelopeCON.NO_ENVELOPE.ID); if (envelopeNull == null) { envelopeNull = this.ffDataSet.Envelope.AddEnvelopeRow(EnvelopeCON.NULL.ID, EnvelopeCON.NULL.Name, envelopeGroupNull, false, accountNull, 0, " ", "N"); } if (envelopeNoEnvelope == null) { envelopeNoEnvelope = this.ffDataSet.Envelope.AddEnvelopeRow(EnvelopeCON.NO_ENVELOPE.ID, EnvelopeCON.NO_ENVELOPE.Name, envelopeGroupNull, false, accountNull, 0, " ", "N"); } //////////////////////////// // Required Transaction Row FFDataSet.TransactionRow transactionNull = this.ffDataSet.Transaction.FindByid(TransactionCON.NULL.ID); if (transactionNull == null) { transactionNull = this.ffDataSet.Transaction.AddTransactionRow(TransactionCON.NULL.ID, DateTime.MinValue, transactionTypeNull, ""); } //////////////////////////// // Required LineItem Row FFDataSet.LineItemRow lineItemNull = this.ffDataSet.LineItem.FindByid(LineItemCON.NULL.ID); if (lineItemNull == null) { lineItemNull = this.ffDataSet.LineItem.AddLineItemRow(LineItemCON.NULL.ID, transactionNull, accountNull, "", 0, TransactionStateCON.PENDING.Value, false); } }
public BankDRM(FFDataSet.BankRow bRow) { this.bankRow = bRow; }
public BankDRM() { this.bankRow = DataSetModel.Instance.NewBankRow(); }
/// <summary> /// Creates the object and keeps a reference to a new account type row. /// </summary> /// <param name="aRow"></param> public BankModel() { this.bankRow = MyData.getInstance().Bank.NewBankRow(); MyData.getInstance().Bank.AddBankRow(this.bankRow); this.saveRow(); }
/// <summary> /// Creates the object and keeps a local referance to the given bank row. /// </summary> /// <param name="bRow"></param> public BankModel(FFDataSet.BankRow bRow) { this.bankRow = bRow; }