public void GetRowClickedFromSessionSource(Session SessionRow) { List <SessionResult> sessionsResultByID = new DatabaseContext <SessionResult>().GetQuery("SELECT * FROM SessionResult WHERE ParentSessionID = ?", SessionRow.ID.ToString()); RanImagesSource.UpdateTableSource(sessionsResultByID); imageTableViewController.ReloadRanSessionTableData(); RanImagesSource.resetCount(); }
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); }; }