public Reservation RedeemReservation(string serviceBrokerGuid, String userName, String labServerGuid, string clientGuid) { UserSchedulingDB dbManager = new UserSchedulingDB(); Coupon opCoupon = new Coupon(); opCoupon.couponId = opHeader.coupon.couponId; opCoupon.passkey = opHeader.coupon.passkey; opCoupon.issuerGuid = opHeader.coupon.issuerGuid; string type = TicketTypes.REDEEM_RESERVATION; try { Ticket retrievedTicket = dbManager.RetrieveAndVerify(opCoupon, type); ReservationInfo res = dbManager.RedeemReservation(userName, serviceBrokerGuid, clientGuid, labServerGuid); if (res != null) { Reservation reservation = new Reservation(res.startTime, res.endTime); reservation.userName = res.userName; return reservation; } else { return null; } } catch { throw; } }