Exemple #1
0
        private void PrepareBD(object sender, RoutedEventArgs e)
        {
            BD_primitive maBD = new BD_primitive();
            string cmd = "truncate toursParole";
            maBD.Commande(cmd);
            cmd = "truncate etapes";
            maBD.Commande(cmd);
            cmd = "truncate main";
            maBD.Commande(cmd);
            cmd = "truncate partie";
            maBD.Commande(cmd);
            cmd = "truncate historique";
            maBD.Commande(cmd);
            cmd = "truncate joueurPartie";
            maBD.Commande(cmd);
            cmd = "truncate semaphore";
            maBD.Commande(cmd);
            cmd = "truncate tournois";
            maBD.Commande(cmd);

            cmd = "INSERT INTO etapes (num_partie, num_main, NomEtape, prochainJoueur, date_evenement, num_tour) VALUES" +
"(1, 1, 'PRE_FLOP', 2, '2017-06-29 12:29:15', 1)";

            maBD.Commande(cmd);

            cmd = "INSERT INTO `historique` (`NumeroPartie`, `numero_evenement`, `description`, `date`) VALUES" +
"(1, 1, 'Début de la partie 1', '2017-06-29 16:28:44')," +
"(1, 2, 'certs distribue la main 1', '2017-06-29 16:28:45')," +
"(1, 3, 'Gros blind: 2', '2017-06-29 16:28:45')," +
"(1, 4, 'certs relance ALL IN (98)', '2017-06-29 16:28:56')," +
"(1, 5, 'cheen suit ALL IN', '2017-06-29 16:29:15')";
            maBD.Commande(cmd);

            cmd = "INSERT INTO `joueurpartie` (`numero_partie`, `pokerman`, `position`, `Etat`) VALUES" +
"(1, 'certs', 0, ''),"+
"(1, 'cheen', 1, '')," +
"(1, 'gos', 2, '')";
            maBD.Commande(cmd);

            cmd = "INSERT INTO `main` (`num_partie`, `num_main`, `bouton`, `etape`, `debut`, `niveauPourSuivre`, `fin`, `j0_c0_v`, `j0_c0_s`, `j0_c1_v`, `j0_c1_s`, `j1_c0_v`, `j1_c0_s`, `j1_c1_v`, `j1_c1_s`, `j2_c0_v`, `j2_c0_s`, `j2_c1_v`, `j2_c1_s`, `j3_c0_v`, `j3_c0_s`, `j3_c1_v`, `j3_c1_s`, `j4_c0_v`, `j4_c0_s`, `j4_c1_v`, `j4_c1_s`, `j5_c0_v`, `j5_c0_s`, `j5_c1_v`, `j5_c1_s`, `f_c0_v`, `f_c0_s`, `f_c1_v`, `f_c1_s`, `f_c2_v`, `f_c2_s`, `t_v`, `t_s`, `r_v`, `r_s`, `valeur_j0`, `valeur_j1`, `valeur_j2`, `valeur_j3`, `valeur_j4`, `valeur_j5`, `capitalJ0`, `capitalFinJ0`, `capitalJ1`, `capitalFinJ1`, `capitalJ2`, `capitalFinJ2`, `capitalJ3`, `capitalFinJ3`, `capitalJ4`, `capitalFinJ4`, `capitalJ5`, `capitalFinJ5`, `gagnant`) VALUES" +
"(1, 1, 0, 'PRE_FLOP', '2017-06-29 16:28:45', 100, NULL, 4, 3, 11, 0, 11, 3, 7, 0, 5, 3, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 0, 5, 1, 12, 1, 1, 2, 10, 2, 121110095, 121110097, 155121009, -1, -1, -1, 100, 0, 100, 0, 100, 98, 0, 0, 0, 0, 0, 0, NULL)";
            maBD.Commande(cmd);

            cmd = "INSERT INTO `partie` (`numero_tournoi`, `numero`, `numero_main`, `debut`, `fin`, `gagnant`, `perdant_5`, `perdant_4`, `perdant_3`, `perdant_2`, `perdant_1`, `perdant_5_date`, `perdant_4_date`, `perdant_3_date`, `perdant_2_date`, `perdant_1_date`, `nom_j0`, `nom_j1`, `nom_j2`, `nom_j3`, `nom_j4`, `nom_j5`) VALUES" +
"(0, 1, 1, '2017-06-29 16:28:44', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'certs', 'cheen', 'gos', NULL, NULL, NULL)";
            maBD.Commande(cmd);

            cmd = "INSERT INTO `toursparole` (`num_partie`, `num_main`, `nomEtape`, `num_tour`, `dec_j0`, `eng_j0`, `date_j0`, `dec_j1`, `eng_j1`, `date_j1`, `dec_j2`, `eng_j2`, `date_j2`, `dec_j3`, `eng_j3`, `date_j3`, `dec_j4`, `eng_j4`, `date_j4`, `dec_j5`, `eng_j5`, `date_j5`) VALUES" +
"(1, 1, 'PRE_FLOP', 1, 'ALL_IN_RELANCER', 100, '2017-06-29 16:28:56', 'ALL_IN_SUIVRE', 100, '2017-06-29 16:29:15', 'GROS_BLIND', 2, '2017-06-29 16:28:45', 'MORT', 0, '2017-06-29 16:28:45', 'MORT', 0, '2017-06-29 16:28:45', 'MORT', 0, '2017-06-29 16:28:45')";
            maBD.Commande(cmd);

            MessageBox.Show("3 joueurs, 2 all-in ...");
        }
