public List <Rehber> KayitListe() { List <Rehber> RehberListesi = new List <Rehber>(); try { SqlDataReader reader = dll.KayitListe(); while (reader.Read()) { RehberListesi.Add(new Rehber { ID = reader.IsDBNull(0) ? Guid.Empty : reader.GetGuid(0), Isim = reader.IsDBNull(1) ? string.Empty : reader.GetString(1), Soyisim = reader.IsDBNull(2) ? string.Empty : reader.GetString(2), TelefonNumarasiI = reader.IsDBNull(3) ? string.Empty : reader.GetString(3), TelefonNumarasiII = reader.IsDBNull(4) ? string.Empty : reader.GetString(4), TelefonNumarasiIII = reader.IsDBNull(5) ? string.Empty : reader.GetString(5), EmailAdres = reader.IsDBNull(6) ? string.Empty : reader.GetString(6), WebAdres = reader.IsDBNull(7) ? string.Empty : reader.GetString(7), Aciklama = reader.IsDBNull(8) ? string.Empty : reader.GetString(8) }); } reader.Close(); } catch (Exception e) { } finally { dll.BaglantiAyarla(); } return(RehberListesi); }
public List <Kelime> KelimeListele() { try { SqlDataReader reader = dll.KelimeListele(); while (reader.Read()) { KelimeListesi.Add(new Kelime() { KelimeID = reader.IsDBNull(0) ? Guid.Empty : reader.GetGuid(0), KelimeIngilizce = reader.IsDBNull(1) ? string.Empty : reader.GetString(1), KelimeTurkce = reader.IsDBNull(2) ? string.Empty : reader.GetString(2), Aciklama = reader.IsDBNull(3) ? string.Empty : reader.GetString(3), Cumle = reader.IsDBNull(4) ? string.Empty : reader.GetString(4), Durum = reader.IsDBNull(5) ? string.Empty : reader.GetString(5), }); } reader.Close(); } catch (Exception) { throw; } finally { dll.BaglantiAyarla(); } return(KelimeListesi); }