コード例 #1
0
 internal int SistemGirisKontrol(string kullaniciAdi, string sifre)
 {
     if (!string.IsNullOrEmpty(kullaniciAdi) && !string.IsNullOrEmpty(sifre))
     {
         SistemKullanici s = new SistemKullanici();
         s.KullaniciAdi = kullaniciAdi;
         s.Sifre        = sifre;
         return(DAL.SistemGirisKontrol(s));
     }
     else
     {
         return(-100); //Eksik bilgi olarak tanımlatıcaz
     }
 }
コード例 #2
0
 internal int SistemGirisKontrol(SistemKullanici K)
 {
     try
     {
         command             = new SqlCommand("sp_SistemKullaniciKontrol", connect);  //sql cümlesi olduğunu belirtir
         command.CommandType = System.Data.CommandType.StoredProcedure;               //cümlenin stored procedure olduğunu
         command.Parameters.Add("@KullaniciAdi", SqlDbType.NVarChar).Value = K.KullaniciAdi;
         command.Parameters.Add("@Sifre", SqlDbType.NVarChar).Value        = K.Sifre; //SP'de ki parametreleri gir
         BaglantiAyarla();
         sonuc = (int)command.ExecuteScalar();
     }
     catch (Exception)
     {
         //Log
     }
     finally
     {
         BaglantiAyarla();
     }
     return(sonuc);
 }