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); }
public void LogOut() { LoggedInSingleton logsingeton = LoggedInSingleton.Instance; logsingeton.LoggedStudentID = 0; NavigationService ns = new NavigationService(); ns.Navigate(typeof(LoginPage)); }
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)); }
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); }
private void GetAttendeeStatus() { LoggedInSingleton logsingleton = LoggedInSingleton.Instance; ifgoing = Persistance.GetOneAttendee(logsingleton.LoggedStudentID, SelectedMessage.BookingID); }
private void GetMessages() { LoggedInSingleton logsingleton = LoggedInSingleton.Instance; MessagesList = Persistance.GetMessages(logsingleton.LoggedStudentID); }