Пример #1
0
        public ActionResult Index(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            var cs = chartService.Get(id);

            if (cs == null)
            {
                return(NotFound());
            }
            return(View(cs));
        }
Пример #2
0
        static private void MakeChart(string ScheduleFile, string FormatFile, int Year, List<Group> groups, List<League> leagues)
        {
            var fileService = new FileService();
            var schedule = fileService.ReadSchedule(ScheduleFile);
            var division = fileService.ReadFormatFile(FormatFile);

            var dataService = new DataService(schedule, division, groups, leagues);
            var chartService = new ChartService();
            var chart = chartService.Get(dataService);

            using (StreamWriter sw = new StreamWriter(Path.Combine(dataPath.Replace("data", "output"), "chartYYYY.html".Replace("YYYY", Year.ToString()))))
            {
                sw.WriteLine("<html><style>td { font-family: Arial; font-size: 9pt; border-spacing: 0px; padding: 0px; border-collapse: collapse; } tr { border-spacing: 0px; padding: 0px; border-collapse: collapse; } table { border-spacing: 0px; padding: 0px; border-collapse: collapse; }</style><body>");
                sw.WriteLine(chart);
                sw.WriteLine("</body></html>");
            }
        }