GestionDeDommerceInformatiq.../GestionDeCommerceInfoClasse.../DataLayer/BDDAccesBase.cs

31 lines
979 B
C#
Raw Permalink Normal View History

2018-06-07 17:40:51 +02:00
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GestionDeCommerceInfoClasseBDDNCouches.DataLayer
{
public class BDDAccesBase
{
private string sCHConnBDD;
public string SCHConnBDD { get => sCHConnBDD; set => sCHConnBDD = value; }
public SqlCommand CommandSQL { get => commandSQL; set { } }
private SqlCommand commandSQL = new SqlCommand();
public BDDAccesBase(string schConn)
{
SCHConnBDD = schConn;
CommandSQL.Connection = new SqlConnection(schConn);
}
#region Utilitaires
public void Direction(string sParam, ParameterDirection dParam)
{ CommandSQL.Parameters[sParam].Direction = dParam; }
public string LireParametre(string sParam)
{ return CommandSQL.Parameters[sParam].Value.ToString(); }
#endregion
}
}