Example #1
0
 static public TSQLProcedure Rq_DeletePlayer(int id)
 {
     ProcedureParameter[] parameters = new ProcedureParameter[1];
     parameters[0] = new ProcedureParameter("@id", System.Data.OleDb.OleDbType.Integer, id);
     TSQLProcedure proc = new TSQLProcedure("SuppJoueur", parameters);
     return proc;
 }
 static public TSQLProcedure Rq_DeleteQuestion(int id)
 {
     ProcedureParameter[] parameters = new ProcedureParameter[1];
     parameters[0] = new ProcedureParameter("@id_question_jeu", System.Data.OleDb.OleDbType.Integer, id);
     TSQLProcedure proc = new TSQLProcedure("SupprQuestionJeu", parameters);
     return proc;
 }
Example #3
0
 static public TSQLProcedure Rq_CreatePlayer(string pseudo, int score)
 {
     ProcedureParameter[] parameters = new ProcedureParameter[2]; 
     parameters[0] = new ProcedureParameter("@pseudo", System.Data.OleDb.OleDbType.VarChar, pseudo);
     parameters[1] = new ProcedureParameter("@score", System.Data.OleDb.OleDbType.Integer, score);
     TSQLProcedure proc = new TSQLProcedure("AddJoueur", parameters);
     return proc;
 }
Example #4
0
 static public TSQLProcedure Rq_UpdatePlayerScore(int id, int score)
 {
     ProcedureParameter[] parameters = new ProcedureParameter[2];
     parameters[0] = new ProcedureParameter("@id_joueur", System.Data.OleDb.OleDbType.Integer, id);
     parameters[1] = new ProcedureParameter("@score", System.Data.OleDb.OleDbType.Integer, score);
     TSQLProcedure proc = new TSQLProcedure("ModifierJoueur", parameters);
     return proc;
 }
 /* Méthode de création de la procédure de récupération de création d'un admin */
 static public TSQLProcedure Rq_CreateAdmin(string login, string hashedPassword)
 {
     ProcedureParameter[] parameters = new ProcedureParameter[2];
     parameters[0] = new ProcedureParameter("@login", System.Data.OleDb.OleDbType.VarChar, login);
     parameters[1] = new ProcedureParameter("@score", System.Data.OleDb.OleDbType.VarChar, hashedPassword);
     TSQLProcedure proc = new TSQLProcedure("AddAdmin", parameters);
     return proc;
 }
 static public TSQLProcedure Rq_CreateQuestion(string intitule_question_orient, int ordre_orient)
 {
     ProcedureParameter [] parameters = new ProcedureParameter[2];
     parameters[0] = new ProcedureParameter("@intitule_question_orient", System.Data.OleDb.OleDbType.VarChar, intitule_question_orient);
     parameters[1] = new ProcedureParameter("@ordre", System.Data.OleDb.OleDbType.Integer, ordre_orient);
     TSQLProcedure proc = new TSQLProcedure("AddQuestionOrient", parameters);
     return proc;
 }
Example #7
0
 static public TSQLProcedure Rq_CreateMetier(string intitule, string description)
 {
     ProcedureParameter[] parameters = new ProcedureParameter[2];
     parameters[0] = new ProcedureParameter("@intitule_metier", System.Data.OleDb.OleDbType.VarChar, intitule);
     parameters[1] = new ProcedureParameter("@description_metier", System.Data.OleDb.OleDbType.VarChar, description);
     TSQLProcedure proc = new TSQLProcedure("AddMetier", parameters);
     return proc;
 }
Example #8
0
 static public TSQLProcedure Rq_UpdatePlayer(int id, string pseudo, int score)
 {
     ProcedureParameter[] parameters = new ProcedureParameter[3];
     parameters[0] = new ProcedureParameter("@id_joueur", System.Data.OleDb.OleDbType.Integer, id);
     parameters[1] = new ProcedureParameter("@pseudo", System.Data.OleDb.OleDbType.VarChar, pseudo);
     parameters[2] = new ProcedureParameter("@score", System.Data.OleDb.OleDbType.Integer, score);
     TSQLProcedure proc = new TSQLProcedure("ModifJoueur", parameters);
     return proc;
 }
 static public TSQLProcedure Rq_CreateReponse(int id_question_orient, string intitule_reponse_orient, int id_metier)
 {
     ProcedureParameter[] parameters = new ProcedureParameter[3];
     parameters[0] = new ProcedureParameter("@id_question_orient", System.Data.OleDb.OleDbType.VarChar, id_question_orient);
     parameters[1] = new ProcedureParameter("@intitule_reponse_orient", System.Data.OleDb.OleDbType.VarChar, intitule_reponse_orient);
     parameters[2] = new ProcedureParameter("@id_metier", System.Data.OleDb.OleDbType.Integer, id_metier);
     TSQLProcedure proc = new TSQLProcedure("AddReponseOrient", parameters);
     return proc;
 }
 /* Méthode de création de la procédure de modification d'un admin via son ID */
 static public TSQLProcedure Rq_UpdateAdmin(int id, string login, string hashedPassword)
 {
     ProcedureParameter[] parameters = new ProcedureParameter[3];
     parameters[0] = new ProcedureParameter("@id", System.Data.OleDb.OleDbType.Integer, id);
     parameters[1] = new ProcedureParameter("@login", System.Data.OleDb.OleDbType.VarChar, login);
     parameters[2] = new ProcedureParameter("@password", System.Data.OleDb.OleDbType.VarChar, hashedPassword);
     TSQLProcedure proc = new TSQLProcedure("ModifierAdmin", parameters);
     return proc;
 }
