public bool Delete(int id) { SQLiteCommand command = new SQLiteCommand { CommandText = "DELETE FROM insan WHERE id=@id", }; command.Parameters.AddWithValue("@id", id); int result = Utilty.RunExecuteNonQuery(command); return(result > 0); }
public bool Insert(ArabaTip entity) { SQLiteCommand command = new SQLiteCommand { CommandText = "INSERT INTO arac_tipi (ad) values (@ad)", }; command.Parameters.AddWithValue("@ad", entity.Ad); int result = Utilty.RunExecuteNonQuery(command); return(result > 0); }
public bool Insert(Musteri entity) { SQLiteCommand command = new SQLiteCommand { CommandText = "INSERT INTO insan (isim,telefon) values (@isim,@telefon)", }; command.Parameters.AddWithValue("@isim", entity.isim); command.Parameters.AddWithValue("@telefon", entity.telefon); int result = Utilty.RunExecuteNonQuery(command); return(result > 0); }
public bool Insert(HizmetTip entity) { SQLiteCommand command = new SQLiteCommand { CommandText = "INSERT INTO hizmet_tipi (hizmetAdi,ucret) values (@hizmetAdi,@ucret)", }; command.Parameters.AddWithValue("@hizmetAdi", entity.hizmetAdi); command.Parameters.AddWithValue("@ucret", entity.Ucret); int result = Utilty.RunExecuteNonQuery(command); return(result > 0); }
public bool Insert(Araba entity) { SQLiteCommand command = new SQLiteCommand { CommandText = "INSERT INTO araba (insanId,plaka) values (@insanId,@plaka)", }; command.Parameters.AddWithValue("@insanId", entity.InsanId); command.Parameters.AddWithValue("@plaka", entity.Plaka); int result = Utilty.RunExecuteNonQuery(command); return(result > 0); }
public bool Update(Musteri entity) { SQLiteCommand command = new SQLiteCommand { CommandText = "UPDATE insan SET telefon = @telefon, isim =@isim WHERE id=@id ", }; command.Parameters.AddWithValue("@id", entity.Id); command.Parameters.AddWithValue("@telefon", entity.telefon); command.Parameters.AddWithValue("@isim", entity.isim); int result = Utilty.RunExecuteNonQuery(command); return(result > 0); }
public bool Update(HizmetTip entity) { SQLiteCommand command = new SQLiteCommand { CommandText = "UPDATE hizmet_tipi SET Ucret = @Ucret, hizmetAdi =@hizmetAdi WHERE id=@id ", }; command.Parameters.AddWithValue("@id", entity.Id); command.Parameters.AddWithValue("@hizmetAdi", entity.hizmetAdi); command.Parameters.AddWithValue("@Ucret", entity.Ucret); int result = Utilty.RunExecuteNonQuery(command); return(result > 0); }
public bool Update(ArabaTip entity) { SQLiteCommand command = new SQLiteCommand { CommandText = "UPDATE arac_tipi SET ucretFarki = @ucretFarki, Ad =@Ad WHERE id=@id ", }; command.Parameters.AddWithValue("@id", entity.Id); command.Parameters.AddWithValue("@Ad", entity.Ad); command.Parameters.AddWithValue("@ucretFarki", entity.ucretFarki); int result = Utilty.RunExecuteNonQuery(command); return(result > 0); }
public bool Update(Araba entity) { SQLiteCommand command = new SQLiteCommand { CommandText = "UPDATE araba SET model = @model, tip =@tip, plaka =@plaka, insanId=@insanId WHERE id=@id ", }; command.Parameters.AddWithValue("@id", entity.insanId); command.Parameters.AddWithValue("@insanId", entity.insanId); command.Parameters.AddWithValue("@plaka", entity.Plaka); int result = Utilty.RunExecuteNonQuery(command); return(result > 0); }
public bool Insert(Hizmet entity) { SQLiteCommand command = new SQLiteCommand { CommandText = "INSERT INTO hizmetler (ArabaId,HizmetTipiId,MusteriId,Tarih,OdemeTipi,Ucret) values (@ArabaId,@HizmetTipiId,@MusteriId,@Tarih,@OdemeTipi,@Ucret)", }; command.Parameters.AddWithValue("@ArabaId", entity.ArabaId); command.Parameters.AddWithValue("@HizmetTipiId", entity.HizmetTipiId); command.Parameters.AddWithValue("@MusteriId", entity.MusteriId); command.Parameters.AddWithValue("@Tarih", entity.Tarih); command.Parameters.AddWithValue("@OdemeTipi", entity.OdemeTipi); command.Parameters.AddWithValue("@Ucret", entity.Ucret); int result = Utilty.RunExecuteNonQuery(command); return(result > 0); }