private void CancelRoom() { AttendeesCancelSingleton singleton = AttendeesCancelSingleton.Instance; Persistance.CancelBooking(singleton.SelectedBooking); NavigateBack(); }
private void GetAttendees() { AttendeesCancelSingleton singleton = AttendeesCancelSingleton.Instance; int bookingID = singleton.SelectedBooking.BookingID; AttendeeList = Persistance.GetAttendees(bookingID); }
private void PushToSingleton() { AttendeesCancelSingleton singleton = AttendeesCancelSingleton.Instance; singleton.SelectedBooking = SelectedBooking; singleton.StudentsOnBooking = StudentsOnBookingList; singleton.StudentsOnBookingGoing = StudentsOnBookingListGoing; }
//private void MakeAttendees() //{ // AttendeesCancelSingleton singleton = AttendeesCancelSingleton.Instance; // int ifgoing = 2; // Attendee attendee = new Attendee() { BookingID = singleton.SelectedBooking.BookingID, StudentID = SelectedStudent.StudentID, Going = ifgoing}; // ListOfAttendees.Add(attendee); // //GetAttendees(); //} private void MakeAttendees() { AttendeesCancelSingleton sing = AttendeesCancelSingleton.Instance; foreach (var stud in ListOfStudents) { ListOfAttendees.Add(new Attendee() { StudentID = stud.StudentID, BookingID = sing.SelectedBooking.BookingID, Going = 2 }); } }
public BookingDescriptionToCancelVM() { NavigateToMenuPageCommand = new RelayCommand(NavigateToMenuPage); NavigateBackCommand = new RelayCommand(NavigateBack); CancelRoomCommand = new RelayCommand(CancelRoom); AttendeesCancelSingleton singleton = AttendeesCancelSingleton.Instance; //Initialize the properties with the data from singleton (previous page) MeetingName = singleton.SelectedBooking.BookingTitle; Date = DateTimePeriodConverter.ToDate(singleton.SelectedBooking.StartTime); Length = singleton.SelectedBooking.Length; RoomNumber = singleton.SelectedBooking.RoomID; Description = singleton.SelectedBooking.Description; GoingStudents = singleton.StudentsOnBooking; StatetThatGoing = singleton.StudentsOnBookingGoing; }