예제 #1
0
 public ActionResult LeaveGameRequest(LeaveGameRequestViewModel viewModel)
 {
     if (!ModelState.IsValid)
     return RedirectToAction("Index");
       var day = this.GetDay(viewModel.GameId, viewModel.SelectedTime);
       var price = day != null ? day.Price : 0;
       var salary = day != null ? day.Salary : 0;
       this.MakeOrder(viewModel.GameId, viewModel.CustomerName, viewModel.CustomerPhone, viewModel.SelectedTime, price, salary , true);
       return RedirectToAction("Index");
 }
예제 #2
0
 public ActionResult LeaveGameRequest(int gameId)
 {
     var viewModel = new LeaveGameRequestViewModel
       {
     GameId = gameId,
     SelectedTime = default(DateTime),
     AvailableTimes = this.GetAvailableTimes(gameId)
       };
       return PartialView("Partial/_LeaveGameRequest", viewModel);
 }