Ejemplo n.º 1
0
        public override void Sil(RaporBilgisi veri)
        {
            string commandText = "delete from RaporBilgileri where RaporBilgiId = @RaporBilgiId";

            SqlConnection _sqlConnection = new SqlConnection(yol);

            if (_sqlConnection.State == ConnectionState.Closed)
            {
                _sqlConnection.Open();
            }

            SqlCommand _sqlCommand = new SqlCommand(commandText, _sqlConnection);



            _sqlCommand.Parameters.AddWithValue("@RaporBilgiId", veri.RaporBilgid);

            _sqlCommand.ExecuteNonQuery();

            _sqlConnection.Close();
        }
Ejemplo n.º 2
0
        public override void Ekle(RaporBilgisi veri)
        {
            string commandText = "insert RaporBilgileri values(@KullaniciId, @RaporId)";

            SqlConnection _sqlConnection = new SqlConnection(yol);

            if (_sqlConnection.State == ConnectionState.Closed)
            {
                _sqlConnection.Open();
            }

            SqlCommand _sqlCommand = new SqlCommand(commandText, _sqlConnection);



            _sqlCommand.Parameters.AddWithValue("@KullaniciId", veri.KullaniciId);
            _sqlCommand.Parameters.AddWithValue("@RaporId", veri.RaporId);

            _sqlCommand.ExecuteNonQuery();

            _sqlConnection.Close();
        }
Ejemplo n.º 3
0
 public void Sil(RaporBilgisi veri)
 {
     _raporBilgiDal.Ekle(veri);
 }