Пример #1
0
        public static Range[] GetRangeGiornoGas(DateTime giorno, DataRowView info, DefinedNames definedNames)
        {
            int row = definedNames.GetRowByName(info["SiglaEntita"], info["SiglaInformazione"], Date.GetSuffissoData(giorno));

            int gasDayStart    = TimeZone.CurrentTimeZone.IsDaylightSavingTime(giorno) ? 7 : 6;
            int remainingHours = 24 - Date.GetOreGiorno(giorno) + gasDayStart;

            Range rng1 = new Range(row, definedNames.GetColData1H1() + gasDayStart, 1, Date.GetOreGiorno(giorno) - gasDayStart);
            Range rng2 = new Range(row + 1, definedNames.GetColData1H1(), 1, remainingHours);

            return(new Range[] { rng1, rng2 });
        }