Ejemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            BlockBusterHomepage bh = new BlockBusterHomepage();

            bh.ShowDialog();
            this.Close();
        }
Ejemplo n.º 2
0
        private void btnlogin_Click(object sender, EventArgs e)
        {
            try
            {
                con.Open();


                String Username = tbUsername.Text.ToString();
                String Password = tbPassword.Text.ToString();

                String qry = "select UserName,Password from dbo.Customer_SignUp where UserName ='******' and Password ='******'";

                SqlCommand     cmd = new SqlCommand(qry, con);
                SqlDataAdapter sd  = new SqlDataAdapter(qry, con);


                DataTable dt = new DataTable();

                sd.Fill(dt);

                if (dt.Rows.Count > 0)
                {
                    this.Hide();
                    username = tbUsername.Text;
                    BlockBusterHomepage BH = new BlockBusterHomepage();
                    BH.ShowDialog();
                }
                else
                {
                    MessageBox.Show("Please check Your UserName and Password Again");
                }

                SqlCommand sc = new SqlCommand(qry, con);
                sc.ExecuteNonQuery();

                con.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error is: " + ex.ToString());
            }
        }