Ejemplo n.º 1
0
 public IDictionary <string, decimal> GetPeriod(string period)
 {
     if (Periods.ContainsKey(period))
     {
         return(Periods[period]);
     }
     return(Periods[period] = new Dictionary <string, decimal>());
 }
        /// <summary>
        /// Get periods for specified locale.
        /// </summary>
        /// <param name="locale">Locale.</param>
        /// <returns>Periods for specified locale.</returns>
        protected virtual PeriodList GetPeriods(ILocale locale)
        {
            PeriodList periods = null;

            if (Periods.ContainsKey(locale.ISOCode))
            {
                periods = (PeriodList)(Periods[locale.ISOCode]);
            }
            return(periods);
        }
Ejemplo n.º 3
0
            }             // constructor

            public void Add(LoadDataForVatReturnSummary.ResultRow oRaw)
            {
                if (Periods.ContainsKey(oRaw.DateFrom))
                {
                    Periods[oRaw.DateFrom].Add(oRaw);
                }
                else
                {
                    Periods[oRaw.DateFrom] = new BusinessDataEntry(oRaw);
                }
            }             // Add
Ejemplo n.º 4
0
        /// <summary>
        /// Get periods for specified locale.
        /// </summary>
        /// <param name="locale">Locale.</param>
        /// <returns>Periods for specified locale.</returns>
        protected override PeriodList GetPeriods(ILocale locale)
        {
            PeriodList periods = null;

            lock (Periods)
            {
                if (Periods.ContainsKey(locale.ISOCode))
                {
                    periods = (PeriodList)(Periods[locale.ISOCode]);
                }
            }
            return(periods);
        }