// Once the button is clicked it calls the Show() method to make an instance of // the MinorDialog class with the information loaded in from the API private void webddBtn_Click(object sender, EventArgs e) { string jsonWEBDD = getRESTData("/minors/UgMinors/name=WEBDD-MN"); Minor webdd = JToken.Parse(jsonWEBDD).ToObject <Minor>(); MinorDialog popup = new MinorDialog(); popup.Show(webdd.title, webdd.title, webdd.description, webdd.courses); }
// Once the button is clicked it calls the Show() method to make an instance of // the MinorDialog class with the information loaded in from the API private void netsysBtn_Click(object sender, EventArgs e) { string jsonNET = getRESTData("/minors/UgMinors/name=NETSYS-MN"); Minor net = JToken.Parse(jsonNET).ToObject <Minor>(); MinorDialog popup = new MinorDialog(); popup.Show(net.title, net.title, net.description, net.courses); }
// Once the button is clicked it calls the Show() method to make an instance of // the MinorDialog class with the information loaded in from the API private void mdevBtn_Click(object sender, EventArgs e) { string jsonMDEV = getRESTData("/minors/UgMinors/name=MDEV-MN"); Minor mdev = JToken.Parse(jsonMDEV).ToObject <Minor>(); MinorDialog popup = new MinorDialog(); popup.Show(mdev.title, mdev.title, mdev.description, mdev.courses); }
// Once the button is clicked it calls the Show() method to make an instance of // the MinorDialog class with the information loaded in from the API private void medBtn_Click(object sender, EventArgs e) { string jsonMED = getRESTData("/minors/UgMinors/name=MEDINFO-MN"); Minor med = JToken.Parse(jsonMED).ToObject <Minor>(); MinorDialog popup = new MinorDialog(); popup.Show(med.title, med.title, med.description, med.courses); }
// Once the button is clicked it calls the Show() method to make an instance of // the MinorDialog class with the information loaded in from the API private void gisBtn_Click(object sender, EventArgs e) { string jsonGIS = getRESTData("/minors/UgMinors/name=GIS-MN"); Minor gis = JToken.Parse(jsonGIS).ToObject <Minor>(); MinorDialog popup = new MinorDialog(); popup.Show(gis.title, gis.title, gis.description, gis.courses); }
// Once the button is clicked it calls the Show() method to make an instance of // the MinorDialog class with the information loaded in from the API private void dbBtn_Click(object sender, EventArgs e) { string jsonDB = getRESTData("/minors/UgMinors/name=DBDDI-MN"); Minor db = JToken.Parse(jsonDB).ToObject <Minor>(); MinorDialog popup = new MinorDialog(); popup.Show(db.title, db.title, db.description, db.courses); }