public void GetRowClickedFromCategorySource(Category CategoryRow)
        {
            imageTableViewController.View.Hidden = true;
            SessionCategory = CategoryRow;
            imageTableViewController.setTitle(SessionCategory.CategoryName);
            //**RIGHT HERE

            List <Session> sessionsByProfileCategory          = new DatabaseContext <Session>().GetQuery("SELECT * FROM Session WHERE CategoryID = ? and ParentProfileID = ?", new string[] { SessionCategory.ID.ToString(), CurrentProfile.ID.ToString() });
            List <Session> specificProfileSessionsListTrimmed = new List <Session>();

            if (sessionsByProfileCategory.Count > 0)
            {
                for (int i = 0; i < sessionsByProfileCategory.Count; i++)
                {
                    if (sessionsByProfileCategory[i].CategoryID.Equals(SessionCategory.ID))
                    {
                        specificProfileSessionsListTrimmed.Add(sessionsByProfileCategory[i]);
                    }
                }
            }
            //SessionSource.UpdateTableSource(specificProfileSessionsListTrimmed);
            SessionSource.UpdateTableSource(specificProfileSessionsListTrimmed);
            ranSessions.ReloadSessionTableData(SessionSource);
            imageTableViewController.ReloadRanSessionTableData();
            //RanImagesSource = new TableSourceRanImages();
        }
        public void GetRowClickedFromProfilesSource(Profiles ProfileRow)
        {
            //Get Session List, Send to Session Table
            List <Session> sessionsList = new DatabaseContext <Session>().GetQuery("Select * From Session WHERE ParentProfileID = ?", ProfileRow.ID.ToString());

            sessionSplitViewController.setProfile(ProfileRow);

            SessionSource.UpdateTableSource(sessionsList);
            sessionSplitViewController.updateNameLabel(ProfileRow.FirstName + " " + ProfileRow.LastName);
            sessions.ReloadSessionTableData();
            //CollectionViewTable.View.Hidden = true;
        }
Exemplo n.º 3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            setPercentageLabel();
            btnYes.TouchUpInside += (sender, e) =>
            {
                if (ReturnSessionData != null && _Session != null)                 //check if delegate has been initialized
                {
                    ReturnSessionData(_Session, _Attempted, _Correct);
                }

                List <Session> sessionsByProfileCategory          = new DatabaseContext <Session>().GetQuery("SELECT * FROM Session WHERE CategoryID = ? and ParentProfileID = ?", new string[] { SessionCategory.ID.ToString(), CurrentProfile.ID.ToString() });
                List <Session> specificProfileSessionsListTrimmed = new List <Session>();
                if (sessionsByProfileCategory.Count > 0)
                {
                    for (int i = 0; i < sessionsByProfileCategory.Count; i++)
                    {
                        if (sessionsByProfileCategory[i].CategoryID.Equals(SessionCategory.ID))
                        {
                            specificProfileSessionsListTrimmed.Add(sessionsByProfileCategory[i]);
                        }
                    }
                }
                //SessionSource.UpdateTableSource(specificProfileSessionsListTrimmed);
                SessionSource.UpdateTableSource(specificProfileSessionsListTrimmed);
                ranSessions.ReloadSessionTableData(SessionSource);
                imageTableViewController.ReloadRanSessionTableData();
                //RanImagesSource = new TableSourceRanImages();

                tabBar.SelectedIndex = 4;
                tabBar.DismissModalViewController(true);
            };

            btnNo.TouchUpInside += (sender, e) =>
            {
                tabBar.SelectedIndex = 4;
                tabBar.DismissModalViewController(true);
            };
        }