Example #11
0
 static public TSQLProcedure Rq_UpdateMetier(int id, string intitule, string description)
 {
     ProcedureParameter[] parameters = new ProcedureParameter[3];
     parameters[0] = new ProcedureParameter("@id_metier", System.Data.OleDb.OleDbType.Integer, id);
     parameters[1] = new ProcedureParameter("@intitule_metier", System.Data.OleDb.OleDbType.VarChar, intitule);
     parameters[2] = new ProcedureParameter("@description_metier", System.Data.OleDb.OleDbType.VarChar, description);
     TSQLProcedure proc = new TSQLProcedure("ModifMetier", parameters);
     return proc;
 }
Example #12
0
        static public TSQLProcedure Rq_UpdateQuestion(int id, string intitule, int point)
        {
            ProcedureParameter[] parameters = new ProcedureParameter[3];
            parameters[0] = new ProcedureParameter("@id_question_jeu", System.Data.OleDb.OleDbType.Integer, id);
            parameters[1] = new ProcedureParameter("@intitule_question", System.Data.OleDb.OleDbType.VarChar, intitule);
            parameters[2] = new ProcedureParameter("@point", System.Data.OleDb.OleDbType.Integer, point);

            TSQLProcedure proc = new TSQLProcedure("ModifQuestionJeu", parameters);
            return proc;
        }
Example #13
0
        static public TSQLProcedure Rq_CreateReponse(int id, string intitule, int point, bool iscorrect)
        {
            ProcedureParameter[] parameters = new ProcedureParameter[4];
            parameters[0] = new ProcedureParameter("@id_question_jeu", System.Data.OleDb.OleDbType.Integer, id);
            parameters[1] = new ProcedureParameter("@intitule_reponse", System.Data.OleDb.OleDbType.VarChar, intitule);
            parameters[2] = new ProcedureParameter("@point", System.Data.OleDb.OleDbType.Integer, point);
            parameters[3] = new ProcedureParameter("@etat", System.Data.OleDb.OleDbType.Boolean, iscorrect);

            TSQLProcedure proc = new TSQLProcedure("AddReponseJeu", parameters);
            return proc;
        }
Example #14
0
 static public TSQLProcedure Rq_CreateStat(int age, bool sexe, string cp, string diplome, string type_diplome, string connaissance)
 {
     ProcedureParameter[] parameters = new ProcedureParameter[6];
     parameters[0] = new ProcedureParameter("@age", System.Data.OleDb.OleDbType.Integer, age);
     parameters[1] = new ProcedureParameter("@sexe", System.Data.OleDb.OleDbType.Boolean, sexe);
     parameters[2] = new ProcedureParameter("@code_postal", System.Data.OleDb.OleDbType.VarChar, cp);
     parameters[3] = new ProcedureParameter("@diplome", System.Data.OleDb.OleDbType.VarChar, diplome);
     parameters[4] = new ProcedureParameter("@type_diplome", System.Data.OleDb.OleDbType.VarChar, type_diplome);
     parameters[5] = new ProcedureParameter("@connaissance", System.Data.OleDb.OleDbType.VarChar, connaissance);
     TSQLProcedure proc = new TSQLProcedure("ModifStatistique", parameters);
     return proc;
 }
        /* Méthode de création de la procédure de récupération d'un admin via son ID */
        static public TSQLProcedure Rq_GetAdmin(int id)
        {
            // On créé un tableau qui va contenir les paramètres de la procédure, la taille du tableau, c'est le nombre de paramètre, ici 1
            ProcedureParameter[] parameters = new ProcedureParameter[1];

            // Un paramètre --> Un nom (ex: @id ou encore @login), un type (OleDBtype --> type que la BDD comprend), 
            // une valeur (ex: 1 pour un ID, William pour un admin, ect).
            // On ajoute don ces paramètres dans le tableau
            parameters[0] = new ProcedureParameter("@id", System.Data.OleDb.OleDbType.Integer, id);

            // On créé donc la procédure, en spécifiant le nom et ses paramètres
            TSQLProcedure proc = new TSQLProcedure("GetAdmin", parameters);

            // On renvoie la procédure
            return proc;
        }
Example #16
0
 public TSQLProcedure(string name, ProcedureParameter[] parameters)
 {
     this.name = name;
     this.parameters = parameters;
 }