示例#1
0
 public static Cls_Message Insatnce()
 {
     if (cMessage == null)
     {
         cMessage = new Cls_Message();
     }
     return(cMessage);
 }
示例#2
0
 public void Save(Cls_Message message)
 {
     if (ImplementeConnexion.Instance.Conn.State == ConnectionState.Closed)
     {
         ImplementeConnexion.Instance.Conn.Open();
     }
     using (IDbCommand cmd = ImplementeConnexion.Instance.Conn.CreateCommand())
     {
         cmd.CommandText = "INSERT_MESSAGE_T";
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.Add(Parametres.Instance.AjouterParametre(cmd, "@message", 255, DbType.String, message._Message));
         cmd.Parameters.Add(Parametres.Instance.AjouterParametre(cmd, "@ref_tier", 10, DbType.Int32, message.Reftier));
         cmd.ExecuteNonQuery();
     }
 }