Ejemplo n.º 1
0
        //public ActionResult AvilTaxi(string tno)
        //{
        //    Taxi tx = db.Taxis.ToList().Find(x => x.TaxiNo == tno);

        //    if (tx != null)
        //    {
        //        TaxiPosition tp = db.TaxiPosition.ToList().Find(x => x.TaxiNo == tno);

        //        Schedule sc = db.Schedules.ToList().Find(x => x.Position != 1);

        //        TaxiPosition newtp = db.TaxiPosition.ToList().Find(x => x.No == sc.No);

        //        Schedule s = db.Schedules.ToList().Find(x => x.Position == 1);


        //        s.Position = 1;

        //        s.ownerID = tx.ownerID;
        //        db.SaveChanges();
        //        tp.Position = 1;
        //        tp.driverID = newtp.driverID;

        //        Schedule news = new Schedule();
        //        news = sc;
        //        db.SaveChanges();

        //        TaxiPosition taxp = new TaxiPosition();
        //        taxp = newtp;
        //        db.SaveChanges();

        //        db.SaveChanges();
        //        tx.Status = "Loading";

        //        db.SaveChanges();
        //    }

        //    TempData["AlertMessage"] = "Taxi Availed";
        //    return RedirectToAction("SimlifiedSchedule");
        //}
        //public ActionResult SimlifiedSchedule()
        //{
        //    return View(db.Schedules.ToList());
        //}

        // GET: Schedules/Details/5
        //public ActionResult Details(int? id)
        //{
        //    if (id == null)
        //    {
        //        return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
        //    }
        //    Schedule schedule = db.Schedules.Find(id);
        //    if (schedule == null)
        //    {
        //        return HttpNotFound();
        //    }
        //    return View(schedule);
        //}

        // GET: Schedules/Create
        public ActionResult Create()
        {
            ViewBag.ownerID = new SelectList(ownerLogic.GetOwners(), "ownerID", "FirstName");
            ViewBag.RankId  = new SelectList(ranklogic.GetRanks(), "RankId", "RankName");
            ViewBag.RouteId = new SelectList(routeservice.GetRoutes(), "RouteId", "RouteName");
            ViewBag.id      = new SelectList(scheduledateLogic.GetScheduleDates(), "id", "Count");


            return(View());
        }
Ejemplo n.º 2
0
 // GET: ScheduleDates
 public ActionResult Index()
 {
     return(View(logic.GetScheduleDates()));
 }