Ejemplo n.º 1
0
        private void EnvelopeGroup_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
        {
            FFDataSet.EnvelopeGroupRow row = e.Row as FFDataSet.EnvelopeGroupRow;

            int max =
                (from EnvelopeGroup in this.EnvelopeGroup
                 select EnvelopeGroup.id).Max();

            row.id   = max + 1;
            row.name = "";
        }
Ejemplo n.º 2
0
        public FFDataSet.EnvelopeGroupRow NewEnvelopeGroupRow()
        {
            FFDataSet.EnvelopeGroupRow newRow = ffDataSet.EnvelopeGroup.NewEnvelopeGroupRow();

            newRow.id         = this.getNextIDFromTableNamed("EnvelopeGroup");
            newRow.name       = "";
            newRow.minPercent = 0m;
            newRow.maxPercent = 0m;

            ffDataSet.EnvelopeGroup.AddEnvelopeGroupRow(newRow);

            return(newRow);
        }
 /// <summary>
 /// Creates the object and keeps a reference to a new envelope group row.
 /// </summary>
 /// <param name="aRow"></param>
 public EnvelopeGroupModel()
 {
     this.envelopeGroupRow = MyData.getInstance().EnvelopeGroup.NewEnvelopeGroupRow();
     MyData.getInstance().EnvelopeGroup.AddEnvelopeGroupRow(this.envelopeGroupRow);
     this.saveRow();
 }
 /// <summary>
 /// Creates the object and keeps a local referance to the given envelope group row.
 /// </summary>
 /// <param name="aRow"></param>
 public EnvelopeGroupModel(FFDataSet.EnvelopeGroupRow egRow)
 {
     this.envelopeGroupRow = egRow;
 }
 public EnvelopeGroupDRM(FFDataSet.EnvelopeGroupRow atRow)
 {
     this.envelopeGroupRow = atRow;
 }
 public EnvelopeGroupDRM(string envelopeGroupName)
 {
     this.envelopeGroupRow = DataSetModel.Instance.NewEnvelopeGroupRow();
     this.Name             = envelopeGroupName;
 }
 public EnvelopeGroupDRM()
 {
     this.envelopeGroupRow = DataSetModel.Instance.NewEnvelopeGroupRow();
 }
Ejemplo n.º 8
0
        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);
            }
        }