protected async void Add_Clicked(object sender, EventArgs e) { var editViewModel = new AttendanceEditViewModel(viewModel.Users.ToList(), viewModel.Reasons.ToList(), null); var page = new AttendanceEditPage(); page.BindingContext = editViewModel; await((MainPage)App.Current.MainPage).NavigateTo(page, true); }
private async Task editAttendance(DataLayer.Models.Attendance attendance) { var editViewModel = new AttendanceEditViewModel(viewModel.Users.ToList(), viewModel.Reasons.ToList(), attendance); var page = new AttendanceEditPage(); page.BindingContext = editViewModel; await((MainPage)App.Current.MainPage).NavigateTo(page, true); }