public async Task <ActionResult> Create([Bind(Include = "Id,username,password")] Admin_t admin_t) { if (ModelState.IsValid) { db.Admin_t.Add(admin_t); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(admin_t)); }
public async Task <ActionResult> Create([Bind(Include = "Id,Fname,Lname,Kids,Adult,Elders,Phone")] Passenger_info passenger_info) { if (ModelState.IsValid) { db.Passenger_info.Add(passenger_info); await db.SaveChangesAsync(); return(RedirectToAction("Details", new { @id = passenger_info.Id })); } return(View()); }
public async Task <ActionResult> Create([Bind(Include = "Id,From,To,Depart,Return")] Passenger_location passenger_location) { if (ModelState.IsValid) { db.Passenger_location.Add(passenger_location); await db.SaveChangesAsync(); // return RedirectToAction("Index"); } //return View(passenger_location); return(RedirectToAction("Create", "Passenger_info")); }