private void Rcard_Test_Tcode_TextChanged(object sender, EventArgs e) { if (status == true) { if (Rcard_Test_Tcode.Text.Length != 0) { Rcard_Test_Tcode.Text = Main_Form.numCheck(Rcard_Test_Tcode.Text); try { string sql = "select * from Test_Rcard where Test_Id = " + Rcard_Test_Tcode.Text + " and Std_Id= " + Rcard_Test_SelectId.Text + " and Sub = '" + Rcard_Test_Sub.Text + "' ;"; SqlCommand cmd = new SqlCommand(sql, con); con.Open(); SqlDataReader read = cmd.ExecuteReader(); if (read.Read()) { label6.Visible = true; btn_Rcard_Update.Visible = true; btn_Rcard_TSave.Visible = false; con.Close(); } else { label6.Visible = false; btn_Rcard_Update.Visible = false; btn_Rcard_TSave.Visible = true; con.Close(); } } catch (Exception ex) { Console.WriteLine("Error in loading previous test code"); } } } else { MessageBox.Show("You Must Login First"); } }
double total, obt, percent;//creates variables to use to calculate percentage private void Rcard_Test_Omarks_TextChanged(object sender, EventArgs e) { Rcard_Test_Omarks.Text = Main_Form.numCheck(Rcard_Test_Omarks.Text); if (Rcard_Test_Omarks.TextLength != 0 && Rcard_Test_Omarks.Text != ".") { try { total = double.Parse(Rcard_Test_Tmarks.Text); obt = double.Parse(Rcard_Test_Omarks.Text); percent = (obt / total) * 100.00; Rcard_Test_Percent.Text = percent.ToString(); } catch (Exception ex) { Console.WriteLine("\n error in calculating percentage from obtained marks field"); } } else { Rcard_Test_Percent.Text = null; } }
private void FP_Contact_OnValueChanged(object sender, EventArgs e) { FP_Contact.Text = Main_Form.numCheck(FP_Contact.Text); }
private void Isl_TextChanged(object sender, EventArgs e) { Isl.Text = Main_Form.numCheck(Isl.Text); }
private void Com_TextChanged(object sender, EventArgs e) { Com.Text = Main_Form.numCheck(Com.Text); }
private void Arts_TextChanged(object sender, EventArgs e) { Arts.Text = Main_Form.numCheck(Arts.Text); }
private void sst_TextChanged(object sender, EventArgs e) { sst.Text = Main_Form.numCheck(sst.Text); }
private void Sci_TextChanged(object sender, EventArgs e) { Sci.Text = Main_Form.numCheck(Sci.Text); }
private void Math_TextChanged(object sender, EventArgs e) { Math.Text = Main_Form.numCheck(Math.Text); }
private void Urdu_TextChanged(object sender, EventArgs e) { Urdu.Text = Main_Form.numCheck(Urdu.Text); }
private void Eng_TextChanged(object sender, EventArgs e) { Eng.Text = Main_Form.numCheck(Eng.Text); }
private void Rcard_Test_Tmarks_TextChanged(object sender, EventArgs e) { Rcard_Test_Tmarks.Text = Main_Form.numCheck(Rcard_Test_Tmarks.Text); total = 0.0; }
private void Update_Ayear_TextChanged(object sender, EventArgs e) { Update_Ayear.Text = Main_Form.numCheck(Update_Ayear.Text); }
private void Update_Contact_TextChanged(object sender, EventArgs e) { Update_Contact.Text = Main_Form.numCheck(Update_Contact.Text); }
private void Add_Ayear_TextChanged(object sender, EventArgs e) { Add_Ayear.Text = Main_Form.numCheck(Add_Ayear.Text); }
private void Add_Contact_TextChanged(object sender, EventArgs e) { Add_Contact.Text = Main_Form.numCheck(Add_Contact.Text); }