public void addVenueDetailsToVenueProfile() { int venueId = -1; int theUserId = UIs.anna.LogInPage.userId; var v = Db_connector.ExecuteQuery(@"SELECT ve.id, ve.name, ar.country FROM venues ve JOIN area ar ON ve.areaID = ar.id WHERE ve.id = venueId ", new MySqlParameter("@venueId", venueId)); try { v.Read(); theSVenueProfilePage = new UIs.andrea.VenueProfilePage(v.GetInt32(0), v.GetString(1), null, null); } catch { theSVenueProfilePage = new UIs.andrea.VenueProfilePage(-1, "No Venue", null, null); } var z = Db_connector.ExecuteQuery(@"SELECT DISTINCT us.name, us.surname, evL.title FROM following fol JOIN users us ON fol.followed_user_id = us.id JOIN event_list evL ON fol.followed_user_id = evL.creatorID JOIN attendants att ON evL.id = att.eventListID JOIN event ev ON att.eventID = ev.id WHERE evL.title='HISTORY' AND fol.following_user_id = @theUserId AND ev.id = @venueId ", new[] { new MySqlParameter("@theUserId", theUserId), new MySqlParameter("@venueId", venueId) }); try { z.Read(); UIs.andrea.VenueProfilePage.Instance.friendsWhoHaveVisited(z.GetString(0), z.GetString(1)); } catch { UIs.andrea.VenueProfilePage.Instance.friendsWhoHaveVisited("No", "User"); } }
// ------------------------ VENUE PROFILE ------------------------ public void venueProfileToolStripMenuItem() { Controllers.UIController.Instance.MainSplitForm.middlePanel.Controls.Clear(); if (UIs.anna.LogInPage.loggedInUser == true) { addVenueDetailsToVenueProfile(); } else { theSVenueProfilePage = new UIs.andrea.VenueProfilePage(); } Controllers.UIController.Instance.MainSplitForm.middlePanel.Controls.Add(theSVenueProfilePage); designEditOfPanels(theSVenueProfilePage); }