public Personel Add(Personel entity) { try { SqlCommand komut = new SqlCommand("insert into Tbl_Personel(AD,SOYAD,TELEFON,TC,MAIL,IL,ILCE,ADRES,GOREV) values(@p1,@p2,@p3,@p4,@p5,@p6,@p7,@p8,@p9)", baglanti.BaglantiDondur()); komut.Parameters.AddWithValue("@p1", entity.AD); komut.Parameters.AddWithValue("@p2", entity.SOYAD); komut.Parameters.AddWithValue("@p3", entity.TELEFON); komut.Parameters.AddWithValue("@p4", entity.TC); komut.Parameters.AddWithValue("@p5", entity.MAIL); komut.Parameters.AddWithValue("@p6", entity.IL); komut.Parameters.AddWithValue("@p7", entity.ILCE); komut.Parameters.AddWithValue("@p8", entity.ADRES); komut.Parameters.AddWithValue("@p9", entity.GOREV); komut.ExecuteNonQuery(); baglanti.BaglantiDondur().Close(); return(entity); } catch (Exception) { return(null); } }
public Banka Add(Banka entity) { try { SqlCommand komut = new SqlCommand("insert into Tbl_Banka(BANKAADI,IL,ILCE,SUBE,TELEFON,IBAN,HESAPNO,YETKILI,TARIH,HESAPTURU,FIRMAID) values(@p1,@p2,@p3,@p4,@p5,@p6,@p7,@p8,@p9,@p10,@p11)", baglanti.BaglantiDondur()); komut.Parameters.AddWithValue("@p1", entity.BANKAADI); komut.Parameters.AddWithValue("@p2", entity.IL); komut.Parameters.AddWithValue("@p3", entity.ILCE); komut.Parameters.AddWithValue("@p4", entity.SUBE); komut.Parameters.AddWithValue("@p5", entity.TELEFON); komut.Parameters.AddWithValue("@p6", entity.IBAN); komut.Parameters.AddWithValue("@p7", entity.HESAPNO); komut.Parameters.AddWithValue("@p8", entity.YETKILI); komut.Parameters.AddWithValue("@p9", entity.TARIH); komut.Parameters.AddWithValue("@p10", entity.HESAPTURU); komut.Parameters.AddWithValue("@p11", entity.FIRMAID); komut.ExecuteNonQuery(); baglanti.BaglantiDondur().Close(); return(entity); } catch (Exception) { return(null); } }
public Fatura Add(Fatura entity) { try { SqlCommand komut = new SqlCommand("insert into Tbl_FaturaBilgi(SERI,SIRANO,TARIH,SAAT,VERGIDAIRE,ALICI,TESLIMEDEN,TESLIMALAN) values(@p1,@p2,@p3,@p4,@p5,@p6,@p7,@p8)", baglanti.BaglantiDondur()); komut.Parameters.AddWithValue("@p1", entity.SERI); komut.Parameters.AddWithValue("@p2", entity.SIRANO); komut.Parameters.AddWithValue("@p3", entity.TARIH); komut.Parameters.AddWithValue("@p4", entity.SAAT); komut.Parameters.AddWithValue("@p5", entity.VERGIDAIRE); komut.Parameters.AddWithValue("@p6", entity.ALICI); komut.Parameters.AddWithValue("@p7", entity.TESLIMEDEN); komut.Parameters.AddWithValue("@p8", entity.TESLIMALAN); komut.ExecuteNonQuery(); baglanti.BaglantiDondur().Close(); return(entity); } catch (Exception) { return(null); } }
public OzelKod Get() { SqlCommand komut = new SqlCommand("Select * from Tbl_Kod", baglanti.BaglantiDondur()); SqlDataReader okuyucu = komut.ExecuteReader(); OzelKod entity = new OzelKod(); while (okuyucu.Read()) { entity.FIRMAKOD1 = okuyucu[1].ToString(); entity.FIRMAKOD2 = okuyucu[2].ToString(); entity.FIRMAKOD3 = okuyucu[3].ToString(); } baglanti.BaglantiDondur().Close(); return(entity); }
public Urun Add(Urun entity) { try { SqlCommand komut = new SqlCommand("insert into Tbl_Urun(URUNAD,URUNMARKA,MODEL,YIL,ADET,ALISFIYAT,SATISFIYAT,DETAY) values(@p1,@p2,@p3,@p4,@p5,@p6,@p7,@p8)", baglanti.BaglantiDondur()); komut.Parameters.AddWithValue("@p1", entity.URUNAD); komut.Parameters.AddWithValue("@p2", entity.URUNMARKA); komut.Parameters.AddWithValue("@p3", entity.MODEL); komut.Parameters.AddWithValue("@p4", entity.YIL); komut.Parameters.AddWithValue("@p5", entity.ADET); komut.Parameters.AddWithValue("@p6", entity.ALISFIYAT); komut.Parameters.AddWithValue("@p7", entity.SATISFIYAT); komut.Parameters.AddWithValue("@p8", entity.DETAY); komut.ExecuteNonQuery(); baglanti.BaglantiDondur().Close(); return(entity); } catch (Exception) { return(null); } }
public List <Il> List() { List <Il> iller = new List <Il>(); SqlCommand komut = new SqlCommand("select * from Tbl_Il", baglanti.BaglantiDondur()); SqlDataReader okuyucu = komut.ExecuteReader(); while (okuyucu.Read()) { iller.Add(new Il { ID = int.Parse(okuyucu[0].ToString()), SEHIR = okuyucu[1].ToString() }); } baglanti.BaglantiDondur().Close(); return(iller); }
public Gider Add(Gider entity) { try { SqlCommand komut = new SqlCommand("insert into Tbl_Gider(AY,YIL,ELEKTRIK,SU,DOGALGAZ,INTERNET,MAASLAR,EKSTRA,NOTLAR) values(@p1,@p2,@p3,@p4,@p5,@p6,@p7,@p8,@p9)", baglanti.BaglantiDondur()); komut.Parameters.AddWithValue("@p1", entity.AY); komut.Parameters.AddWithValue("@p2", entity.YIL); komut.Parameters.AddWithValue("@p3", entity.ELEKTRIK); komut.Parameters.AddWithValue("@p4", entity.SU); komut.Parameters.AddWithValue("@p5", entity.DOGALGAZ); komut.Parameters.AddWithValue("@p6", entity.INTERNET); komut.Parameters.AddWithValue("@p7", entity.MAASLAR); komut.Parameters.AddWithValue("@p8", entity.EKSTRA); komut.Parameters.AddWithValue("@p9", entity.NOTLAR); komut.ExecuteNonQuery(); baglanti.BaglantiDondur().Close(); return(entity); } catch (Exception) { return(null); } }
public Firma Add(Firma entity) { try { SqlCommand komut = new SqlCommand("insert into Tbl_Firma(AD,YETKILITC,SEKTOR,YETKILISTATU,YETKILIADSOYAD,TELEFON1,TELEFON2,TELEFON3,MAIL,FAX,IL,ILCE,ADRES,VERGIDAIRE,OZELKOD1,OZELKOD2,OZELKOD3) values(@p1,@p2,@p3,@p4,@p5,@p6,@p7,@p8,@p9,@p10,@p11,@p12,@p13,@p14,@p15,@p16,@p17)", baglanti.BaglantiDondur()); komut.Parameters.AddWithValue("@p1", entity.AD); komut.Parameters.AddWithValue("@p2", entity.YETKILITC); komut.Parameters.AddWithValue("@p3", entity.SEKTOR); komut.Parameters.AddWithValue("@p4", entity.YETKILISTATU); komut.Parameters.AddWithValue("@p5", entity.YETKILIADSOYAD); komut.Parameters.AddWithValue("@p6", entity.TELEFON1); komut.Parameters.AddWithValue("@p7", entity.TELEFON2); komut.Parameters.AddWithValue("@p8", entity.TELEFON3); komut.Parameters.AddWithValue("@p9", entity.MAIL); komut.Parameters.AddWithValue("@p10", entity.FAX); komut.Parameters.AddWithValue("@p11", entity.IL); komut.Parameters.AddWithValue("@p12", entity.ILCE); komut.Parameters.AddWithValue("@p13", entity.ADRES); komut.Parameters.AddWithValue("@p14", entity.VERGIDAIRE); komut.Parameters.AddWithValue("@p15", entity.OZELKOD1); komut.Parameters.AddWithValue("@p16", entity.OZELKOD2); komut.Parameters.AddWithValue("@p17", entity.OZELKOD3); komut.ExecuteNonQuery(); baglanti.BaglantiDondur().Close(); return(entity); } catch (Exception) { return(null); } }
public Musteri Add(Musteri entity) { try { SqlCommand komut = new SqlCommand("insert into Tbl_Musteri(AD,SOYAD,TELEFON1,TELEFON2,TC,MAIL,IL,ILCE,ADRES,VERGIDAIRE) values(@p1,@p2,@p3,@p4,@p5,@p6,@p7,@p8,@p9,@p10)", baglanti.BaglantiDondur()); komut.Parameters.AddWithValue("@p1", entity.AD); komut.Parameters.AddWithValue("@p2", entity.SOYAD); komut.Parameters.AddWithValue("@p3", entity.TELEFON1); komut.Parameters.AddWithValue("@p4", entity.TELEFON2); komut.Parameters.AddWithValue("@p5", entity.TC); komut.Parameters.AddWithValue("@p6", entity.MAIL); komut.Parameters.AddWithValue("@p7", entity.IL); komut.Parameters.AddWithValue("@p8", entity.ILCE); komut.Parameters.AddWithValue("@p9", entity.ADRES); komut.Parameters.AddWithValue("@p10", entity.VERGIDAIRE); komut.ExecuteNonQuery(); baglanti.BaglantiDondur().Close(); return(entity); } catch (Exception) { return(null); } }
public FaturaDetay Add(FaturaDetay entity) { try { SqlCommand komut = new SqlCommand("insert into Tbl_FaturaDetay(URUNAD,MIKTAR,FIYAT,TUTAR,FATURAID) values(@p1,@p2,@p3,@p4,@p5)", baglanti.BaglantiDondur()); komut.Parameters.AddWithValue("@p1", entity.URUNAD); komut.Parameters.AddWithValue("@p2", entity.MIKTAR); komut.Parameters.AddWithValue("@p3", entity.FIYAT); komut.Parameters.AddWithValue("@p4", entity.TUTAR); komut.Parameters.AddWithValue("@p5", entity.FATURAID); komut.ExecuteNonQuery(); baglanti.BaglantiDondur().Close(); return(entity); } catch (Exception) { return(null); } }
public Notlar Add(Notlar entity) { try { SqlCommand komut = new SqlCommand("insert into Tbl_Notlar(TARIH,SAAT,BASLIK,DETAY,OLUSTURAN,HITAP) values(@p1,@p2,@p3,@p4,@p5,@p6)", baglanti.BaglantiDondur()); komut.Parameters.AddWithValue("@p1", entity.TARIH); komut.Parameters.AddWithValue("@p2", entity.SAAT); komut.Parameters.AddWithValue("@p3", entity.BASLIK); komut.Parameters.AddWithValue("@p4", entity.DETAY); komut.Parameters.AddWithValue("@p5", entity.OLUSTURAN); komut.Parameters.AddWithValue("@p6", entity.HITAP); komut.ExecuteNonQuery(); baglanti.BaglantiDondur().Close(); return(entity); } catch (Exception) { return(null); } }
public List <Ilce> List(int id) { List <Ilce> ilceler = new List <Ilce>(); SqlCommand komut = new SqlCommand("select * from Tbl_Ilce where SEHIRID=@p1", baglanti.BaglantiDondur()); komut.Parameters.AddWithValue("@p1", id); SqlDataReader okuyucu = komut.ExecuteReader(); while (okuyucu.Read()) { ilceler.Add(new Ilce { ID = int.Parse(okuyucu[0].ToString()), ILCE = okuyucu[1].ToString(), SEHIRID = int.Parse(okuyucu[2].ToString()) }); } baglanti.BaglantiDondur().Close(); return(ilceler); }
public Admin Add(Admin entity) { try { SqlCommand komut = new SqlCommand("insert into Tbl_Admin(Username,Userkey) values(@p1,@p2)", baglanti.BaglantiDondur()); komut.Parameters.AddWithValue("@p1", entity.Username); komut.Parameters.AddWithValue("@p2", entity.Userkey); komut.ExecuteNonQuery(); baglanti.BaglantiDondur().Close(); return(entity); } catch (Exception) { return(null); } }