public TripView(Arrivaltime from, Point to, prod_dbContext _context)
        {
            fromDate = from.ArriveTime;
            _context.Point
            .Include(p => p.Route)
            .Include(p => p.Station)
            .Where(p => p.Id == from.PointId)
            .First();

            fromStation = from.Point.Station.Name;
            toStation   = to.Station.Name;

            routeName = from.Point.Route.Name;

            var arrivalTimeTo = _context.Arrivaltime
                                .Where(ar => ar.PointId == to.Id && ar.TripId == from.TripId).First();

            toDate = arrivalTimeTo.ArriveTime;

            var locomotivID             = from.Trip.LocomotiveId;
            var carriagesHasLocomotives = _context.CarriageHasLocomotive
                                          .Include(c => c.Carriage)
                                          .Where(c => c.LocomotiveId == locomotivID);

            tripID = from.TripId;
            fromID = from.Id;
            toID   = arrivalTimeTo.Id;
        }
 public AccountController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IEmailSender emailSender,
     ILogger <AccountController> logger,
     prod_dbContext contex)
 {
     _context       = contex;
     _userManager   = userManager;
     _signInManager = signInManager;
     _emailSender   = emailSender;
     _logger        = logger;
 }
 public TicketsController(prod_dbContext context)
 {
     _context = context;
 }
 public CountriesController(prod_dbContext context)
 {
     this._context = context;
 }
 public HomeController(prod_dbContext context, UserManager <ApplicationUser> manager)
 {
     _context = context;
     _manager = manager;
 }
 public UsersController(prod_dbContext context)
 {
     _context = context;
 }
 public StationsController(prod_dbContext context)
 {
     _context = context;
 }
 public TripsController(prod_dbContext context)
 {
     _context = context;
 }
Exemplo n.º 9
0
 public ArrivaltimesController(prod_dbContext context)
 {
     _context = context;
 }
 public PointsController(prod_dbContext context)
 {
     _context = context;
 }
 public CarriageHasLocomotivesController(prod_dbContext context)
 {
     _context = context;
 }
 public CarriagetypesController(prod_dbContext context)
 {
     _context = context;
 }
 public PrefixesController(prod_dbContext context)
 {
     _context = context;
 }
 public RoutesController(prod_dbContext context)
 {
     _context = context;
 }
 public LocomotivesController(prod_dbContext context)
 {
     _context = context;
 }
Exemplo n.º 16
0
 public RegionsController(prod_dbContext context)
 {
     this._context = context;
 }