Example #1
0
        public IActionResult NewRoute(RouteAddViewModel route)
        {
            if (route.CheckCorrectRoute == 2)
            {
                route.IsCorrectRoute = false;
            }
            else
            {
                route.IsCorrectRoute = true;
            }

            var checkCreate = _routeService.AddRouteDetailAndRouteSchedule(_mapper.Map <RouteAddSharedModel>(route));

            if (!checkCreate)
            {
                return(NotFound());
            }
            return(RedirectToAction("Index"));
        }