Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ALedgerNumber"></param>
        public void InitialiseLedger(int ALedgerNumber)
        {
            FLedgerNumber = ALedgerNumber;
            FLedgerRow    =
                ((ALedgerTable)TDataCache.TMFinance.GetCacheableFinanceTable(TCacheableFinanceTablesEnum.LedgerDetails, FLedgerNumber))[0];

            txtLedger.Text = TFinanceControls.GetLedgerNumberAndName(FLedgerNumber);

            TFinanceControls.InitialiseAvailableEndOfYearsList(ref cmbPeriodYear, FLedgerNumber);
            cmbPeriodYear.SelectedIndex = 0;

            TFinanceControls.InitialiseAvailableEndOfYearsList(ref cmbQuarterYear, FLedgerNumber);
            cmbQuarterYear.SelectedIndex = 0;

            TFinanceControls.InitialiseAvailableEndOfYearsList(ref cmbBreakdownYear, FLedgerNumber);
            cmbBreakdownYear.SelectedIndex = 0;

            TFinanceControls.InitialiseAccountHierarchyList(ref cmbAccountHierarchy, FLedgerNumber);
            cmbAccountHierarchy.SelectedIndex = 0;

            // if there is only one hierarchy, disable the control
//          cmbAccountHierarchy.Enabled = (cmbAccountHierarchy.Count > 1);

            /* select the latest year TODO ??? */
//            if (this.CbB_AvailableYears.Items.Count > 0)
//            {
//                this.CbB_AvailableYears.SelectedIndex = 0; /// first item is the most current year
//            }
        }