Exemplo n.º 1
0
        public DataTable getReservedHistory(int userId)
        {
            ReservedLogic  reserveLogic = new ReservedLogic();
            List <Reserve> resList      = reserveLogic.getReservedHistory(userId);

            return(AppUtil.ToDataTable(resList));
        }
Exemplo n.º 2
0
        public DataTable getAllReserved()
        {
            ReservedLogic  reserveLogic = new ReservedLogic();
            List <Reserve> resList      = reserveLogic.getAllReserved();

            //convert our list to a datatable and return it
            return(AppUtil.ToDataTable(resList)); //returns this in the form of xml to be sent via the internet or local network
        }
Exemplo n.º 3
0
        public DataTable deleteReservation(int reservationId)
        {
            ReservedLogic reserveLogic = new ReservedLogic();
            bool          result       = reserveLogic.deleteReservation(reservationId);

            IdAndValue x = createBoolIdAndValue(result);

            //sneaky list IdAndValue of 1 item
            List <IdAndValue> idValList = new List <IdAndValue>();

            idValList.Add(x);

            return(AppUtil.ToDataTable(idValList));
        }
Exemplo n.º 4
0
        public DataTable getMediaExists(int mediaId)
        {
            ReservedLogic reserveLogic = new ReservedLogic();
            bool          result       = reserveLogic.getMediaExists(mediaId);

            IdAndValue x = createBoolIdAndValue(result);

            //sneaky list IdAndValue of 1 item
            List <IdAndValue> idValList = new List <IdAndValue>();

            idValList.Add(x);

            return(AppUtil.ToDataTable(idValList));
        }
Exemplo n.º 5
0
        public DataTable insertNewReservation(int userId, int mediaId, string dateMonthDayYear)
        {
            ReservedLogic reserveLogic = new ReservedLogic();
            bool          result       = reserveLogic.insertNewReservation(userId, mediaId, dateMonthDayYear);

            IdAndValue x = createBoolIdAndValue(result);


            //sneaky list IdAndValue of 1 item
            List <IdAndValue> idValList = new List <IdAndValue>();

            idValList.Add(x);

            return(AppUtil.ToDataTable(idValList));
        }