public void girisyap(string aaaa, string bbbb) { F_A.baglantiac(); try { OleDbCommand cmd = new OleDbCommand("SELECT kullanici,sifre FROM tbl_kullanici WHERE kullanici = '" + aaaa + "' AND sifre ='" + bbbb + "'", F_A.baglanti); OleDbDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { Form aa = new Insaat_Formu(); aa.Show(); this.Hide(); } else { MessageBox.Show("Kullanıcı Adı veya Şifre Yanlış !!"); Application.Restart(); } } catch (Exception) { MessageBox.Show("Kullanıcı Adı veya Şifre Yanlış !!"); Application.Restart(); } }
private void btn_ana_Click(object sender, EventArgs e) { Insaat_Formu frm = new Insaat_Formu(); frm.Show(); this.Hide(); }