Esempio n. 1
0
        private void pictureBox1_home_Click(object sender, EventArgs e)
        {
            Utama mm = new Utama();

            mm.Show();
            this.Hide();
        }
Esempio n. 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            Utama u = new Utama();
            Pulsa p = new Pulsa();

            p.Close();
            u.Show();
            this.Hide();
        }
Esempio n. 3
0
        private void btn_masuk_Click(object sender, EventArgs e)
        {
            SqlConnection  conn = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=D:\KULIAH\Semester 4\Pemrograman Terstruktur\SETELAH UTS\PRAKTIKUM\TUGAS\Tugas Besar\tugas besar xxx\Revisi\database\login.mdf;Integrated Security=True;Connect Timeout=30");
            SqlDataAdapter sda  = new SqlDataAdapter("select count(*) from login where username = '******' and password='******'", conn);
            DataTable      dt   = new DataTable();

            sda.Fill(dt);
            if (dt.Rows[0][0].ToString() == "1")
            {
                this.Hide();
                Utama mm = new Utama();
                mm.Show();
            }
            else
            {
                MessageBox.Show("Please masukkan username dan password yang benar", "alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }