Exemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            this.Hide();
            WelcomeDean vc = new WelcomeDean();

            vc.Show();
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection  con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\Bhagya Udayanandani\Documents\Data.mdf;Integrated Security=True;Connect Timeout=30");
            SqlDataAdapter sda = new SqlDataAdapter("Select count(*) from Dlogin where Username='******'and Password='******'", con);
            DataTable      dt  = new DataTable();

            sda.Fill(dt);
            if (dt.Rows[0][0].ToString() == "1")
            {
                this.Hide();
                WelcomeDean a = new WelcomeDean();
                a.Show();
            }
            else
            {
                MessageBox.Show("Please check your password and username");
            }
        }