示例#1
0
 public void Sil(Doktor d)//tc primarry key olduğu için onu baz alarak silme işlemi yapılıyor..
 {
     try
     {
         cmd.CommandText = "Delete From Doktor Where doktor_TC='" + d.Doktor_TC + "'";
         cmd.CommandType = CommandType.Text;
         con.Open();
         cmd.ExecuteNonQuery();
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         if (con != null)
         {
             con.Close();
         }
     }
 }
示例#2
0
 public void sGuncelleme(Doktor yenisifre, Doktor tc)//şifre güncelleme
 {
     try
     {
         cmd.CommandText = "Update Doktor SET doktor_Sifre='" + yenisifre.Doktor_Sifre.ToString() + "' Where doktor_TC=" + tc.Doktor_TC.ToString() + "";
         cmd.CommandType = CommandType.Text;
         con.Open();
         cmd.ExecuteNonQuery();
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         if (con != null)
         {
             con.Close();
         }
     }
 }
示例#3
0
 public void Guncelle(Doktor tc, Doktor yeniKisi)//genel güncelleme
 {
     try
     {
         cmd.CommandText = "Update Doktor SET doktor_Ad='" + yeniKisi.Doktor_Ad + "',doktor_Soyad='" + yeniKisi.Doktor_Soyad + "',doktor_TC='" + yeniKisi.Doktor_TC + "',doktor_Sifre='" + yeniKisi.Doktor_Sifre + "' Where doktor_TC='" + tc.Doktor_TC + "'";
         cmd.CommandType = CommandType.Text;
         con.Open();
         cmd.ExecuteNonQuery();
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         if (con != null)
         {
             con.Close();
         }
     }
 }
示例#4
0
 public void Ekle(Doktor d)
 {
     try
     {
         cmd.CommandText = "Insert Into Doktor (doktor_Ad,doktor_Soyad,doktor_TC,doktor_Sifre) Values ('" + d.Doktor_Ad + "','" + d.Doktor_Soyad + "','" + d.Doktor_TC + "','" + d.Doktor_Sifre + "')";
         cmd.CommandType = CommandType.Text;
         con.Open();
         cmd.ExecuteNonQuery();
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         if (con != null)
         {
             con.Close();
         }
     }
 }