示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            ProductInformation pf = new ProductInformation();

            pf.Show();
        }
示例#2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            using (var con = new SqlConnection(conStr))
            {
                string         specificRowQuery = "SELECT * FROM Users WHERE UserName='******' and Passwords='" + txt_Password.Text.Trim() + "'";
                SqlDataAdapter da = new SqlDataAdapter(specificRowQuery, con);
                DataTable      dt = new DataTable();
                da.Fill(dt);

                if (dt.Rows.Count == 1)
                {
                    ProductInformation product = new ProductInformation();
                    product.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Please Enter Correct UserName and Password");
                }
            }
        }