Esempio n. 1
0
        private void Login()
        {
            Login login = Persistance.GetLoginData(EnteredName).Result;

            if (login == null)
            {
                MessageDialog msg = new MessageDialog("This name doesn't exist!");
                msg.ShowAsync();
                //NavigationService ns = new NavigationService();
                //ns.Navigate(typeof(LoginPage));
            }
            else
            {
                if (login.Password == EnteredPassword)
                {
                    LoggedInSingleton singletonlog = LoggedInSingleton.Instance;
                    singletonlog.LoggedStudentID = login.StudentID;
                    NavigateToMenu();
                }
                else
                {
                    MessageDialog msg = new MessageDialog("Entered password is incorrect!");
                    msg.ShowAsync();
                    //NavigationService ns = new NavigationService();
                    //ns.Navigate(typeof(LoginPage));
                }
            }
        }
        public void GetBookings() // Get the list of bookings from persistance
        {
            LoggedInSingleton loggedinsingleton = LoggedInSingleton.Instance;
            int studentID = loggedinsingleton.LoggedStudentID;

            Bookings = Persistance.GetBookings(studentID);
        }
Esempio n. 3
0
        public void LogOut()
        {
            LoggedInSingleton logsingeton = LoggedInSingleton.Instance;

            logsingeton.LoggedStudentID = 0;
            NavigationService ns = new NavigationService();

            ns.Navigate(typeof(LoginPage));
        }
Esempio n. 4
0
        private void AttendeeNotGoing()
        {
            LoggedInSingleton singlg = LoggedInSingleton.Instance;
            int logID = singlg.LoggedStudentID;

            Persistance.AttendeeNotGoing(logID, SelectedMessage.BookingID);
            FillTextBlocks();
            NavigationService ns = new NavigationService();

            ns.Navigate(typeof(MessagesPage));
        }
Esempio n. 5
0
        private void SendData()
        {
            BookingSingleton  singleton         = BookingSingleton.Instance;
            LoggedInSingleton singletonLoggedIn = LoggedInSingleton.Instance;
            DateTimePeriod    date = singleton.SelectedDate;
            int starttimeH         = singleton.StartTimeHour;
            int starttimeM         = singleton.StartTimeMinute;

            date = DateTimePeriodConverter.AppendToDate(date, starttimeH, starttimeM);
            string mydate = DateTimePeriodConverter.ToString(date);
            Room   room   = singleton.SelectedRoom;
            int    length = singleton.Length;

            int loggedstudentID = singletonLoggedIn.LoggedStudentID;

            Persistance.AddNewBooking(loggedstudentID, mydate, length, room.RommID, MeetingName, MeetingDescription);
        }
Esempio n. 6
0
        private void GetAttendeeStatus()
        {
            LoggedInSingleton logsingleton = LoggedInSingleton.Instance;

            ifgoing = Persistance.GetOneAttendee(logsingleton.LoggedStudentID, SelectedMessage.BookingID);
        }
Esempio n. 7
0
        private void GetMessages()
        {
            LoggedInSingleton logsingleton = LoggedInSingleton.Instance;

            MessagesList = Persistance.GetMessages(logsingleton.LoggedStudentID);
        }