Professional Documents
Culture Documents
Question 1
Creation de la clase CEmploye
class CEmploye
{
SqlDataReader dr;
public CEmploye() {
if (cn.State == ConnectionState.Closed) {
cn.Open();
}
cmd.Connection = cn;
if (cn.State == ConnectionState.Closed)
{
cn.Open();
}
cmd.Connection = cn;
1
public CEmploye(int ne,string n,string j, int ns,int nd,double s)
{
this.numero = ne;
this.nom = n;
this.job = j;
this.nsuperviseur = ns;
this.ndepartement = nd;
this.salaire = s;
if (cn.State == ConnectionState.Closed)
{
cn.Open();
}
cmd.Connection = cn;
return cmd.ExecuteNonQuery();
}