Exemple #2
0
 private void Truncate(object sender, RoutedEventArgs e)
 {
     BD_primitive maBD = new BD_primitive();
     string cmd = "truncate toursParole";
     maBD.Commande(cmd);
     cmd = "truncate etapes";
     maBD.Commande(cmd);
     cmd = "truncate main";
     maBD.Commande(cmd);
     cmd = "truncate partie";
     maBD.Commande(cmd);
     cmd = "truncate historique";
     maBD.Commande(cmd);
     cmd = "truncate joueurPartie";
     maBD.Commande(cmd);
     cmd = "truncate semaphore";
     maBD.Commande(cmd);
     cmd = "truncate tournois";
     maBD.Commande(cmd);
     MessageBox.Show("BD vidée");
 }
 public Tournois_ADO_SRV()
 {
     maBD = new BD_primitive();
 }
Exemple #4
0
 public Historique_ADO_SRV()
 {
     maBD = new BD_primitive();
 }
Exemple #5
0
        private void PrepareBD1(object sender, RoutedEventArgs e)
        {
            BD_primitive maBD = new BD_primitive();
            string cmd = "truncate toursParole";
            maBD.Commande(cmd);
            cmd = "truncate etapes";
            maBD.Commande(cmd);
            cmd = "truncate main";
            maBD.Commande(cmd);
            cmd = "truncate partie";
            maBD.Commande(cmd);
            cmd = "truncate historique";
            maBD.Commande(cmd);
            cmd = "truncate joueurPartie";
            maBD.Commande(cmd);
            cmd = "truncate semaphore";
            maBD.Commande(cmd);
            cmd = "truncate tournois";
            maBD.Commande(cmd);

            cmd = "INSERT INTO etapes (num_partie, num_main, NomEtape, prochainJoueur, date_evenement, num_tour) VALUES" +
                     " (1, 1, 'PRE_FLOP', -1, '2017-06-19 12:58:43', 1)," +
                     "(1, 1, 'FLOP', -1, '2017-06-19 12:59:03', 1)," +
                     "(1, 1, 'TURN', -1, '2017-06-19 12:59:20', 1)," +
                     "(1, 1, 'RIVER', 0, '2017-06-19 12:59:30', 1)";
            maBD.Commande(cmd);

            cmd = "INSERT INTO `historique` (`NumeroPartie`, `numero_evenement`, `description`, `date`) VALUES" +
                     "(1, 1, 'Début de la partie 1', '2017-06-19 16:58:09')," +
                     "(1, 2, 'certs distribue la main 1', '2017-06-19 16:58:09')," +
                     "(1, 3, 'Gros blind: 2', '2017-06-19 16:58:09')," +
"(1, 4, 'cheen suit', '2017-06-19 16:58:13')," +
"(1, 5, 'certs suit', '2017-06-19 16:58:42')," +
"(1, 6, 'On passe à: FLOP', '2017-06-19 16:58:43')," +
"(1, 7, 'cheen suit', '2017-06-19 16:58:51')," +
"(1, 8, 'certs suit', '2017-06-19 16:59:02')," +
"(1, 9, 'On passe à: TURN', '2017-06-19 16:59:03')," +
"(1, 10, 'cheen suit', ' 2017-06-19 16:59:10')," +
"(1, 11, 'certs suit', '2017-06-19 16:59:20')," +
"(1, 12, 'On passe à: RIVER', '2017-06-19 16:59:20')," +
"(1, 13, 'cheen suit', '2017-06-19 16:59:30')";
            maBD.Commande(cmd);

            cmd = "INSERT INTO `joueurpartie` (`numero_partie`, `pokerman`, `position`, `Etat`) VALUES" +
        "(1, 'certs', 0, ' ')," +
        "(1, 'cheen', 1, ' ')";
            maBD.Commande(cmd);

            cmd = "INSERT INTO `main` (`num_partie`, `num_main`, `bouton`, `etape`, `debut`, `niveauPourSuivre`, `fin`, `j0_c0_v`, `j0_c0_s`, `j0_c1_v`, `j0_c1_s`, `j1_c0_v`, `j1_c0_s`, `j1_c1_v`, `j1_c1_s`, `j2_c0_v`, `j2_c0_s`, `j2_c1_v`, `j2_c1_s`, `j3_c0_v`, `j3_c0_s`, `j3_c1_v`, `j3_c1_s`, `j4_c0_v`, `j4_c0_s`, `j4_c1_v`, `j4_c1_s`, `j5_c0_v`, `j5_c0_s`, `j5_c1_v`, `j5_c1_s`, `f_c0_v`, `f_c0_s`, `f_c1_v`, `f_c1_s`, `f_c2_v`, `f_c2_s`, `t_v`, `t_s`, `r_v`, `r_s`, `valeur_j0`, `valeur_j1`, `valeur_j2`, `valeur_j3`, `valeur_j4`, `valeur_j5`, `capitalJ0`, `capitalFinJ0`, `capitalJ1`, `capitalFinJ1`, `capitalJ2`, `capitalFinJ2`, `capitalJ3`, `capitalFinJ3`, `capitalJ4`, `capitalFinJ4`, `capitalJ5`, `capitalFinJ5`, `gagnant`) VALUES" +
        "(1, 1, 0, 'RIVER', '2017-06-19 16:58:09', 2, NULL, 2, 2, 12, 0, 3, 0, 11, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, 2, 5, 2, 2, 1, 1, 0, 1, 1, 300020112, 151110705, -1, -1, -1, -1, 100, 98, 100, 98, 0, 0, 0, 0, 0, 0, 0, 0, NULL)";
            maBD.Commande(cmd);

            cmd = "INSERT INTO `partie` (`numero_tournoi`, `numero`, `numero_main`, `debut`, `fin`, `gagnant`, `perdant_5`, `perdant_4`, `perdant_3`, `perdant_2`, `perdant_1`, `perdant_5_date`, `perdant_4_date`, `perdant_3_date`, `perdant_2_date`, `perdant_1_date`, `nom_j0`, `nom_j1`, `nom_j2`, `nom_j3`, `nom_j4`, `nom_j5`) VALUES" +
"(0, 1, 1, '2017-06-19 16:58:09', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'certs', 'cheen', NULL, NULL, NULL, NULL)";
            maBD.Commande(cmd);

            cmd = "INSERT INTO `toursparole` (`num_partie`, `num_main`, `nomEtape`, `num_tour`, `dec_j0`, `eng_j0`, `date_j0`, `dec_j1`, `eng_j1`, `date_j1`, `dec_j2`, `eng_j2`, `date_j2`, `dec_j3`, `eng_j3`, `date_j3`, `dec_j4`, `eng_j4`, `date_j4`, `dec_j5`, `eng_j5`, `date_j5`) VALUES" +
         "(1, 1, 'FLOP', 1, 'SUIVRE', 2, '2017-06-19 16:59:02', 'SUIVRE', 2, '2017-06-19 16:58:51', 'MORT', 0, '2017-06-19 16:58:43', 'MORT', 0, '2017-06-19 16:58:43', 'MORT', 0, '2017-06-19 16:58:43', 'MORT', 0, '2017-06-19 16:58:43')," +
         "(1, 1, 'PRE_FLOP', 1, 'SUIVRE', 2, '2017-06-19 16:58:42', 'SUIVRE', 2, '2017-06-19 16:58:13', 'MORT', 0, '2017-06-19 16:58:09', 'MORT', 0, '2017-06-19 16:58:09', 'MORT', 0, '2017-06-19 16:58:09', 'MORT', 0, '2017-06-19 16:58:09')," +
         "(1, 1, 'RIVER', 1, 'Attente', 2, '2017-06-19 16:59:20', 'SUIVRE', 2, '2017-06-19 16:59:30', 'MORT', 0, '2017-06-19 16:59:20', 'MORT', 0, '2017-06-19 16:59:20', 'MORT', 0, '2017-06-19 16:59:20', 'MORT', 0, '2017-06-19 16:59:20')," +
         "(1, 1, 'TURN', 1, 'SUIVRE', 2, '2017-06-19 16:59:20', 'SUIVRE', 2, '2017-06-19 16:59:10', 'MORT', 0, '2017-06-19 16:59:03', 'MORT', 0, '2017-06-19 16:59:03', 'MORT', 0, '2017-06-19 16:59:03', 'MORT', 0, '2017-06-19 16:59:03')";
            maBD.Commande(cmd);

            MessageBox.Show("BD à un coup de finir une main");
        }
Exemple #6
0
 public Membres_ADO_SRV()
 {
     maBD = new BD_primitive();
 }
Exemple #7
0
 public Mains_ADO_SRV()
 {
     maBD = new BD_primitive();
 }
 public ToursParole_ADO_SRV()
 {
     maBD = new BD_primitive();
 }
Exemple #9
0
 /*--------------------------------------------------------------
  * /
  * /---------------------------------------------------------------*/
 public Etapes_ADO_SRV()
 {
     maBD = new BD_primitive();
 }
Exemple #10
0
 public JoueurPartie_ADO_SRV()
 {
     maBD = new BD_primitive();
 }
Exemple #11
0
 public Joueurs_ADO_SRV()
 {
     maBD = new BD_primitive();
 }
 public Parties_ADO_SRV()
 {
     maBD = new BD_primitive();
 }