Ejemplo n.º 1
0
 public static List<ClientBO> SelectAll()
 {
     List<ClientBO> lstResult = null;
     try {
         using (ClientDAL clientDal = new ClientDAL(Util.GetConnection())) {
             lstResult = clientDal.ClientBO_SelectAll().ToList();
         }
     } catch (Exception Ex) {
         throw;
     }
     return lstResult;
 }
Ejemplo n.º 2
0
 public static ClientBO SelectById(Int32 pId)
 {
     ClientBO result = null;
     try {
         using (ClientDAL clientDal = new ClientDAL(Util.GetConnection())) {
             result = (ClientBO)clientDal.ClientBO_SelectById(pId);
         }
     } catch (Exception Ex) {
         throw;
     }
     return result;
 }
 public static ClientBO SelectById(Int32 pId)
 {
     ClientBO objClientResult = null;
     try {
         using (var clientDal = new ClientDAL(Util.GetConnection())) {
             var tmpObjClient = clientDal.ClientBO_SelectById(pId).ToList();
             if (tmpObjClient.Count() == 1) {
                 objClientResult = tmpObjClient[0];
                 objClientResult.Bibliotheque = BibliothequeBL.SelectById(objClientResult.BibliothequeId);
             }
         }
     } catch (Exception Ex) {
         throw;
     }
     return objClientResult;
 }