Esempio n. 1
0
        /// <summary>
        /// Create a new List with new instances of ParcelFiscal.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="parcel"></param>
        /// <param name="startFiscalYear"></param>
        /// <param name="count"></param>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static List <Entity.ParcelFiscal> CreateFiscals(this PimsContext context, Entity.Parcel parcel, int startFiscalYear, int count, Entity.FiscalKeys key = Entity.FiscalKeys.Market, decimal value = 1)
        {
            var evaluations = new List <Entity.ParcelFiscal>(count);

            for (var i = startFiscalYear; i < (startFiscalYear + count); i++)
            {
                evaluations.Add(context.CreateFiscal(parcel, i, key, value));
            }
            return(evaluations);
        }
Esempio n. 2
0
        /// <summary>
        /// Create a new List with new instances of BuildingFiscals.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="building"></param>
        /// <param name="startFiscalYear"></param>
        /// <param name="count"></param>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static List <Entity.BuildingFiscal> CreateFiscals(this PimsContext context, Entity.Building building, int startFiscalYear, int count, Entity.FiscalKeys key = Entity.FiscalKeys.Estimated, decimal value = 1)
        {
            var evaluations = new List <Entity.BuildingFiscal>(count);

            for (var i = startFiscalYear; i < (startFiscalYear + count); i++)
            {
                evaluations.Add(context.CreateFiscal(building, i, key, value));
            }
            return(evaluations);
        }
Esempio n. 3
0
        /// <summary>
        /// Create a new List with new instances of ParcelFiscal.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="parcel"></param>
        /// <param name="fiscalYears"></param>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static List <Entity.ParcelFiscal> CreateFiscals(this PimsContext context, Entity.Parcel parcel, int[] fiscalYears, Entity.FiscalKeys key = Entity.FiscalKeys.Market, decimal value = 1)
        {
            var evaluations = new List <Entity.ParcelFiscal>(fiscalYears.Length);

            foreach (var fiscalYear in fiscalYears)
            {
                evaluations.Add(context.CreateFiscal(parcel, fiscalYear, key, value));
            }
            return(evaluations);
        }
Esempio n. 4
0
        /// <summary>
        /// Create a new List with new instances of BuildingFiscals.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="building"></param>
        /// <param name="fiscalYears"></param>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static List <Entity.BuildingFiscal> CreateFiscals(this PimsContext context, Entity.Building building, int[] fiscalYears, Entity.FiscalKeys key = Entity.FiscalKeys.Estimated, decimal value = 1)
        {
            var evaluations = new List <Entity.BuildingFiscal>(fiscalYears.Length);

            foreach (var fiscalYear in fiscalYears)
            {
                evaluations.Add(context.CreateFiscal(building, fiscalYear, key, value));
            }
            return(evaluations);
        }