Page 15 - Nisan 2026
P. 15

im
    Sayı 1                                                                        BilişimTeknoloji        N san 2026


      KOTkolik




                                                                  public string DogumYeriUlke { get; set;
                         bilgi.VatandaslikDurumu              }
     = "Hayır";                                                   public string? DogumYeriIlIlce { get;
                         if                                   set; }
     (Convert.ToString(durumBilgisi.Rows[0]["vata                 public string? DogumYeriMahalleKoy {
     ndaslikDurumu"]) == "1")                                 get; set; }
                         {                                        public string? Din { get; set; }
                                                                  public string? VatandaslikDurumu { get;
     bilgi.VatandaslikDurumu = "Evet";                        set; }
                         }                                        public string? MedeniDurumu { get; set;
                                                              }
                         bilgi.MedeniDurumu =                     public string? YasamDurumu { get; set; }
     Convert.ToString(durumBilgisi.Rows[0]["meden                 public DateTime? TransactionDate { get;
     iDurumu"]);                                              set; }
                         bilgi.YasamDurumu =
     Convert.ToString(durumBilgisi.Rows[0]["yasam                 public string? HataTxt { get; set; }
     Durumu"]);                                               }
                     }
                                                              Bu model sayes nde XML ver s  doğrudan kullanılmak yer ne
                     catch { }
                                                              anlamlı ve t p güvenl  b r yapıya dönüştürülür. Bu da hem kodun
                 }
                                                              okunab l rl ğ n  artırır hem de bakımını kolaylaştırır.
             }
         }
         catch (WebException ex)
         {                                                    Sonuç
             bilgi.HataTxt = ex.Message;
                                                              Bu çalışma  le KKTC İç şler  Bakanlığı Nüfus serv sler n n C#  le
             bilgi.Ad = ex.Message;
                                                              nasıl entegre ed leceğ  uçtan uca göster lm şt r.
         }
                                                              Doğru yapılandırılmış b r SOAP request, düzgün b r HTTP
                                                              bağlantısı ve  y  tasarlanmış b r model  le bu tür entegrasyonlar
         return bilgi;
                                                              sorunsuz şek lde gerçekleşt r leb l r.
     }
                                                                                        ̈
                                                              Gerçek projelerde bu yapının uzerine cache, retry ve async
                                                   ̈
     Bu metod, entegrasyonun merkezidir. Servise istek gonderir,
                                                              mekanizmaları eklenerek sistem daha da saglam hale
                                                                                                    ̆
       ̈
                                                ̈
                                              ̈
     donen XML'i alır ve anlamlı bir veri modeline donuşturur.
                                                   ̈
                                                     ̈
                                                              getirilebilir.
     Veri Modelleme
                                                                                                        Erkan Coşkun
     Serv sten gelen ver y  düzenl  b r şek lde yöneteb lmek  ç n
                                                                                                             ̈
     aşağıdak  model kullanılmıştır:                                                              Bilgisayar Muhendisi
     public partial class NufusServisKimlikBilgi
     {
         public long Pkey { get; set; }
         public string KimlikNo { get; set; }
         public string? AnneKimlikNo { get; set;
     }
         public string? BabaKimlikNo { get; set;
     }
         public string KisiId { get; set; }
         public string Ad { get; set; }
         public string Soyad { get; set; }
         public string? AnneAd { get; set; }
         public string? AnneSoyad { get; set; }
         public string? BabaAd { get; set; }
         public string? BabaSoyad { get; set; }
         public string Cinsiyet { get; set; }
         public DateTime? DogumTarihi { get; set;
     }


                                                                                                             Sayfa 14
   10   11   12   13   14   15   16   17   18   19   20