private static IDataReader get(CritereRechercheCarte criteres) { IList <string> champsWhere = new List <string>(); IList <object> valuesWhere = new List <object>(); IList <string> operators = new List <string>(); Utilities.addCritere(champsWhere, valuesWhere, operators, "NUMERO_CARTE", criteres.Numero, Connexion.LIKE); Utilities.addCritere(champsWhere, valuesWhere, operators, "ID_MOYEN_PAIEMENT", criteres.IdMoyenPaiement, Connexion.EGAL); Utilities.addCritere(champsWhere, valuesWhere, operators, "ID_TYPE_CARTE", criteres.IdTypeCarte, Connexion.EGAL); return(Connexion.get(tableName, champsWhere, valuesWhere, operators)); }
public static DataTable getDataTable(CritereRechercheCarte criteres) { IDataReader reader = get(criteres); DataTable dt = new DataTable(); if (reader != null) { dt.Load(reader); reader.Close(); } return(dt); }