/// <summary> /// Constructor qui va effacer tout le contenu des tables /// </summary> public FlushData() { connect.SqlCommandINSDEL(sqlCommandOccurence, null); connect.SqlCommandINSDEL(sqlCommandFile, null); connect.SqlCommandINSDEL(sqlCommandWord, null); }
public static void AddFile(FileInfo fi) { Dictionary <string, string> dicFile = new Dictionary <string, string>(); dicFile.Add("@name", fi.Name); dicFile.Add("@extension", fi.Extension); dicFile.Add("@url", fi.DirectoryName + "\\" + fi.Name); dicFile.Add("@size", fi.Length.ToString()); string request = "INSERT INTO t_file (filName , filSize , filExtend , filURL) VALUES ( @name, @size , @extension , @url);"; conec.SqlCommandINSDEL(request, dicFile); }
private static void AddWord(string word) { Dictionary <string, string> dicWord = new Dictionary <string, string>(); string request = "INSERT INTO t_word (worWord) VALUES(@word);"; dicWord.Add("@word", word); Connexion conec = new Connexion(); conec.SqlCommandINSDEL(request, dicWord); }
public void SendToDataBase() { Dictionary <string, string> dicOcu = new Dictionary <string, string>(); string request = "INSERT INTO t_occurence (ocuNumbre , idFile , IdWord) VALUES(@number , @file , @word);"; dicOcu.Add("@number", this._numberOfOccurence.ToString()); dicOcu.Add("@file", this.idFile.ToString()); dicOcu.Add("@word", this.idWord.ToString()); Connexion conec = new Connexion(); conec.SqlCommandINSDEL(request, dicOcu); }