Ejemplo n.º 1
0
 public void KullaniciListele()
 {
     KuList.Clear();
     try
     {
         using (var customerSoapClient = new KullaniciServisSoapClient())
         {
             foreach (var responsedCustomer in customerSoapClient.SelectAllKullanici().OrderBy(x => x.KullaniciID).ToList())
             {
                 Kullanici castedCustomer = new Kullanici()
                 {
                     KullaniciID = responsedCustomer.KullaniciID,
                     Ad          = responsedCustomer.Ad,
                     Soyad       = responsedCustomer.Soyad,
                     Adres       = responsedCustomer.Adres,
                     Telefon     = responsedCustomer.Telefon,
                     Email       = responsedCustomer.Email,
                     Sifre       = responsedCustomer.Sifre,
                     Rol         = responsedCustomer.Rol
                 };
                 KuList.Add(castedCustomer);
             }
             dgvListele.DataSource = KuList.ToList();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error happened: " + ex.Message);
     }
 }