public int insert(string sqlCumlesi) { SqlCommand cmd1 = cmd.command(sqlCumlesi); cmd1.ExecuteNonQuery(); baglan.baglantiKapat(); //throw new NotImplementedException(); return(0); }
public void CalisanGuncelle(Calisan m) { baglan.baglan(); baglan.cmd.Connection = baglan.baglanti; baglan.cmd.CommandText = "UPDATE Kullanicilar set Pozisyon='" + m.Pozisyon + "',Maas='" + m.Maas + "',MarketID='" + m.MarketID + "',MarketAd='" + m.MarketAD + "' where KullaniciID='" + m.KullaniciID + "'"; baglan.cmd.ExecuteNonQuery(); baglan.baglantiKapat(); }
public void MarketEkle(List <Market> market) { if (baglan.baglan()) { baglan.cmd.Connection = baglan.baglanti; baglan.cmd.CommandText = ("SELECT * FROM dbo.Market"); } SqlDataReader dr = baglan.cmd.ExecuteReader(); while (dr.Read()) { market.Add(new Market { MarketAd = dr["Ad"].ToString(), MarketAdres = dr["Adres"].ToString(), MarketID = Convert.ToInt32(dr["MarketID"]) }); } baglan.baglantiKapat(); }