コード例 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     frm2           = new HomepageTeacher();
     frm2.BackColor = this.BackColor;
     frm2.Show();
     this.Hide();
 }
コード例 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            Loginpage frm1 = new Loginpage();

            if (tbNewPass.Text == "" && tbRepeat.Text == "")
            {
                koneksi();
                String       sql = "UPDATE teacher SET Name = '" + tbNama.Text + "', Password ='******', Phone ='" + tbPhone.Text + "' WHERE NIK = '" + NIK + "'";
                MySqlCommand cmd = new MySqlCommand(sql, conn);
                cmd.ExecuteNonQuery();
                conn.Close();
                MessageBox.Show("Your account data has been successfully changed");
                home = new HomepageTeacher();
                home.Show();
                this.Hide();
            }
            else if (tbNewPass.Text == tbRepeat.Text)
            {
                koneksi();
                String       sql = "UPDATE teacher SET Name = '" + tbNama.Text + "', Password ='******', Phone ='" + tbPhone.Text + "' WHERE NIK = '" + NIK + "'";
                MySqlCommand cmd = new MySqlCommand(sql, conn);
                cmd.ExecuteNonQuery();
                conn.Close();
                MessageBox.Show("Your account data has been successfully changed");
                home = new HomepageTeacher();
                home.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Sorry your new password and repeat password doesn't same");
            }
        }
コード例 #3
0
 private void pictureBox1_Click(object sender, EventArgs e)
 {
     home = new HomepageTeacher();
     home.Show();
     home.BackColor = this.BackColor;
     this.Hide();
 }
コード例 #4
0
        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();
        }
コード例 #5
0
 private void pictureBox2_Click_2(object sender, EventArgs e)
 {
     frm2 = new HomepageTeacher(NIK);
     frm2.Show();
     this.Hide();
 }