public ActionResult ScheduleSlot(string date) { TeeTimeBooking ttb = new TeeTimeBooking(); ttb.ScheduledTime = DateTime.Parse(date); return(View(ttb)); }
public void BookTeeTime(TeeTimeBooking teetime) { using (SquawCreekDeVryEntities db = new SquawCreekDeVryEntities()) { TeeTime tt = new TeeTime(); tt.BookedBy = teetime.BookedBy; tt.Cart = teetime.Cart; tt.Id = Guid.NewGuid(); tt.Member = teetime.Member; tt.NumberOfPlayers = teetime.NumberOfPlayers; tt.Paid = false; tt.ScheduleTime = teetime.ScheduledTime; tt.Created = DateTime.Now; db.TeeTimes.Add(tt); db.SaveChanges(); } }
public ActionResult ScheduleSlot(TeeTimeBooking teetime) { m_teeTimeBO.BookTeeTime(teetime); return(View("BookSuccess")); }