Ejemplo n.º 1
0
        public ActionResult BuyTicket()
        {
            ktmTable ktmTab = new ktmTable();

            ViewBag.Rate     = ktmTab.rate;
            ViewBag.DictLane = ktmTab.dictLane;
            return(View());
        }
Ejemplo n.º 2
0
 public ActionResult BuyTicket(TicketDetails td)
 {
     if (ModelState.IsValid)
     {
         //return View("PurchaseDetails", td);
         return(RedirectToAction("PurchaseDetails", new
         {
             OriginLoc = td.Destination.OriginLoc,
             DestiLoc = td.Destination.DestiLoc,
             WayLoc = td.Destination.WayLoc,
             Citizen = td.Destination.Citizen,
             Quantity = td.Destination.Quantity
         }));
     }
     else
     {
         // there is a validation error
         ktmTable ktmTab = new ktmTable();
         ViewBag.Rate     = ktmTab.rate;
         ViewBag.DictLane = ktmTab.dictLane;
         return(View());
     }
 }