private void button1_Click_1(object sender, EventArgs e) { SqlConnection con = new SqlConnection(); con.ConnectionString=@"data source=ABHINAV-PC\ABHI;integrated security=true;initial catalog=ATM"; con.Open(); SqlDataAdapter ds = new SqlDataAdapter("select * from adminlogin WHERE UserName='" + textBox1.Text + "' and Password='" + textBox2.Text + "'", con); if ((textBox1.Text == "") || (textBox2.Text == "")) { MessageBox.Show("please enter username and password"); } if (ds.Equals(con)==true) { Administrator_Home ah = new Administrator_Home(); ah.Show(); } else MessageBox.Show("invalid username or password"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)