コード例 #1
0
        private void CancelRoom()
        {
            AttendeesCancelSingleton singleton = AttendeesCancelSingleton.Instance;

            Persistance.CancelBooking(singleton.SelectedBooking);
            NavigateBack();
        }
コード例 #2
0
        private void GetAttendees()
        {
            AttendeesCancelSingleton singleton = AttendeesCancelSingleton.Instance;
            int bookingID = singleton.SelectedBooking.BookingID;

            AttendeeList = Persistance.GetAttendees(bookingID);
        }
コード例 #3
0
        private void PushToSingleton()
        {
            AttendeesCancelSingleton singleton = AttendeesCancelSingleton.Instance;

            singleton.SelectedBooking        = SelectedBooking;
            singleton.StudentsOnBooking      = StudentsOnBookingList;
            singleton.StudentsOnBookingGoing = StudentsOnBookingListGoing;
        }
コード例 #4
0
        //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
                });
            }
        }
コード例 #5
0
        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;
        }