public IReadOnlyList <TopHeartRates> RetrieveTopHeartRates()
 {
     return(executor.ExecuteReader(new RetrieveTopHeartRatesDelegate()));
 }
        public List <ItemsOut> CheckedOutBooksForMember(int memberID)
        {
            var d = new CheckedOutBooksForMemberDataDelegate(memberID);

            return(executor.ExecuteReader(d));
        }
        public RaceParticipant GetRaceParticipant(int raceParticipantId)
        {
            var d = new GetRaceParticipantDataDelegate(raceParticipantId);

            return(executor.ExecuteReader(d));
        }
        public Employee FetchEmployee(int EmployeeId)
        {
            var d = new FetchEmployeeDataDelegate(EmployeeId);

            return(executor.ExecuteReader(d));
        }
        public IReadOnlyList <TimeEntry> RetrieveHoursWorked(DateTime date)
        {
            var d = new RetrieveHoursWorkedDataDelegate(date);

            return(executor.ExecuteReader(d));
        }
 public IReadOnlyList <Report4Object> HighestRatedActor()
 {
     return(executor.ExecuteReader(new HighestRatedActorsDataDelegate()));
 }
        public Person FetchPerson(int personId)
        {
            var d = new FetchPersonDataDelegate(personId);

            return(executor.ExecuteReader(d));
        }
Esempio n. 8
0
 public IReadOnlyList <Runner> RetrieveRunners()
 {
     return(executor.ExecuteReader(new RetrieveRunnersDataDelegate()));
 }
Esempio n. 9
0
        public Product GetProduct(int p)
        {
            var d = new GetProductIdNameDataDelegate(p);

            return(executor.ExecuteReader(d));
        }
        public IReadOnlyList <EmployeeRepair> FetchAllEmployeeRepairCounts(int blank)
        {
            var d = new FetchAllEmployeeRepairCountsDataDelegate(blank);

            return(executor.ExecuteReader(d));
        }
Esempio n. 11
0
 public IReadOnlyList <RaceCoachView> RetrieveRaces()
 {
     return(executor.ExecuteReader(new RetrieveRacesDataDelegate()));
 }
Esempio n. 12
0
        public OrderCount RetrieveOrderCount(DateTimeOffset start, DateTimeOffset end)
        {
            var d = new RetrieveOrderCountDateDataDelegate(start, end);

            return(executor.ExecuteReader(d));
        }
        //public Department CreateDepartment(string firstName, string lastName, string email)
        //{
        //   if (string.IsNullOrWhiteSpace(firstName))
        //      throw new ArgumentException("The parameter cannot be null or empty.", nameof(firstName));

        //   if (string.IsNullOrWhiteSpace(lastName))
        //      throw new ArgumentException("The parameter cannot be null or empty.", nameof(lastName));

        //   if (string.IsNullOrWhiteSpace(email))
        //      throw new ArgumentException("The parameter cannot be null or empty.", nameof(email));

        //   var d = new CreateDepartmentDataDelegate(DepartmentID, StoreID, DepartmentName);
        //   return executor.ExecuteNonQuery(d);
        //}

        public Department FetchDepartment(int DepartmentId)
        {
            var d = new FetchDepartmentDataDelegate(DepartmentId);

            return(executor.ExecuteReader(d));
        }
Esempio n. 14
0
        public Review FetchReview(int reviewId)
        {
            var d = new FetchReviewDataDelegate(reviewId);

            return(executor.ExecuteReader(d));
        }
        public Actor FetchActor(int actorId)
        {
            var d = new FetchActorDataDelegate(actorId);

            return(executor.ExecuteReader(d));
        }
        public IReadOnlyList <Location> FetchLocations()
        {
            var d = new FetchLocationsDataDelegate();

            return(executor.ExecuteReader(d));
        }
        public Viewer FetchViewer(int viewerId)
        {
            var d = new FetchViewerDataDelegate(viewerId);

            return(executor.ExecuteReader(d));
        }
Esempio n. 18
0
 public IReadOnlyList <Report3Object> BestTime()
 {
     return(executor.ExecuteReader(new BestTimeDataDelegate()));
 }
Esempio n. 19
0
 public IReadOnlyList <Employees> RetrieveEmployees()
 {
     return(executor.ExecuteReader(new RetrieveEmployeesDataDelegate()));
 }
        public Ticket FetchTicket(int ticketId)
        {
            var d = new FetchTicketDataDelegate(ticketId);

            return(executor.ExecuteReader(d));
        }
Esempio n. 21
0
        public Member GetMemberbyEmail(string email)
        {
            var d = new GetMemberbyEmailDataDelegate(email);

            return(executor.ExecuteReader(d));
        }
        public Movie FetchMovie(int movieId)
        {
            var d = new FetchMovieDataDelegate(movieId);

            return(executor.ExecuteReader(d));
        }
Esempio n. 23
0
 /// <summary>
 /// Returns the list will all the waiters currently working
 /// </summary>
 /// <returns>List of waiters currently working</returns>
 public IReadOnlyList <Waiter> FetchAllCurrentylWorkingWaiters()
 {
     return(executor.ExecuteReader(new FetchAllCurrentlyWorkingWaitersDelegate()));
 }
