/// <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_GiftBatches_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_GiftBatches_LoadAndFilter(FLedgerNumber, FMainDS, FFilterAndFindObject); FImportLogicObject = new TUC_GiftBatches_Import(FPetraUtilsObject, FLedgerNumber, this); FPostingLogicObject = new TUC_GiftBatches_Post(FPetraUtilsObject, FLedgerNumber, FMainDS); FReceiptingLogicObject = new TUC_GiftBatches_Receipt(); FCancelLogicObject = new TUC_GiftBatches_Cancel(FPetraUtilsObject, FLedgerNumber, FMainDS); FAccountAndCostCentreLogicObject = new TUC_GiftBatches_AccountAndCostCentre(FLedgerNumber, FMainDS, cmbDetailBankAccountCode, cmbDetailBankCostCentre); }
private void InitialiseLogicObjects() { FLoadAndFilterLogicObject = new TUC_GiftBatches_LoadAndFilter(FPetraUtilsObject, FLedgerNumber, FMainDS, FFilterAndFindObject); FImportLogicObject = new TUC_GiftBatches_Import(FPetraUtilsObject, FLedgerNumber, this); FPostingLogicObject = new TUC_GiftBatches_Post(FPetraUtilsObject, FLedgerNumber, FMainDS); FReceiptingLogicObject = new TUC_GiftBatches_Receipt(); FCancelLogicObject = new TUC_GiftBatches_Cancel(FPetraUtilsObject, FLedgerNumber, FMainDS); FAccountAndCostCentreLogicObject = new TUC_GiftBatches_AccountAndCostCentre(FLedgerNumber, FMainDS, cmbDetailBankAccountCode, cmbDetailBankCostCentre); }
/// <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> public void RefreshBankAccountAndCostCentreData(TUC_GiftBatches_LoadAndFilter ALoadAndFilterLogicObject) { //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; //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; }