public static FitnessClassList FilterLocation(FitnessClassList fitnessClassList, String selectedLocation)
        {
            FitnessClassList filteredFitnessClassList = new FitnessClassList();

            for (int i = 0; i < fitnessClassList.Count(); i++)
            {
                if (fitnessClassList.getFitnessClass(i).Location == selectedLocation)
                {
                    filteredFitnessClassList.addFitnessClass(fitnessClassList.getFitnessClass(i));
                }
            }

            return(filteredFitnessClassList);
        }
Beispiel #2
0
        private void UpdateListbox()
        {
            lstFitnessClasses.Items.Clear();

            for (int i = 0; i < fitnessClassList.Count(); i++)
            {
                lstFitnessClasses.Items.Add(fitnessClassList.getFitnessClass(i));
            }
        }
Beispiel #3
0
        private void UpdateListBox(ListBox listBox, FitnessClassList reportList)
        {
            listBox.Items.Clear();

            for (int i = 0; i < reportList.Count(); i++)
            {
                listBox.Items.Add(reportList.getFitnessClass(i).ToString());
            }
        }
Beispiel #4
0
        public void UpdateListBox()
        {
            //updates the contense of the list box so changes can be seen
            lstFitnessClasses.Items.Clear();

            for (int i = 0; i < fitnessClassList.Count(); i++)
            {
                lstFitnessClasses.Items.Add(fitnessClassList.getFitnessClass(i).ToString());
            }
        }
        public static FitnessClassList SortById(FitnessClassList fitnessClassList)
        {
            FitnessClassList sortedFitnessClassList = new FitnessClassList();

            for (int i = 0; i < fitnessClassList.Count(); i++)
            {
                sortedFitnessClassList.addFitnessClass(fitnessClassList.getFitnessClass(i));
            }

            sortedFitnessClassList.Sort();

            return(sortedFitnessClassList);
        }
        private void CreateReport(String filePath, FitnessClassList fitnessClassList)
        {
            FileStream   outFile;
            StreamWriter writer;

            outFile = new FileStream(filePath, FileMode.Create,
                                     FileAccess.Write);
            writer = new StreamWriter(outFile);

            for (int i = 0; i < fitnessClassList.Count(); i++)
            {
                FitnessClassOpportunity f = fitnessClassList.getFitnessClass(i);

                // output fitness class opportunity details
                writer.WriteLine(f.ToString());
            }

            // close writer
            writer.Close();

            // close file
            outFile.Close();
        }