private void button4_Click(object sender, EventArgs e)
 {
     Roll_comboBox.Text = "Select Roll No.";
     werror.Clear();
     Roll_comboBox.Focus();
     name_textview.Text  = "";
     class_textview.Text = "";
     Report_textbox.Clear();
     Technical_textbox.Clear();
     Presentation_textbox.Clear();
     total_textview.Text  = "";
     Remarks_textbox.Text = "";
     werror.SetError(this.Report_textbox, "");
     werror.SetError(this.Technical_textbox, "");
     werror.SetError(this.Presentation_textbox, "");
 }
        private void Roll_textbox_Leave(object sender, EventArgs e)
        {
            // String url = "http://gubappwebservices.esy.es/Student_detail_retrive_faculty";
            String url = murlf + "Student_detail_retrive_faculty";

            roll_no = Roll_comboBox.Text;
            if (!roll_no.Equals("Select Roll No."))
            {
                WebClient           wc1   = new WebClient();
                NameValueCollection value = new NameValueCollection();
                value.Add("roll_no", roll_no);
                value.Add("facult_id", fac_idf);
                byte[]         stud_resp  = wc1.UploadValues(url, value);
                String         res_string = Encoding.UTF8.GetString(stud_resp);
                Student_json[] result     = JsonConvert.DeserializeObject <Student_json[]>(res_string);
                // marks_exist[] me = JsonConvert.DeserializeObject<marks_exist[]>(res_string);
                if (result.Length > 0)
                {
                    //  String url2 = "http://gubappwebservices.esy.es/mark_already_exist";
                    String              url2   = murlf + "mark_already_exist";
                    WebClient           wc2    = new WebClient();
                    NameValueCollection value2 = new NameValueCollection();
                    value2.Add("facult_id", fac_idf);
                    value2.Add("studen_id", roll_no);
                    byte[] stud_resp2        = wc2.UploadValues(url2, value2);
                    String roll_alredy       = Encoding.UTF8.GetString(stud_resp2);
                    JavaScriptSerializer js2 = new System.Web.Script.Serialization.JavaScriptSerializer();
                    //JavaScriptSerializer jd1=
                    marks_exist resp_json2 = js2.Deserialize <marks_exist>(roll_alredy);
                    if (resp_json2.response_code == 100)
                    {
                        String name = result[0].Name.ToString();
                        String cl   = result[0].Branch.ToString();
                        name_textview.Text  = name;
                        class_textview.Text = cl;
                    }
                    else if (resp_json2.response_code == 106)
                    {
                        // werror.SetError(this.Roll_textbox, "Already evaluatted");
                        //Roll_textbox.Focus();
                        DialogResult checkmsgbox = MessageBox.Show("Click on Ok to update marks", "Already evaluated", MessageBoxButtons.OKCancel);
                        if (checkmsgbox == DialogResult.OK)
                        {
                            String name = result[0].Name.ToString();
                            String cl   = result[0].Branch.ToString();
                            name_textview.Text  = name;
                            class_textview.Text = cl;
                        }
                        else
                        {
                            Roll_comboBox.Text = "Select Roll No.";
                            Roll_comboBox.Focus();
                        }
                    }
                }
                else
                {
                    werror.SetError(this.Roll_comboBox, "Student with this Roll No may have not registered ");
                    Roll_comboBox.Focus();
                }
            }
            else
            {
                Roll_comboBox.Focus();
                //   werror.SetError(this.Roll_textbox, "");
            }
        }