public void Enregistrer(IEntete_Sortie entete) { if (ImplementeConnexion.Instance.Conn.State == ConnectionState.Closed) { ImplementeConnexion.Instance.Conn.Open(); } using (IDbCommand cmd = ImplementeConnexion.Instance.Conn.CreateCommand()) { cmd.CommandText = "INSERT_ENTETE_SORTIE_FACTURE"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@id", 4, DbType.Int32, Id)); cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@user", 100, DbType.String, UserSession)); cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@refmaladie", 10, DbType.Int32, Ref)); cmd.ExecuteNonQuery(); } }
public void Enregistrer(IEntete_Sortie entete) { if (ImplementeConnexion.Instance.Conn.State == ConnectionState.Closed) { ImplementeConnexion.Instance.Conn.Open(); } using (IDbCommand cmd = ImplementeConnexion.Instance.Conn.CreateCommand()) { cmd.CommandText = "INSERT_ENTETE_SORTIE_SERVICE"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@id", 4, DbType.Int32, Id)); cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@user", 100, DbType.String, UserSession)); cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@refservice", 10, DbType.Int32, Ref)); cmd.ExecuteNonQuery(); //MessageBox.Show("Enregistrement reussi svp !!!", "Reussite", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation); } }