private void bunifuThinButton25_Click(object sender, EventArgs e) { this.Hide(); Car_Showroom showroom = new Car_Showroom(); showroom.Show(); }
private void button2_Click(object sender, EventArgs e) { OleDbConnection con = new OleDbConnection("Provider=MSDAORA;Data Source=xe;User ID=system;Password = adnan"); con.Open(); OleDbCommand cmd = new OleDbCommand("select * from projectlogin where UserName='******' and Password '" + textbox_password.Text + "'", con); OleDbDataAdapter d = new OleDbDataAdapter(cmd); String UserName, Password; UserName = textbox1.Text; Password = textbox_password.Text; if (UserName == "system" && Password == "adnan") { this.Hide(); Car_Showroom showroom = new Car_Showroom(); showroom.Show(); } else { MessageBox.Show("Invalid UserName OR Passeord.......!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); this.Close(); } }