public FFDataSet.TransactionTypeRow NewTransactionTypeRow() { FFDataSet.TransactionTypeRow newRow = ffDataSet.TransactionType.NewTransactionTypeRow(); newRow.id = this.getNextIDFromTableNamed("TransactionType"); newRow.name = ""; ffDataSet.TransactionType.AddTransactionTypeRow(newRow); return(newRow); }
public TransactionTypeDRM(string transactionTypeName) { this.TransactionTypeRow = DataSetModel.Instance.NewTransactionTypeRow(); this.Name = transactionTypeName; }
/////////////////////////////////////////////////////////// // Public functions /////////////////////////////////////////////////////////// public TransactionTypeDRM(FFDataSet.TransactionTypeRow ttRow) { this.TransactionTypeRow = ttRow; }
public TransactionTypeDRM() { this.TransactionTypeRow = DataSetModel.Instance.NewTransactionTypeRow(); }
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); } }