public PROJECT_EMPLOYEES_RESERVATION GetEmployeeReservationByReservID(int ReservationID)
        {
            PROJECT_EMPLOYEES_RESERVATION reservation = new PROJECT_EMPLOYEES_RESERVATION();

            using (var context = new APSITestDbEntities1())
            {
                reservation = context.PROJECT_EMPLOYEES_RESERVATION.First(r => r.ProjEmplResId == ReservationID);
            }
            return(reservation);
        }
        public List <RESOURCES> GetResources()
        {
            List <RESOURCES> resources = new List <RESOURCES>();

            using (var context = new APSITestDbEntities1())
            {
                resources = context.RESOURCES.ToList <RESOURCES>();
            }
            return(resources);
        }
        public List <PROJECT_EMPLOYEES_RESERVATION> GetEmployeeReservation(int EmployeeId)
        {
            List <PROJECT_EMPLOYEES_RESERVATION> reservations = new List <PROJECT_EMPLOYEES_RESERVATION>();

            using (var context = new APSITestDbEntities1())
            {
                reservations = context.PROJECT_EMPLOYEES_RESERVATION.Where(r => r.EmployeeId == EmployeeId).ToList <PROJECT_EMPLOYEES_RESERVATION>();
            }
            return(reservations);
        }
        public List <PROJECT_EMPLOYEES_RESERVATION> GetEmployeeReservationByPC(string ProjectCode)
        {
            List <PROJECT_EMPLOYEES_RESERVATION> reservations = new List <PROJECT_EMPLOYEES_RESERVATION>();

            using (var context = new APSITestDbEntities1())
            {
                reservations = context.PROJECT_EMPLOYEES_RESERVATION.Where(r => r.ProjectCode == ProjectCode).ToList <PROJECT_EMPLOYEES_RESERVATION>();
            }
            return(reservations);
        }
        public List <PROJECT_EMPLOYEES> GetEmployeeProjects(int EmployeeId)
        {
            List <PROJECT_EMPLOYEES> projects = new List <PROJECT_EMPLOYEES>();

            using (var context = new APSITestDbEntities1())
            {
                projects = context.PROJECT_EMPLOYEES.Where(r => r.EmployeeId == EmployeeId).ToList <PROJECT_EMPLOYEES>();
            }
            return(projects);
        }
        public List <PROJECT_EMPLOYEES> GetEmployeeProjectsByPC(string ProjectCode)
        {
            List <PROJECT_EMPLOYEES> projects = new List <PROJECT_EMPLOYEES>();

            using (var context = new APSITestDbEntities1())
            {
                projects = context.PROJECT_EMPLOYEES.Where(r => r.ProjectCode == ProjectCode).ToList <PROJECT_EMPLOYEES>();
            }
            return(projects);
        }
        public List <ROOMS> GetRooms()
        {
            List <ROOMS> rooms = new List <ROOMS>();

            using (var context = new APSITestDbEntities1())
            {
                rooms = context.ROOMS.ToList <ROOMS>();
            }
            return(rooms);
        }
        public List <PROJECTS> GetProjects()
        {
            List <PROJECTS> projects = new List <PROJECTS>();

            using (var context = new APSITestDbEntities1())
            {
                projects = context.PROJECTS.ToList <PROJECTS>();
            }
            return(projects);
        }
        public ROOM_RESERVATIONS GetRoomReservationByID(int id)
        {
            ROOM_RESERVATIONS reservations = new ROOM_RESERVATIONS();

            using (var context = new APSITestDbEntities1())
            {
                reservations = context.ROOM_RESERVATIONS.First(r => r.RoomResId == id);
            }
            return(reservations);
        }
        public List <ROOM_RESERVATIONS> GetRoomReservationByPC(string ProjectCode)
        {
            List <ROOM_RESERVATIONS> reservations = new List <ROOM_RESERVATIONS>();

            using (var context = new APSITestDbEntities1())
            {
                reservations = context.ROOM_RESERVATIONS.Where(r => r.ProjectCode == ProjectCode).ToList <ROOM_RESERVATIONS>();
            }
            return(reservations);
        }
        public RESOURCES_RESERVATIONS GetResourcesReservationByReservID(int ReservationID)
        {
            RESOURCES_RESERVATIONS reservation = new RESOURCES_RESERVATIONS();

            using (var context = new APSITestDbEntities1())
            {
                reservation = context.RESOURCES_RESERVATIONS.First(r => r.ResourceResId == ReservationID);
            }
            return(reservation);
        }
        public List <RESOURCES_RESERVATIONS> GetResourcesReservation(int ResourceId)
        {
            List <RESOURCES_RESERVATIONS> reservations = new List <RESOURCES_RESERVATIONS>();

            using (var context = new APSITestDbEntities1())
            {
                reservations = context.RESOURCES_RESERVATIONS.Where(r => r.ResourceId == ResourceId).ToList <RESOURCES_RESERVATIONS>();
            }
            return(reservations);
        }
        public List <EMPLOYEES> GetEmployees()
        {
            List <EMPLOYEES> employees = new List <EMPLOYEES>();

            using (var context = new APSITestDbEntities1())
            {
                employees = context.EMPLOYEES.ToList <EMPLOYEES>();
            }
            return(employees);
        }