}//end of staff private void employment_Enter(object sender, EventArgs e) { // get About information string jsonAbout = getRestData("/employment/"); // need a way to get the JSON form into a Employment object Employment emp = JToken.Parse(jsonAbout).ToObject <Employment>(); //getting details of each employment emptitle.Text = emp.introduction.title; contentemptitle.Text = emp.introduction.content[0].title; contEmpdescription.Text = emp.introduction.content[0].description; //getting statistics values from Employment object statisticsVal1.Text = emp.degreeStatistics.statistics[0].value + "\n" + emp.degreeStatistics.statistics[0].description; statisticsVal2.Text = emp.degreeStatistics.statistics[1].value + "\n" + emp.degreeStatistics.statistics[1].description; statisticsVal3.Text = emp.degreeStatistics.statistics[2].value + "\n" + emp.degreeStatistics.statistics[2].description; statisticsVal4.Text = emp.degreeStatistics.statistics[3].value + "\n" + emp.degreeStatistics.statistics[3].description; //getting coop and emp values from Employment object contCoopdescription.Text = emp.introduction.content[1].description; contentcooptitle.Text = emp.introduction.content[1].title; //getting employer and career values from Employment object employerNames.DataSource = emp.employers.employerNames; careerNames.DataSource = emp.careers.careerNames; employerNames.ClearSelected(); careerNames.ClearSelected(); //getting table values from Employment object coopTabletitle.Text = emp.coopTable.title + "\n(click here to see the co-op table)"; employmentTable.Text = emp.employmentTable.title + "\n(click here to see the employment table)"; }//end of employment
}//public void getCoopDetails() //get employment tablefor after the click of the button public void getEmplyomentTable() { //get data for employment string employment = getRestData("/employment/"); Employment employmentdata = JToken.Parse(employment).ToObject <Employment>(); //class to show the cooptable employmentTable cooptable = new employmentTable(employmentdata); cooptable.ShowDialog(); }//public void getEmplyomentTable()
} // private void button9_Click(object sender, EventArgs e) //get tge data for the eompyment tab public void getemploymentdata() { string employment = getRestData("/employment/"); Employment employmentdata = JToken.Parse(employment).ToObject <Employment>(); label9.Text = employmentdata.introduction.title; for (int i = 0; i < employmentdata.introduction.content.Count; i++) { if (i == 0) { label10.Text = employmentdata.introduction.content[i].title; richTextBox12.Text = employmentdata.introduction.content[i].description; }//if (i == 0) else { label11.Text = employmentdata.introduction.content[i].title; richTextBox13.Text = employmentdata.introduction.content[i].description; } //else } //for (int i=0; i < employmentdata.introduction.content.Count; i++ ) label12.Text = employmentdata.degreeStatistics.title; for (int i = 0; i < employmentdata.degreeStatistics.statistics.Count; i++) { //swtich case to change the text description according to the value switch (i) { case 0: label13.Text = employmentdata.degreeStatistics.statistics[i].value; richTextBox14.Text = employmentdata.degreeStatistics.statistics[i].description; break; case 1: label14.Text = employmentdata.degreeStatistics.statistics[i].value; richTextBox15.Text = employmentdata.degreeStatistics.statistics[i].description; break; case 2: label15.Text = employmentdata.degreeStatistics.statistics[i].value; richTextBox16.Text = employmentdata.degreeStatistics.statistics[i].description; break; case 3: label16.Text = employmentdata.degreeStatistics.statistics[i].value; richTextBox17.Text = employmentdata.degreeStatistics.statistics[i].description; break; default: break; } //switch (i) } //for (int i = 0; i < employmentdata.degreeStatistics.statistics.Count; i++) //onselectindexchange } //public void getemploymentdata()
}//private void button4_Click(object sender, EventArgs e) //get coopdetails for the table layout public void getCoopDetails() { //get data for employment string employment = getRestData("/employment/"); Employment employmentdata = JToken.Parse(employment).ToObject <Employment>(); Cooptable cooptable = new Cooptable(employmentdata); //calling the coop dialog class cooptable.ShowDialog(); }//public void getCoopDetails()
public employmentTable(object sender) { InitializeComponent(); Employment employment = sender as Employment; for (int i = 0; i < employment.employmentTable.professionalEmploymentInformation.Count; i++) { dataGridView1.Rows.Add(); dataGridView1.Rows[i].Cells[0].Value = employment.employmentTable.professionalEmploymentInformation[i].degree; dataGridView1.Rows[i].Cells[1].Value = employment.employmentTable.professionalEmploymentInformation[i].employer; dataGridView1.Rows[i].Cells[2].Value = employment.employmentTable.professionalEmploymentInformation[i].city; dataGridView1.Rows[i].Cells[3].Value = employment.employmentTable.professionalEmploymentInformation[i].title; dataGridView1.Rows[i].Cells[4].Value = employment.employmentTable.professionalEmploymentInformation[i].startDate; } }
public Cooptable(object sender) { Employment employment = sender as Employment; InitializeComponent(); //Console.Write(sender); for (int i = 0; i < employment.coopTable.coopInformation.Count; i++) { dataGridView1.Rows.Add(); dataGridView1.Rows[i].Cells[0].Value = employment.coopTable.coopInformation[i].employer; dataGridView1.Rows[i].Cells[1].Value = employment.coopTable.coopInformation[i].degree; dataGridView1.Rows[i].Cells[2].Value = employment.coopTable.coopInformation[i].city; dataGridView1.Rows[i].Cells[3].Value = employment.coopTable.coopInformation[i].term; } //btn_coopTable.Enabled = false; }
}//end of onclick private void coopTabletitle_Click(object sender, EventArgs e) { // get About information string jsonAbout = getRestData("/employment/"); // need a way to get the JSON form into a Employment object Employment emp = JToken.Parse(jsonAbout).ToObject <Employment>(); coopTable cooptable = new coopTable(); for (var i = 0; i < emp.coopTable.coopInformation.Count; i++) { cooptable.coopdatagrid.Rows.Add(); cooptable.coopdatagrid.Rows[i].Cells[0].Value = emp.coopTable.coopInformation[i].employer; cooptable.coopdatagrid.Rows[i].Cells[1].Value = emp.coopTable.coopInformation[i].degree; cooptable.coopdatagrid.Rows[i].Cells[2].Value = emp.coopTable.coopInformation[i].city; cooptable.coopdatagrid.Rows[i].Cells[3].Value = emp.coopTable.coopInformation[i].term; } //adding table form onclick cooptable.ShowDialog(); }//end of onclcik
}//end of onclcik private void employmentTable_Click(object sender, EventArgs e) { // get About information string jsonAbout = getRestData("/employment/"); // need a way to get the JSON form into a Employment object Employment emp = JToken.Parse(jsonAbout).ToObject <Employment>(); empTable emptable = new empTable(); //adding emp table for (var i = 0; i < emp.employmentTable.professionalEmploymentInformation.Count(); i++) { emptable.empdatagrid.Rows.Add(); emptable.empdatagrid.Rows[i].Cells[0].Value = emp.employmentTable.professionalEmploymentInformation[i].employer; emptable.empdatagrid.Rows[i].Cells[1].Value = emp.employmentTable.professionalEmploymentInformation[i].degree; emptable.empdatagrid.Rows[i].Cells[2].Value = emp.employmentTable.professionalEmploymentInformation[i].city; emptable.empdatagrid.Rows[i].Cells[3].Value = emp.employmentTable.professionalEmploymentInformation[i].title; emptable.empdatagrid.Rows[i].Cells[4].Value = emp.employmentTable.professionalEmploymentInformation[i].startDate; } //display table panel emptable.ShowDialog(); }//end of onclcik