コード例 #1
0
        void IntfDalTrajet.insertToGridTrajetNotItineraire(GridView gridView, string param, string paramLike, string valueLike, List <crlTrajet> trajets)
        {
            #region declaration
            IntfDalTrajet serviceTrajet = new ImplDalTrajet();
            string        strWhere      = "";
            #endregion

            #region implementation
            if (trajets != null)
            {
                for (int i = 0; i < trajets.Count; i++)
                {
                    strWhere += " trajet.numTrajet <> '" + trajets[i].NumTrajet + "' AND";
                }
            }
            this.strCommande  = "SELECT trajet.numTrajet, trajet.distanceTrajet, trajet.dureeTrajet,";
            this.strCommande += " trajet.numVilleD, trajet.numVilleF, trajet.numTarifBaseBillet FROM trajet";
            this.strCommande += " Inner Join associationvilletrajet ON associationvilletrajet.numTrajet = trajet.numTrajet";
            this.strCommande += " Inner Join ville ON ville.numVille = associationvilletrajet.numVille";
            this.strCommande += " WHERE " + strWhere;
            this.strCommande += " " + paramLike + " LIKE '%" + valueLike + "%'";
            this.strCommande += " GROUP BY trajet.numTrajet";
            this.strCommande += " ORDER BY " + param + " ASC";

            gridView.DataSource = serviceTrajet.getDataTableTrajetItineraire(this.strCommande);
            gridView.DataBind();
            #endregion
        }
コード例 #2
0
        void IntfDalTrajet.insertToGridTrajetItineraire(GridView gridView, string param, string paramLike, string valueLike, string idItineraire)
        {
            #region declaration
            IntfDalTrajet serviceTrajet = new ImplDalTrajet();
            #endregion

            #region implementation
            this.strCommande  = "SELECT trajet.numTrajet, trajet.distanceTrajet, trajet.dureeTrajet,";
            this.strCommande += " trajet.numVilleD, trajet.numVilleF, trajet.numTarifBaseBillet FROM trajet";
            this.strCommande += " Inner Join associationvilletrajet ON associationvilletrajet.numTrajet = trajet.numTrajet";
            this.strCommande += " Inner Join ville ON ville.numVille = associationvilletrajet.numVille";
            this.strCommande += " Inner Join associationtrajetitineraire ON associationtrajetitineraire.numTrajet = trajet.numTrajet";
            this.strCommande += " WHERE " + paramLike + " LIKE '%" + valueLike + "%' AND";
            this.strCommande += " associationtrajetitineraire.idItineraire = '" + idItineraire + "'";
            this.strCommande += " GROUP BY trajet.numTrajet";
            this.strCommande += " ORDER BY " + param + " ASC";

            gridView.DataSource = serviceTrajet.getDataTableTrajetItineraire(this.strCommande);
            gridView.DataBind();
            #endregion
        }