Esempio n. 24
0
        /// <summary>
        /// If valid inputs, adds a boarding pass using info when the user clicks "Add Boarding Pass" button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void AddBoardingPass_Click(object sender, RoutedEventArgs args)
        {
            if (CheckValidInputs())
            {
                //Get airline name and price
                string airlineName       = Check.FormatName(uxAirlineName.Text);
                double boardingPassPrice = double.Parse(uxBoardingPassPrice.Text);

                //Get departure info
                DateTime departureTime = new DateTime(((DateTime)uxDepartureDate.SelectedDate).Year, ((DateTime)uxDepartureDate.SelectedDate).Month,
                                                      ((DateTime)uxDepartureDate.SelectedDate).Day, int.Parse(uxDepartureTime.Text.Split(':')[0]),
                                                      int.Parse(uxDepartureTime.Text.Split(':')[1]), 0);
                string departureCity    = Check.FormatName(uxDepartureCity.Text);
                string departureCountry = Check.FormatName(uxDepartureCountry.Text);
                string departureRegion  = Check.FormatName(uxDepartureRegion.Text);

                //Get arrival info
                DateTime arrivalTime = new DateTime(((DateTime)uxArrivalDate.SelectedDate).Year, ((DateTime)uxArrivalDate.SelectedDate).Month,
                                                    ((DateTime)uxArrivalDate.SelectedDate).Day, int.Parse(uxArrivalTime.Text.Split(':')[0]),
                                                    int.Parse(uxArrivalTime.Text.Split(':')[1]), 0);
                string arrivalCity    = Check.FormatName(uxArrivalCity.Text);
                string arrivalCountry = Check.FormatName(uxArrivalCountry.Text);
                string arrivalRegion  = Check.FormatName(uxArrivalRegion.Text);

                int cityDepartureID         = 0;
                SqlCommandExecutor executor = new SqlCommandExecutor(connectionString);

                //Lookup departure city
                City departurecitysearch = executor.ExecuteReader(new LocationGetCityDelegate(departureCity, departureCountry, departureRegion));

                //If departure city does not exist, add city
                if (departurecitysearch == null)
                {
                    City newdeparturecity = executor.ExecuteNonQuery(new LocationCreateCityDelegate(departureCity, departureRegion, departureCountry));
                    cityDepartureID = newdeparturecity.CityID;
                }
                else
                {
                    cityDepartureID = departurecitysearch.CityID;
                }

                int cityArrivalID = 0;

                //Lookup arrival city
                City arrivalcitysearch = executor.ExecuteReader(new LocationGetCityDelegate(arrivalCity, arrivalCountry, arrivalRegion));

                //If arrival city does not exist, add city
                if (arrivalcitysearch == null)
                {
                    City newarrivalcity = executor.ExecuteNonQuery(new LocationCreateCityDelegate(arrivalCity, arrivalRegion, arrivalCountry));

                    cityArrivalID = newarrivalcity.CityID;
                }
                else
                {
                    cityArrivalID = arrivalcitysearch.CityID;
                }

                int flightID = 0;

                //Lookup flight
                Flight flightsearch = executor.ExecuteReader(new GetFlightDelegate(airlineName, departureTime, cityDepartureID, arrivalTime, cityArrivalID));

                //If flight does not exist, add flight
                if (flightsearch == null)
                {
                    Flight flight = executor.ExecuteNonQuery(new CreateFlightDelegate(airlineName, departureTime, arrivalTime, cityDepartureID, cityArrivalID));
                    flightID = flight.FlightID;
                }
                else
                {
                    flightID = flightsearch.FlightID;
                }

                //Create new boarding pass for flight
                BoardingPass bp = executor.ExecuteNonQuery(new CreateBoardingPassDelegate(tripID, flightID, boardingPassPrice));

                MessageBox.Show("Boarding pass successfully added to flight " + flightID + " with airline " + airlineName);
            }
        }
Esempio n. 25
0
        public IReadOnlyList <Report2Object> MostViewed(string start, string end)
        {
            var d = new MostViewedDataDelegate(start, end);

            return(executor.ExecuteReader(d));
        }
        //public WorkPosition CreateWorkPosition(string firstName, string lastName, string email)
        //{
        //   if (string.IsNullOrWhiteSpace(firstName))
        //      throw new ArgumentException("The parameter cannot be null or empty.", nameof(firstName));

        //   if (string.IsNullOrWhiteSpace(lastName))
        //      throw new ArgumentException("The parameter cannot be null or empty.", nameof(lastName));

        //   if (string.IsNullOrWhiteSpace(email))
        //      throw new ArgumentException("The parameter cannot be null or empty.", nameof(email));

        //   var d = new CreateWorkPositionDataDelegate(WorkPositionID, StoreID, WorkPositionName);
        //   return executor.ExecuteNonQuery(d);
        //}

        public WorkPosition FetchWorkPosition(int WorkPositionId)
        {
            var d = new FetchWorkPositionDataDelegate(WorkPositionId);

            return(executor.ExecuteReader(d));
        }
Esempio n. 27
0
        public TrainingRun GetTrainingRun(int trainingRunId)
        {
            var d = new GetTrainingRunDataDelegate(trainingRunId);

            return(executor.ExecuteReader(d));
        }
Esempio n. 28
0
        /*
         * public IReadOnlyList<ShowTime> FetchShowTime()
         * {
         *  var d = new FetchShowTimesDataDelegate();
         *  return executor.ExecuteReader(d);
         * }
         */
        public ShowTime FetchShowTime(int showTimeId)
        {
            var d = new FetchShowTimeDataDelegate(showTimeId);

            return(executor.ExecuteReader(d));
        }
        public IReadOnlyList <Address> RetrieveAdresses(int personId)
        {
            var d = new RetrieveAddressesForPersonDataDelegate(personId);

            return(executor.ExecuteReader(d));
        }
        public User GetUser(string email)
        {
            var d = new GetUserDataDelegate(email);

            return(executor.ExecuteReader(d));
        }