コード例 #1
0
        private void AnswerPost(Res response, Pari value)
        {
            paddao = new Models.PariDetailDAO(connection);
            jodao  = new Models.JonctionDAO(connection);

            Models.PariDetail detail = paddao.SelectOne("WHERE pari='" + value.id + "'");
            response.data  = jodao.Select("WHERE pari='" + detail + "' OR contrePari='" + detail + "'");
            response.error = false;
        }
コード例 #2
0
        private void AnswerPut(Res response, int id, Jonction value)
        {
            paddao = new Models.PariDetailDAO(connection);
            jodao  = new Models.JonctionDAO(connection);

            Models.PariDetail pari   = paddao.SelectOne("WHERE pari='" + value.pari + "'");
            Models.PariDetail contre = paddao.SelectOne("WHERE pari='" + value.contrePari + "'");

            if (pari != null && contre != null)
            {
                this.ManagePut(response, pari, contre);
            }
            else
            {
                throw new Exception("Pari introuvable !");
            }
        }