コード例 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            SqlConnection  con = new SqlConnection("Data Source=DESKTOP-GCD5HVR;Initial Catalog=fees;Integrated Security=True");
            SqlDataAdapter sda = new SqlDataAdapter("Select count(*) from admin1 where username='******'and password='******'", con);
            DataTable      dt  = new DataTable();

            sda.Fill(dt);
            if (dt.Rows[0][0].ToString() == "1")
            {
                this.Hide();
                adminform ad = new adminform();
                ad.Show();
            }
            else
            {
                MessageBox.Show("please check your username and password");
            }
        }
コード例 #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            adminform ad = new adminform();

            ad.Show();
        }