Exemplo n.º 1
0
      public ActionResult Search(RealArrivedTimeOfTrain realArrivedTimeOfTrain)
      {
          realArrivedTimeOfTrain.PersonID = User.Identity.GetUserId();
          if (realArrivedTimeOfTrain == null)
          {
              return(HttpNotFound());
          }

          return(RedirectToAction("Result", new { id = realArrivedTimeOfTrain.TrainID }));
      }
Exemplo n.º 2
0
      public ActionResult Answer(RealArrivedTimeOfTrain realArrivedTimeOfTrain)
      {
          realArrivedTimeOfTrain.PersonID = User.Identity.GetUserId();

          db.RealArrivedTimeOfTrains.Add(realArrivedTimeOfTrain);
          db.SaveChanges();



          ViewBag.StationID = new SelectList(db.Stations, "ID", "Name");
          ViewBag.TrainID   = new SelectList(db.Trains, "ID", "Number");
          return(View(realArrivedTimeOfTrain));
      }