private void Faculty_Dashboard_Load(object sender, EventArgs e) { tabPage1.Text = "My Student"; tabPage2.Text = "Evaluation"; WebClient we = new WebClient(); MessageBox.Show("Dashboard"); Faculty_Pannel fcp = new Faculty_Pannel(); fcp.Visible = false; fcp.Close(); //fcp.Show() //fcp.Show(); //Faculty_Pannel.Visible = false; NameValueCollection nform = new NameValueCollection(); nform.Add("fac_id", nm); String urls = murlf + "student_data_retr_dir_faculty"; byte[] data = we.UploadValues(urls, nform); String resp = Encoding.UTF8.GetString(data); //MessageBox.Show(resp); // JavaScriptSerializer jser = new JavaScriptSerializer(); // List<stu_data_ser> ls = new List<stu_data_ser>(); stu_data_ser[] s_der = JsonConvert.DeserializeObject <stu_data_ser[]>(resp); int lengt = s_der.Length; // MessageBox.Show("length of array " + lengt.ToString()); int i = 0; while (lengt > i) { ListViewItem lvti = new ListViewItem(s_der[i].name); //MessageBox.Show(s_der[0].name); lvti.SubItems.Add(s_der[i].roll_no); // MessageBox.Show(s_der[1].roll_no); lvti.SubItems.Add(s_der[i].branch); // MessageBox.Show(s_der[1].branch); lvti.SubItems.Add(s_der[i].topic); // MessageBox.Show(s_der[0].topic); lvti.SubItems.Add(s_der[i].broad_area); // MessageBox.Show(s_der[1].broad_area); listView1.Items.Add(lvti); i++; } }
// String murlf = "http://172.25.5.54:8081/student_desigatation/"; public Faculty_Dashboard(String nam) { InitializeComponent(); nm = nam; Faculty_Pannel fcp = new Faculty_Pannel(); fcp.Visible = false; // MessageBox.Show("Dashboad"); String urlst = murlf + "stun_under_faculty"; WebClient we = new WebClient(); NameValueCollection dat = new NameValueCollection(); dat.Add("facult_id", nam); byte[] bt = we.UploadValues(urlst, dat); String rep = Encoding.UTF8.GetString(bt); stu_data_ser[] js = JsonConvert.DeserializeObject <stu_data_ser[]>(rep); int stu_len = js.Length; int i = 0; while (i < stu_len) { comboBox1.Items.Insert(i, js[i].roll_no);//+" "+ js[i].name ); //MessageBox.Show(js[i].name); comboBox2.Items.Insert(i, js[i].roll_no); comboBox3.Items.Insert(i, js[i].roll_no); comboBox4.Items.Insert(i, js[i].roll_no); i++; } Faculty_Pannel frm = new Faculty_Pannel(); frm.Visible = false; // MessageBox.Show(nam); }
public Faculty_Dashboard(String nam) { InitializeComponent(); nm = nam; fac_idf = nam; WebClient wr = new WebClient(); NameValueCollection nrec = new NameValueCollection(); nrec.Add("fact_id", nam); byte[] resp = wr.UploadValues(murlf + "retr_fac_name", nrec); String serres = Encoding.UTF8.GetString(resp); fac_name[] facnam = JsonConvert.DeserializeObject <fac_name[]>(serres); welcom.Text = "Welcome " + facnam[0].Faculty_Name; Faculty_Pannel fcp = new Faculty_Pannel(); fcp.Visible = false; // MessageBox.Show("Dashboad"); String urlst = murlf + "stun_under_faculty"; WebClient we = new WebClient(); NameValueCollection dat = new NameValueCollection(); dat.Add("facult_id", nam); byte[] bt = we.UploadValues(urlst, dat); String rep = Encoding.UTF8.GetString(bt); stu_data_ser[] js = JsonConvert.DeserializeObject <stu_data_ser[]>(rep); int stu_len = js.Length; int i = 0; while (i < stu_len) { comboBox1.Items.Insert(i, js[i].roll_no);//+" "+ js[i].name ); //MessageBox.Show(js[i].name); comboBox2.Items.Insert(i, js[i].roll_no); comboBox3.Items.Insert(i, js[i].roll_no); comboBox4.Items.Insert(i, js[i].roll_no); i++; } Faculty_Pannel frm = new Faculty_Pannel(); frm.Visible = false; // MessageBox.Show(nam); werror = new System.Windows.Forms.ErrorProvider(); // String url = "http://gubappwebservices.esy.es/out_of_faculty"; String url = murlf + "out_of_faculty"; WebClient wc1 = new WebClient(); NameValueCollection form = new NameValueCollection(); form.Add("fact_id", nam); byte[] otherstudents = wc1.UploadValues(url, form); String othrstud = Encoding.UTF8.GetString(otherstudents); OtherStudent[] jsa = JsonConvert.DeserializeObject <OtherStudent[]>(othrstud); //int stud_len = jsa.Length; int j = 0; while (j < jsa.Length) { Roll_comboBox.Items.Insert(j, jsa[j].Roll_no); j++; } }
private void button1_Click_1(object sender, EventArgs e) { Faculty_Pannel fpc = new Faculty_Pannel(); fpc.Show(); }
private void button1_Click(object sender, EventArgs e) { Faculty_Pannel fcp = new Faculty_Pannel(); fcp.Show(); }