Exemplo n.º 1
0
        /// <summary>
        /// Gets a list with all the Escaperooms in the database
        /// </summary>
        /// <returns>A list of all the escaperooms</returns>
        public List <MAPMAClient.Model.EscapeRoom> GetAllForOwner()
        {
            IEscapeRoom_Services Service = new EscapeRoom_ServicesClient();

            var escapeRooms = Service.GetAllForOwner();

            return(GetClintsideEscapeRooms(escapeRooms));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the freetimes avalible for the chosen escaperoom
        /// </summary>
        /// <param name="ER_ID">The EscapeRoom ID</param>
        /// <param name="Bdate">The Date of the booking</param>
        /// <returns>returns a list of the times avalible for the escaperoom</returns>
        public List <TimeSpan> FreeTimes(int ER_ID, DateTime Bdate)
        {
            IEscapeRoom_Services escServ = new EscapeRoom_ServicesClient();

            Console.WriteLine(escServ.FreeTimes(ER_ID, Bdate).Count);

            return(escServ.FreeTimes(ER_ID, Bdate));
        }
Exemplo n.º 3
0
        public EscapeRoom GetEscapeRoom(int escapeRoomID)
        {
            IEscapeRoom_Services escServ = new EscapeRoom_ServicesClient();

            try {
                return(escServ.GetForOwner(escapeRoomID));
            }
            catch (NullReferenceException NE) {
                Console.WriteLine(NE);
                Console.ReadLine();
                return(null);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Search the database for one escaperoom
        /// </summary>
        /// <param name="ER_ID"></param>
        /// <returns>One escaperoom</returns>
        public MAPMAClient.Model.EscapeRoom GetForOwner(int ER_ID)
        {
            IEscapeRoom_Services Service = new EscapeRoom_ServicesClient();

            try {
                var escapeRooms = Service.GetForOwner(ER_ID);

                MAPMAClient.Model.EscapeRoom es;

                es = GetClientsideOneEscapeRoom(escapeRooms);

                return(es);
            }
            catch (NullReferenceException NE) {
                Console.WriteLine(NE);
                Console.ReadLine();
                return(null);
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Calls the WCF, so the method DeleteEscapeRoom runs in the host and the choosen escaperoom is deletet
        /// </summary>
        /// <param name="id"></param>
        public void DeleteEscapeRoom(int id)
        {
            IEscapeRoom_Services Service = new EscapeRoom_ServicesClient();

            Service.DeleteEscapeRoom(id);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Calls the WCF, so the method CreateEscapeRoom runs in the host and a escaperoom is createt and saved in the database
        /// </summary>
        /// <param name="name"></param>
        /// <param name="description"></param>
        /// <param name="maxClearTime"></param>
        /// <param name="cleanTime"></param>
        /// <param name="price"></param>
        /// <param name="rating"></param>
        /// <param name="empId"></param>
        /// <param name="img"></param>
        public void CreateEscapeRoom(string name, string description, decimal maxClearTime, decimal cleanTime, decimal price, decimal rating, int empId, byte[] img)
        {
            IEscapeRoom_Services Service = new EscapeRoom_ServicesClient();

            Service.CreateEscapeRoom(name, description, maxClearTime, cleanTime, price, rating, empId, img);
        }
Exemplo n.º 7
0
        /// <summary>
        /// To get the FreeTimes on a choosen escaperoom on a specific date
        /// </summary>
        /// <param name="ER_ID"></param>
        /// <param name="Bdate"></param>
        /// <returns>The FreeTimes on the specific date</returns>
        public List <TimeSpan> FreeTimes(int ER_ID, DateTime Bdate)
        {
            IEscapeRoom_Services Service = new EscapeRoom_ServicesClient();

            return(Service.FreeTimes(ER_ID, Bdate));
        }
Exemplo n.º 8
0
        public List <EscapeRoom> GetAllEscapeRooms()
        {
            IEscapeRoom_Services escServ = new EscapeRoom_ServicesClient();

            return(escServ.GetAllForOwner());
        }