static void Main(string[] args)
        {
            WorkBookConfig s        = WorkBookConfigReader.ReadConfig();
            List <object>  sameList = WorkBookReader.ToList(s);
            List <Appeal>  appeals  = AppealConverter.ObjectListToAppeal(sameList);
            Config         config   = ConfigReader.ReadConfig();

            DateTime[] workDays = DaysDestribution.WorkDayCalculator(config.StartDate, config.EndDate, config.HoliDays);
            AppealsDestributionToDate.AppealsDistributionOnDate(appeals, workDays);
            ExportToWorkbook.ExportToExcell(appeals);
            Console.WriteLine("Рекомбинация выполнена успешно");



            Console.ReadLine();
        }
Beispiel #2
0
        /// <summary>
        /// Метод для чтения из файла конфигурации
        /// </summary>
        /// <returns></returns>
        static public Config ReadConfig()
        {
            char spliter = Convert.ToChar(ConfigurationManager.AppSettings["spliter"]);


            DateTime firstQuaterStartDate = Convert.ToDateTime(ConfigurationManager.AppSettings["secondQuarterStartDate"]);
            DateTime firstQuaterEndDate   = Convert.ToDateTime(ConfigurationManager.AppSettings["secondQuarterEndDate"]);


            string[]   holiday            = ConfigurationManager.AppSettings["holidays"].Split(spliter);
            DateTime[] holidaysInDateTime = DaysDestribution.HolidaysConverter(holiday);

            return(new Config()
            {
                EndDate = firstQuaterEndDate, StartDate = firstQuaterStartDate, HoliDays = holidaysInDateTime
            });
        }