private void button2_Click(object sender, EventArgs e) { if (textBox4.Text == "" && textBox5.Text == "") { koneksi(); String sql = "UPDATE student SET Name = '" + textBox1.Text + "', Password ='******', Phone ='" + textBox6.Text + "' WHERE NIS = '" + nis + "'"; MySqlCommand cmd = new MySqlCommand(sql, conn); cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("Your account data has been successfully changed"); home = new Homepage(); home.Show(); this.Hide(); } else if (textBox4.Text == textBox5.Text) { koneksi(); String sql = "UPDATE student SET Name = '" + textBox1.Text + "', Password ='******', Phone ='" + textBox6.Text + "' WHERE NIS = '" + nis + "'"; MySqlCommand cmd = new MySqlCommand(sql, conn); cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("Your account data has been successfully changed"); home = new Homepage(); home.Show(); this.Hide(); } else { MessageBox.Show("Sorry your new password and repeat password doesn't same"); } }
private void pictureBox1_Click(object sender, EventArgs e) { home = new Homepage(); home.Show(); home.BackColor = this.BackColor; this.Hide(); }
private void button1_Click(object sender, EventArgs e) { frm2 = new Homepage(); frm2.BackColor = this.BackColor; frm2.Show(); this.Hide(); }
private void button1_Click(object sender, EventArgs e) { if (loginstudent(tbemail.Text, tbpass.Text) == true) { String isiemail = tbemail.Text.ToLower(); this.setemail(isiemail); MessageBox.Show("Login Success"); frm3 = new Homepage(); frm3.Show(); this.Hide(); } else if (loginTeacher(tbemail.Text, tbpass.Text) == true) { String isiemail = tbemail.Text.ToLower(); this.setemail(isiemail); MessageBox.Show("Login Success"); frm4 = new HomepageTeacher(); frm4.Show(); this.Hide(); } else { MessageBox.Show("Sorry your Email and Password Not Found"); } conn.Close(); }
private void studentToolStripMenuItem_Click(object sender, EventArgs e) { if (loginstudent(tbemail.Text, tbpass.Text)) { String isiemail = tbemail.Text; this.setemail(isiemail); MessageBox.Show("Login Success"); frm3 = new Homepage(); frm3.Show(); this.Hide(); } else { MessageBox.Show("Sorry your Email and Password Not Found"); } conn.Close(); }
private void pictureBox2_Click(object sender, EventArgs e) { frm2 = new Homepage(nis); frm2.Show(); this.Hide(); }