/// <summary> /// Call this to initialise the 'Lists' (tables) for the ComboBoxes /// </summary> /// <param name="ALoadAndFilterLogicObject">Supply a reference to the Filter Logic object because it needs a reference to the same Lists</param> /// <param name="ACostCentreTab"></param> /// <param name="AAccountTab"></param> public void RefreshBankAccountAndCostCentreData(TUC_RecurringGiftBatches_LoadAndFilter ALoadAndFilterLogicObject, out ACostCentreTable ACostCentreTab, out AAccountTable AAccountTab) { //Populate CostCentreList variable DataTable CostCentreList = TDataCache.TMFinance.GetCacheableFinanceTable(TCacheableFinanceTablesEnum.CostCentreList, FLedgerNumber); ACostCentreTable TmpCostCentreTable = new ACostCentreTable(); FMainDS.Tables.Add(TmpCostCentreTable); DataUtilities.ChangeDataTableToTypedDataTable(ref CostCentreList, FMainDS.Tables[TmpCostCentreTable.TableName].GetType(), ""); FMainDS.RemoveTable(TmpCostCentreTable.TableName); FCostCentreTable = (ACostCentreTable)CostCentreList; ALoadAndFilterLogicObject.CostCentreTable = FCostCentreTable; ACostCentreTab = FCostCentreTable; //Populate AccountList variable DataTable AccountList = TDataCache.TMFinance.GetCacheableFinanceTable(TCacheableFinanceTablesEnum.AccountList, FLedgerNumber); AAccountTable TmpAccountTable = new AAccountTable(); FMainDS.Tables.Add(TmpAccountTable); DataUtilities.ChangeDataTableToTypedDataTable(ref AccountList, FMainDS.Tables[TmpAccountTable.TableName].GetType(), ""); FMainDS.RemoveTable(TmpAccountTable.TableName); FAccountTable = (AAccountTable)AccountList; ALoadAndFilterLogicObject.AccountTable = FAccountTable; AAccountTab = FAccountTable; }
private void InitialiseLogicObjects() { FLoadAndFilterLogicObject = new TUC_RecurringGiftBatches_LoadAndFilter(FPetraUtilsObject, FLedgerNumber, FMainDS, FFilterAndFindObject); FSubmitLogicObject = new TUC_RecurringGiftBatches_Submit(FPetraUtilsObject, FLedgerNumber, FMainDS); FDeleteLogicObject = new TUC_RecurringGiftBatches_Delete(FPetraUtilsObject, FLedgerNumber, FMainDS); FAccountAndCostCentreLogicObject = new TUC_RecurringGiftBatches_AccountAndCostCentre(FLedgerNumber, FMainDS, cmbDetailBankAccountCode, cmbDetailBankCostCentre); }