private void gigDisplayMethod(DisplayMethod displayMethod) { dataGridView1.Rows.Clear(); foreach (XElement gig in gigDoc.Element("Event_Guide").Elements("Gig")) { GigInfo currentGig = new GigInfo(); displayMethod(gig, currentGig); } }
private void displayByCurrentMonth(XElement gig, GigInfo currentGig) { String currentMonth = DateTime.Now.ToString("MM"); if (gig.Element("Date").Attribute("month").Value == currentMonth) gridRow.Add(currentGig.getInfo(gig)); }
//After implementing a button that searched for only "Hard Rock" I modified the code to search by genre private void filterByGenre(XElement gig, GigInfo currentGig) { if (gig.Element("Band").Element("Genre").Value == comboBox1.Text) gridRow.Add(currentGig.getInfo(gig)); }
private void displayAllGigs(XElement gig, GigInfo currentGig) { gridRow.Add(currentGig.getInfo(gig)); }