private void button5_Click(object sender, EventArgs e) { String rollno = comboBox3.Text; String taskde = richTextBox1.Text; String datep = dateTimePicker1.Text; WebClient wec = new WebClient(); NameValueCollection nec = new NameValueCollection(); nec.Add("sroll", rollno); nec.Add("task_de", taskde); nec.Add("dead", datep); byte[] bt = wec.UploadValues(murlf + "task_assgin", nec); String ser = Encoding.UTF8.GetString(bt); MessageBox.Show(ser); JavaScriptSerializer jser = new JavaScriptSerializer(); stu_resp sttp = jser.Deserialize <stu_resp>(ser); // stu_resp[] strpp = JsonConvert.DeserializeObject<stu_resp[]>(ser); if (sttp.response_code == 100) { MessageBox.Show("Task Added", "Task Update", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Something Went Wrong", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void button3_Click(object sender, EventArgs e) { String url = murlf + "change_major"; String r_numb = comboBox1.Text; // String ruim=r_numb. String topic = newbroad.Text; WebClient we = new WebClient(); NameValueCollection ncc = new NameValueCollection(); ncc.Add("roll_no", r_numb); ncc.Add("topic", topic); byte[] reet = we.UploadValues(url, ncc); String respon = Encoding.UTF8.GetString(reet); JavaScriptSerializer js = new JavaScriptSerializer(); stu_resp rp = js.Deserialize <stu_resp>(respon); // JavaScriptSerializer js=nre // MessageBox.Show(r_numb); if (rp.response_code == 100) { MessageBox.Show("Updated Successfully", "Updated"); } else if (rp.response_code == 101) { MessageBox.Show("Updation Not Possible", "Sorry"); } // this.printDocument1.Print += new PrintPageEventHandler(); }
private void button3_Click(object sender, EventArgs e) { String url = murlf + "change_major"; String r_numb = comboBox1.Text; // String ruim=r_numb. String topic = newbroad.Text; WebClient we = new WebClient(); NameValueCollection ncc = new NameValueCollection(); ncc.Add("roll_no", r_numb); ncc.Add("topic", topic); byte[] reet = we.UploadValues(url, ncc); String respon = Encoding.UTF8.GetString(reet); JavaScriptSerializer js = new JavaScriptSerializer(); stu_resp rp = js.Deserialize <stu_resp>(respon); // JavaScriptSerializer js=nre // MessageBox.Show(r_numb); if (rp.response_code == 100) { MessageBox.Show("Updated Successfully", "Updated"); //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx String Category = "Faculty"; String Action = "Broad Area"; String by = fac_idf; String urle = murlf + "log_add"; WebClient wc11 = new WebClient(); NameValueCollection value = new NameValueCollection(); value.Add("category", Category); value.Add("action", Action); value.Add("by_w", by); byte[] stud_resp = wc11.UploadValues(urle, value); //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX } else if (rp.response_code == 101) { MessageBox.Show("Updation Not Possible", "Sorry"); } // this.printDocument1.Print += new PrintPageEventHandler(); }
private void button5_Click(object sender, EventArgs e) { String rollno = comboBox3.Text; String taskde = richTextBox1.Text; String datep = dateTimePicker1.Text; WebClient wec = new WebClient(); NameValueCollection nec = new NameValueCollection(); nec.Add("sroll", rollno); nec.Add("task_de", taskde); nec.Add("dead", datep); byte[] bt = wec.UploadValues(murlf + "task_assgin", nec); String ser = Encoding.UTF8.GetString(bt); // MessageBox.Show(ser); JavaScriptSerializer jser = new JavaScriptSerializer(); stu_resp sttp = jser.Deserialize <stu_resp>(ser); // stu_resp[] strpp = JsonConvert.DeserializeObject<stu_resp[]>(ser); if (sttp.response_code == 100) { MessageBox.Show("Task Added", "Task Update", MessageBoxButtons.OK, MessageBoxIcon.Information); //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx String Category = "Faculty"; String Action = "Task Assign"; String by = fac_idf; String urle = murlf + "log_add"; WebClient wc11 = new WebClient(); NameValueCollection value = new NameValueCollection(); value.Add("category", Category); value.Add("action", Action); value.Add("by_w", by); byte[] stud_resp = wc11.UploadValues(urle, value); //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX } else { MessageBox.Show("Something Went Wrong", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void button9_Click(object sender, EventArgs e) { String sid = comboBox4.Text; String tid = comboBox5.Text; String sta = comboBox6.Text; WebClient wec = new WebClient(); NameValueCollection nec = new NameValueCollection(); nec.Add("student_roll", sid); nec.Add("task_id", tid); nec.Add("student_status", sta); byte[] resp = wec.UploadValues(murlf + "task_status", nec); String srresp = Encoding.UTF8.GetString(resp); stu_resp str = (new JavaScriptSerializer()).Deserialize <stu_resp>(srresp); if (str.response_code == 100) { MessageBox.Show("Task Status Updated", "Updated", MessageBoxButtons.OK); //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx String Category = "Faculty"; String Action = "Status"; String by = fac_idf; String urle = murlf + "log_add"; WebClient wc11 = new WebClient(); NameValueCollection value = new NameValueCollection(); value.Add("category", Category); value.Add("action", Action); value.Add("by_w", by); byte[] stud_resp = wc11.UploadValues(urle, value); //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX } else { MessageBox.Show("Task Status Updatation Failed", "Failed", MessageBoxButtons.OK); } }
private void button9_Click(object sender, EventArgs e) { String sid = comboBox4.Text; String tid = comboBox5.Text; String sta = comboBox6.Text; WebClient wec = new WebClient(); NameValueCollection nec = new NameValueCollection(); nec.Add("student_roll", sid); nec.Add("task_id", tid); nec.Add("student_status", sta); byte[] resp = wec.UploadValues(murlf + "task_status", nec); String srresp = Encoding.UTF8.GetString(resp); stu_resp str = (new JavaScriptSerializer()).Deserialize <stu_resp>(srresp); if (str.response_code == 100) { MessageBox.Show("Task Status Updated", "Updated", MessageBoxButtons.OK); } else { MessageBox.Show("Task Status Updatation Failed", "Failed", MessageBoxButtons.OK); } }