public static bool YakitEkle(YakitKayitlari yk) { OleDbCommand cmd = new OleDbCommand("Insert Into Yakit values (@s1,@s2,@s3,@s4,@s5)", BaglantiSinifi.Con); cmd.Parameters.AddWithValue("@s1", yk.YakitNo); cmd.Parameters.AddWithValue("@s2", yk.DaireNo); cmd.Parameters.AddWithValue("@s3", yk.Tarih); cmd.Parameters.AddWithValue("@s4", yk.Tutar); cmd.Parameters.AddWithValue("@s5", yk.OdenenKontorMiktari); return(Sorgu(cmd)); }
public static bool YakitDuzenle(YakitKayitlari yk) { OleDbCommand cmd = new OleDbCommand("Update Yakit Set DaireNo = @s1, Tarih = @s2, Tutar = @s3, OdenenTutar = @s4 Where YakitID = @s5", BaglantiSinifi.Con); cmd.Parameters.AddWithValue("@s1", yk.DaireNo); cmd.Parameters.AddWithValue("@s2", yk.Tarih); cmd.Parameters.AddWithValue("@s3", yk.Tutar); cmd.Parameters.AddWithValue("@s4", yk.OdenenKontorMiktari); cmd.Parameters.AddWithValue("@s5", yk.YakitNo); return(Sorgu(cmd)); }
public bool GirdiKontrol() { try { yk = new YakitKayitlari(); if (tb_yakitNo.Text != "" && cb_daireNo.Text != "" && tb_tutar.Text != "" && tb_alinanKontorMiktari.Text != "") { yk.YakitNo = Convert.ToInt32(tb_yakitNo.Text); yk.DaireNo = Convert.ToInt32(cb_daireNo.Text); yk.Tarih = dtp_tarih.Value.ToString(); yk.Tutar = Convert.ToInt32(tb_tutar.Text); yk.OdenenKontorMiktari = Convert.ToInt32(tb_alinanKontorMiktari.Text); return(true); } } catch (Exception exp) { Console.WriteLine(exp.Message); } return(false); }