C4L0X
Kilopat
- Katılım
- 22 Temmuz 2016
- Mesajlar
- 84
- Makaleler
- 1
- Çözümler
- 1
Daha fazla
- Cinsiyet
- Erkek
Merhaba, yapmış olduğum form uygulamasında e-postanın textbox'ında yazan yazıyı label5'in text'ine yazılmasını istiyorum ama şu an kullandığım yöntemde aynı formu aşağıdaki resimdeki gibi iki kere açıyor. Bunu düzeltmenin bir yolu var mı?
C#:
private void button1_Click(object sender, EventArgs e)
{
string user = e_posta.Text;
string password = sifre.Text;
con = new SqlConnection("");
com = new SqlCommand();
con.Open();
com.Connection = con;
com.CommandText = "Select*from uyelik where eposta='" + e_posta.Text + "' and sifre='" + sifre.Text + "' ";
dr = com.ExecuteReader();
if (dr.Read())
{
Form3 gecis = new Form3();
gecis.Show();
this.Hide();
Form3 fr = new Form3();
fr.label5.Text = e_posta.Text;
fr.ShowDialog(this);
e_posta.Text = fr.label5.Text;
}
else
{
MessageBox.Show("Hatalı Kullanıcı Adı Veya Şifre");
}
con.Close();
}