C# Yeni Forma Veri Çekme Sorunu
-
Şimdi benim elimde 2 form var form1 ve form2 olarak
Uyeler.cs adında ki classımda propertiesler tanımlı diyelim 2 tanesi
private string _uAdi;
private string _uSifre;
public string uAdi{get { return _uAdi; }set { _uAdi = value; }}public string uSifre{get { return _uSifre; }set { _uSifre = value; }}birde ben bunlara datasette değer atıyorumpublic void DataSetUye(string kullaniciAdi){Veritabani ver = new Veritabani();SqlDataAdapter da = ver.apatorluGetir("select * from Uye where uAdi='l123456'");DataSet ds = new DataSet();da.Fill(ds);_uAdi = ds.Tables[0].Rows[0][1].ToString();_uSifre = ds.Tables[0].Rows[0][2].ToString();}işte form1 de textbox ta ki texti kullanici adi olarak yolluyorum doğruysa form2 yi açıyorfakat form2 ye geçipUyeler uye = new Uyeler();label1.Text = uye.uAdi;dediğim zaman boş gösteriyor diğerleri içinde aynı bunu nasıl düzeltebilirim ? -
Tamamdır hallettim
private static string _uAdi;
private static string _uSifre;
static tanımlayınca çalıştı.
Toplam Hit: 806 Toplam Mesaj: 2
