Exemplo n.º 1
0
        public static BudgetTDS LoadBudget(Int32 ALedgerNumber)
        {
            BudgetTDS MainDS = new BudgetTDS();

            TDBTransaction Transaction = null;

            DBAccess.GDBAccessObj.GetNewOrExistingAutoReadTransaction(IsolationLevel.ReadCommitted,
                                                                      TEnforceIsolationLevel.eilMinimum,
                                                                      ref Transaction,
                                                                      delegate
            {
                //TODO: need to filter on Year
                ABudgetAccess.LoadViaALedger(MainDS, ALedgerNumber, Transaction);
                ABudgetRevisionAccess.LoadViaALedger(MainDS, ALedgerNumber, Transaction);
                //TODO: need to filter on ABudgetPeriod using LoadViaBudget or LoadViaUniqueKey
                ABudgetPeriodAccess.LoadAll(MainDS, Transaction);
                ALedgerAccess.LoadByPrimaryKey(MainDS, ALedgerNumber, Transaction);

                //            ABudgetPeriodTable BudgetPeriodTable = new ABudgetPeriodTable();
                //            ABudgetPeriodRow TemplateRow = (ABudgetPeriodRow)BudgetPeriodTable.NewRow(false);
                //
                //            TemplateRow.BudgetSequence;
                //            ABudgetPeriodAccess.LoadViaABudgetTemplate(MainDS, TemplateRow, Transaction);
            });

            // Accept row changes here so that the Client gets 'unmodified' rows
            MainDS.AcceptChanges();

            // Remove all Tables that were not filled with data before remoting them.
            MainDS.RemoveEmptyTables();

            return(MainDS);
        }
Exemplo n.º 2
0
        public static BudgetTDS LoadBudgetForAutoGenerate(Int32 ALedgerNumber)
        {
            TDBTransaction Transaction = null;

            DBAccess.GDBAccessObj.GetNewOrExistingAutoReadTransaction(IsolationLevel.ReadCommitted,
                                                                      TEnforceIsolationLevel.eilMinimum,
                                                                      ref Transaction,
                                                                      delegate
            {
                //TODO: need to filter on Year
                ABudgetAccess.LoadViaALedger(FMainDS, ALedgerNumber, Transaction);
                ABudgetRevisionAccess.LoadViaALedger(FMainDS, ALedgerNumber, Transaction);
                //TODO: need to filter on ABudgetPeriod using LoadViaBudget or LoadViaUniqueKey
                ABudgetPeriodAccess.LoadAll(FMainDS, Transaction);
                ALedgerAccess.LoadByPrimaryKey(FMainDS, ALedgerNumber, Transaction);
                ABudgetTypeAccess.LoadAll(FMainDS, Transaction);
            });

            // Accept row changes here so that the Client gets 'unmodified' rows
            FMainDS.AcceptChanges();

            // Remove all Tables that were not filled with data before remoting them.
            FMainDS.RemoveEmptyTables();

            return(FMainDS);
        }