private void btn_close_Click(object sender, EventArgs e)
        {
            this.Hide();
            LoginStudent logout = new LoginStudent();

            logout.Show();
        }
Beispiel #2
0
        private void pictureBox_close_Click(object sender, EventArgs e)
        {
            this.Hide();
            LoginStudent login = new LoginStudent();

            login.Show();
        }
        private void btn_loginstudent_Click(object sender, EventArgs e)
        {
            koneksi.Open();
            SqlCommand cmd = koneksi.CreateCommand();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "insert into [MAHASISWA](NIM,Nama_Mahasiswa,Alamat,No_Hp,Jenis_Kelamin) values ('" + textBox2.Text + "','" + textBox1.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + comboBox1.Text + "')";
            cmd.ExecuteNonQuery();
            koneksi.Close();
            //untuk membuat textbox kosong ketika input data
            textBox1.Text  = "";
            textBox2.Text  = "";
            textBox3.Text  = "";
            textBox4.Text  = "";
            comboBox1.Text = "";
            MessageBox.Show("Registrasi Successfully");
            this.Hide();
            LoginStudent login = new LoginStudent();

            login.Show();
        }