public string InsertValidation(BDDValidation validation) { MySqlConnection conn = DBConf.GetDBConnection(); try { conn.Open(); MySqlCommand command = conn.CreateCommand(); command.CommandText = "INSERT INTO rfid(InfoCarte,idPreinscrit) VALUES(@infoCarte,@idPreinscrit)"; command.Parameters.AddWithValue("InfoCarte", validation.infoCarte); command.Parameters.AddWithValue("idPreinscrit", validation.idPreinscrit); command.ExecuteNonQuery(); return("Success !"); } catch (Exception e) { return(e.ToString()); throw; } finally { conn.Close(); conn.Dispose(); conn = null; } }
public string InsertValidation(BDDValidation bddvalidation) { BDDValidation validation = new BDDValidation(); return(validation.InsertValidation(bddvalidation)); }