public static bool AracDuzenle(AracKayitlari ak) { OleDbCommand cmd = new OleDbCommand("Update Arac Set DaireNo = @s1, Marka = @s2, Model = @s3, TelefonNo = @s4 Where AracPlaka = @s5", BaglantiSinifi.Con); cmd.Parameters.AddWithValue("@s1", ak.DaireNo); cmd.Parameters.AddWithValue("@s2", ak.Marka); cmd.Parameters.AddWithValue("@s3", ak.Model); cmd.Parameters.AddWithValue("@s4", ak.TelefonNo); cmd.Parameters.AddWithValue("@s5", ak.AracPlaka); return(Sorgu(cmd)); }
public static bool AracEkle(AracKayitlari ak) { OleDbCommand cmd = new OleDbCommand("Insert Into Arac values (@s1,@s2,@s3,@s4,@s5)", BaglantiSinifi.Con); cmd.Parameters.AddWithValue("@s1", ak.DaireNo); cmd.Parameters.AddWithValue("@s2", ak.AracPlaka); cmd.Parameters.AddWithValue("@s3", ak.Marka); cmd.Parameters.AddWithValue("@s4", ak.Model); cmd.Parameters.AddWithValue("@s5", ak.TelefonNo); return(Sorgu(cmd)); }
public bool GirdiKontrol() { try { ak = new AracKayitlari(); if (tb_plaka.Text != "" && tb_marka.Text != "" && tb_model.Text != "" && cb_DaireNo.Text != "") { ak.AracPlaka = tb_plaka.Text; ak.Marka = tb_marka.Text; ak.Model = tb_model.Text; ak.DaireNo = Convert.ToInt32(cb_DaireNo.Text); ak.TelefonNo = tb_telefonNo.Text; return(true); } } catch (Exception exp) { Console.WriteLine(exp.Message); } return(false); }