private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { baglan(); profil frm = new profil(); OleDbCommand cmd = new OleDbCommand("select eposta from kullaniciveri where ad='" + label2.Text + "'", blnt); OleDbDataReader rd = cmd.ExecuteReader(); if (rd.Read()) { frm.label4.Text = rd["eposta"].ToString(); } this.Hide(); frm.Show(); frm.label2.Text = label2.Text; }
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { baglan(); profil frm = new profil(); using (OleDbCommand cmd = new OleDbCommand("select eposta from kullaniciveri where ad=@adi", blnt)) { cmd.Parameters.Add("adi", OleDbType.VarChar).Value = label3.Text; OleDbDataReader rd = cmd.ExecuteReader(); if (rd.Read()) { frm.label4.Text = rd["eposta"].ToString(); } this.Hide(); frm.Show(); frm.label2.Text = label3.Text; } }