Ejemplo n.º 1
0
 public List <Reservation> GetAllReservations()
 {
     try
     {
         return(reservationDao.GetAllReservations());
     }
     catch
     {
         string   errorstr = "Chapeau App couldn't get the reservations";
         ErrorDAO error    = new ErrorDAO(errorstr);
         throw;
     }
 }
Ejemplo n.º 2
0
        public QueryResponse <ReservationQueryModel> GetAllReservations()
        {
            QueryResponse <ReservationQueryModel> responseReservations = reservationDAO.GetAllReservations();
            List <ReservationQueryModel>          temp = responseReservations.Data;

            if (temp == null)
            {
                return(responseReservations);
            }
            foreach (ReservationQueryModel item in temp)
            {
                item.ClientCPF         = item.ClientCPF.Insert(3, ".").Insert(7, ".").Insert(12, "-");
                item.ClientPhoneNumber = item.ClientPhoneNumber.Insert(0, "+").Insert(3, "(").Insert(6, ")").Insert(12, "-");
            }
            return(responseReservations);
        }