Exemplo n.º 1
0
        private void Regler(Jonction jonction)
        {
            PariDetail pd1 = jonction.Pari, pd2 = jonction.ContrePari;
            Pari       pari   = pd1.Pari;
            Partie     partie = pari.Partie.Partie;
            Action     action = pari.Action;

            Json.Stat stat = new OtherDAO(connection).SelectOneStat(partie.Id, action.Id, pd1.Equipe.Id, pd2.Equipe.Id);
            if (pari.TypePari == 0)
            {
                this.ReglerTotal(jonction, pari, stat, pd1, pd2);
            }
            else
            {
                this.ReglerQte(jonction, pari, stat, pd1, pd2);
            }
        }
Exemplo n.º 2
0
        public float Possession(string query1, string query2)   // QUERY -> obtenir le temps de possession selon certains criteres - QUERY2 -> obtenir le nombre de mitemps
        {
            float result = 0;

            try {
                if (query1 != null && query2 != null)
                {
                    String mainQuery = "SELECT CONVERT(DECIMAL(4, 3), CONVERT(DECIMAL, (" + query1 + ")) / CONVERT(DECIMAL, (" + query2 + "))) * 100 as pourcentage";
                    result = new OtherDAO(connexion).SelectPossession(mainQuery);
                }
                else
                {
                    throw new Exception("Une requete est nulle !");
                }
            } catch (Exception ex) {
                throw ex;
                //System.Windows.Forms.MessageBox.Show(ex.Message + ":\n" + ex.StackTrace);
                //System.Windows.Forms.MessageBox.Show(query3);
            } return(result);
        }