public ActionResult NewRoute(RoutePageViewModel viewModel)
        {
            Trace.WriteLine("posted");

            if (string.IsNullOrEmpty(viewModel.Number)
                || string.IsNullOrEmpty(viewModel.Number))
            {
                viewModel.ErrorMessage = "Please provide the route number";
                return View(viewModel);
            }

            if (string.IsNullOrEmpty(viewModel.Vendor)
                || string.IsNullOrEmpty(viewModel.Vendor))
            {
                viewModel.ErrorMessage = "Please provide vendor";
                return View(viewModel);
            }
            if (string.IsNullOrEmpty(viewModel.Vendor)
                || string.IsNullOrEmpty(viewModel.URL))
            {
                viewModel.ErrorMessage = "Please provide url";
                return View(viewModel);
            }
            if (string.IsNullOrEmpty(viewModel.Vendor)
                || string.IsNullOrEmpty(viewModel.GPSID))
            {
                viewModel.ErrorMessage = "Please provide id";
                return View(viewModel);
            }
            User thisuser = _context.getUser(SimpleSessionPersister.Username);
            var newroute = new Route
                               {
                                   Number = viewModel.Number,
                                   GPSVendor = viewModel.Vendor,
                                   GPSURL = viewModel.URL,
                                   Company = thisuser.Organization,
                                   GPSID = viewModel.GPSID,
                                   Driver = viewModel.Driver
                               };
            Trace.WriteLine("posted");
            _context.Routes.Add(newroute);
            _context.SaveChanges();
            //List<Route> routes = _context.Routes.Where(r => r.Company.Equals(thisuser.Organization)).ToList();
            //Company comp = null;
            //foreach (Company c in _context.Companies.Where(c => c.OwnerName.Equals(thisuser.Name)))
            //{
            //    comp = c;
            //}

            //comp.TotalRoutes = routes.Count().ToString();
            _context.SaveChanges();
            //Trace.WriteLine();
            return RedirectToAction("Routes", "SMJob");
        }
        public ActionResult NewRoute()
        {
            var vm = new RoutePageViewModel
                         {
                             Number = "Number",
                             Vendor = "Vendor",
                             URL = "URL",
                             GPSID = "GPSID"
                         };

            return View(vm);
        }