public Confirmation(object tutor, object reservations) { confirmVM = new ConfirmationVM(tutor, reservations); InitializeComponent(); confirmVM.Navigation = this.Navigation; this.BindingContext = confirmVM; }
public bool send(string title, string message, DialogMode mode = DialogMode.Notification) { switch (mode) { case DialogMode.Confirmation: //Notification. ConfirmationVM _confirmation = new ConfirmationVM(title, message); if (ContainerStore.Singleton.windows.showDialog <ConfirmationVM>(_confirmation).Value) { return(true); } break; case DialogMode.GetInput: //Notification. GetInputVM _getInput = new GetInputVM(title, message); if (ContainerStore.Singleton.windows.showDialog <GetInputVM>(_getInput).Value) { return(true); } break; case DialogMode.Notification: //Notification. NotificationVM _notification = new NotificationVM(title, message); if (ContainerStore.Singleton.windows.showDialog <NotificationVM>(InputViewModel: _notification).Value) { return(true); } break; } return(false); }
public IActionResult Index(int id) { try { var model = new ConfirmationVM { SubmissionId = "GFOL-123-" + id }; return(View(model)); } catch (Exception e) { _logger.Log(LogLevel.Error, e.Message, e); return(RedirectToAction("ProblemWithService", "Error"));//Todo let middleware deal with errors } }
public ActionResult Confirmation(string[] rooms_list) { // En premier lieu, pour chaque chambre récupérée, je ressors les informations de la chambre List <Room> rooms = new List <Room>(); decimal totalPrice = 0; foreach (string item in rooms_list) { int id = Convert.ToInt16(item); Room newRoom = RoomManager.GetRoom(id); totalPrice += newRoom.Price; rooms.Add(newRoom); } // Je récupère le reste des informations sur la base du ViewModel ConfirmationVM Hotel hotel = HotelManager.GetHotel(Convert.ToInt16(rooms[0].IdHotel)); DateTime dateStart = Convert.ToDateTime(Session["dateStart"]); DateTime dateEnd = Convert.ToDateTime(Session["dateEnd"]); int duration = (dateEnd - dateStart).Days; ConfirmationVM confirmation = new ConfirmationVM { DateStart = dateStart, DateEnd = dateEnd, Duration = duration, Name = hotel.Name, Location = hotel.Location, Rooms = rooms, TotalPrice = totalPrice }; // Je récupère l'état de l'increase (hidden input) dans une variable de session Session["increase"] = Request["increase"]; return(View(confirmation)); }
public Confirmation() { InitializeComponent(); BindingContext = new ConfirmationVM(); }