public static void addKeyword(int ADocId,string AKeyword,int AOccurence) { Clef clef = new Clef(-1,ADocId,AKeyword,AOccurence); database.addKeywordInfo(ref clef); }
private static void addKeywordInfo(ref Clef AClef) { SqlConnection connect = new SqlConnection(connecstring); connect.Open(); SqlCommand command = new SqlCommand("insert into Clefs (DocumentId,Mot,Occurence) values (@docid,@mot,@occurence)",connect); command.Parameters.Add("@docid",SqlDbType.Int).Value = AClef.DocumentId; command.Parameters.Add("@mot",SqlDbType.VarChar).Value = AClef.Mot; command.Parameters.Add("@occurence",SqlDbType.Int).Value = AClef.Occurence; command.ExecuteNonQuery(); connect.Close(); }