Example #1
0
        public IActionResult CreatePlanCalendar(IFormFile fileCalendar)
        {
            if (ModelState.IsValid && fileCalendar != null)
            {
                var collection = _planCalendarFactory.ParseFile(fileCalendar);
                foreach (var item in collection)
                {
                    _planCalendarSevice.CreatePlanCalendar(_planCalendarFactory.GetEntity(item));
                }

                return(RedirectToAction("Index", "Home"));
            }
            return(NotFound());
        }