/// <summary>
 /// Method for transition to previous table marks page
 /// </summary>
 private void PreviousRatingsPageMouseDown(object sender, MouseButtonEventArgs e)
 {
     if (currentPageNumber < logic.GetPageCount(pageLimit) - 1)
     {
         currentPageNumber += 1;
         content.pageIndexTextblock.Text = $"{currentPageNumber + 1} of {logic.GetPageCount(pageLimit)}";
         FillMarksTable();
     }
 }
        public ProfilePage()
        {
            Console.WriteLine(App.userToDisplay);
            this.logic        = new ProfilePageVM(new SQLiteDataService(), App.userToDisplay);
            App.userToDisplay = App.currentUser;
            InitializeComponent();
            searchBar.textSearch.KeyDown  += SearchBar_TextSearch_Search_On_KeyDown;
            navbar.button_Profile.Click   += ProfileTransition;
            navbar.button_FAQ.Click       += FAQTransition;
            navbar.button_Notes.Click     += NotesTransition;
            navbar.button_TimeTable.Click += TimetableTransition;
            navbar.button_Profile.Style    = Application.Current.Resources["MenuButtonActive"] as Style;
            if (logic.GetPerson() != null)
            {
                content.nameSurnameTextblock.Text = logic.GetPerson().Name + " " + logic.GetPerson().Surname;

                BitmapImage temp = new BitmapImage();
                temp.BeginInit();
                temp.CacheOption = BitmapCacheOption.OnLoad;
                temp.UriSource   = new Uri("../../" + logic.GetPerson().Photo, UriKind.Relative);
                temp.EndInit();
                content.profilePhoto.Source = temp;
                if (logic.GetLecturer() != null)
                {
                    content.groupDepartmentLabel.Text           = "Department:";
                    content.groupDepartmentTextblock.Text       = logic.GetLecturer().Department;
                    content.numberZalikovkaLabel.Visibility     = Visibility.Hidden;
                    content.numberZalikovkaTextblock.Visibility = Visibility.Hidden;
                    content.courseLabel.Visibility     = Visibility.Hidden;
                    content.courseTextblock.Visibility = Visibility.Hidden;
                    content.marks.Visibility           = Visibility.Hidden;
                    content.buttonNext.Visibility      = Visibility.Hidden;
                    content.buttonPrev.Visibility      = Visibility.Hidden;
                }
                else if (logic.GetStudent() != null)
                {
                    logic.GetRatings();
                    content.groupDepartmentTextblock.Text       = logic.GetStudent().GroupID;
                    content.courseTextblock.Text                = logic.GetGroup().Course.ToString();
                    content.numberZalikovkaTextblock.Text       = logic.GetStudent().TicketNumber.ToString();
                    content.marks.HeadRow1.subjectColumn.Click += SortRatingsBySubjectClick;
                    content.marks.HeadRow1.markColumn.Click    += SortRatingsByMarkClick;
                    content.marks.HeadRow2.subjectColumn.Click += SortRatingsBySubjectClick;
                    content.marks.HeadRow2.markColumn.Click    += SortRatingsByMarkClick;
                    content.buttonNext.MouseDown               += PreviousRatingsPageMouseDown;
                    content.buttonPrev.MouseDown               += NextRatingsPageMouseDown;
                    double pages = logic.GetPageCount(pageLimit);
                    if (pages < 1)
                    {
                        pages = 1;
                    }
                    content.pageIndexTextblock.Text = $"{currentPageNumber + 1} of {pages}";

                    FillMarksTable();
                }
            }
        }