public ActionResult BookingKamar(int id, string hotel) { ViewBag.Id = id; ViewBag.Hotel = hotel; BookingKamar book = new BookingKamar(); book.tanggalCheckIn = DateTime.Now; book.tanggalCheckOut = DateTime.Now.AddDays(1); book.idKamar = id; book.namaHotel = hotel; return(View(book)); }
public ActionResult BookingKamar(BookingKamar book) { string user = User.Identity.Name; if (book.namaHotel == "hotel_kasur_empuk") { TRAVELANCAR.hotel_kasur_empuk_service.CompositeType respon = kasur_empuk.booking(book.tanggalCheckIn, book.tanggalCheckOut, user, book.idKamar); ViewBag.Kode = respon.kodeBooking; } else { TRAVELANCAR.hotel_mawar_melati_service.CompositeType respon = mawar_melati.booking(book.tanggalCheckIn, book.tanggalCheckOut, user, book.idKamar); ViewBag.Kode = respon.kodeBooking; } return(View("pesanbookingkamar", new BookingKamar())); }