public PageEventInfo(EvenementModel evenement) { InitializeComponent(); nameExit.Text = evenement.Name; addressExit.Text = evenement.Address; postalCodeExit.Text = evenement.PostalCode; numberExit.Text = evenement.CellularNumber; numberMaxOfPeopleExit.Text = evenement.NumberMaxOfPeople; dateExit.Text = evenement.Date; timeExit.Text = evenement.Time; descriptionExit.Text = evenement.Description; }
// Save info when click on button "OK" private async void ClickValidate(object sender, EventArgs e) { // Get value of each entry in the model var evenement = new EvenementModel { Name = entryName.Text, Address = entryAddress.Text, PostalCode = entryPostalCode.Text, CellularNumber = entryNumber.Text, NumberMaxOfPeople = entryNumbermaxOfPeople.Text, Date = dateOfEvent.Date.ToString("dd/MM/yyyy"), Time = timeOfEvent.Time.ToString(), Description = entryDescription.Text }; // Add evenement to the list listEvent.AddEvent(evenement); // Go to the PageEnventInfo var newPage = new PageEventInfo(evenement); await Navigation.PushAsync(newPage); }