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 28 29 30 31 32 33 34 35 36 37 38 39
| using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Text;
namespace TFEBibli.Application_Code
{
public struct Auteur
{
public int Id;
public String Nom;
}
public class SQLProcStock
{
public Auteur VoirAuteur(int Id, String Nom)
{
SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["TFEBibliConnectionString"]);
SqlCommand comm = new SqlCommand("VoirAuteur", con);
comm.CommandType = CommandType.StoredProcedure;
SqlParameter param = new SqlParameter("@Nom", SqlDbType.NVarChar, 100);
param.Value = Nom;
con.Open();
comm.ExecuteNonQuery();
con.Close();
Auteur aut = new Auteur();
aut.Nom = Nom;
return aut;
}
}
} |
Partager