Esempio n. 1
0
        public int PersonelEkle(Personel personel)
        {
            try
            {
                if (PersonelExists(personel.getPersonelID()))
                {
                    throw new Exception("Course with same name exists");
                }

                string query = $"INSERT INTO Personel(departmanID,kisiID) VALUES('{personel.getDepartmanID()}','{personel.getKisiID()}')";
                return(DbHelper.ExecuteNonQuery(query));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Esempio n. 2
0
 public int PersonelUpdate(Personel personel)
 {
     try
     {
         string query = $"UPDATE Personel SET departmaID='{personel.getDepartmanID()}' WHERE personel_ID={personel.getPersonelID()}";
         return(DbHelper.ExecuteNonQuery(query));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }