1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
namespace GestionStock.Modele.DAO
{
public class ArticleDAO
{
public void Insert()
{
String s = GestionStock.Modele.DAO.DBConnexion.getConnexionString();
string queryString = "INSERT INTO Type (Libelle, Commentaire) VALUES ('Test','pouet')";
SqlConnection connection = new SqlConnection(GestionStock.Modele.DAO.DBConnexion.getConnexionString());
SqlCommand command = new SqlCommand(queryString, connection);
command.Connection.Open();
command.ExecuteNonQuery();
}
}
} |