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);
        }
        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 #3
0
 public void AddFitnessClass()
 {
     try
     {
         fitnessClassList.addFitnessClass((FitnessClassOpportunity)Session["FitnessClassOpportunity"]);
     }
     catch (DuplicateIdException exception)
     {
         lblAlert.Text = (exception.Message);
     }
     finally
     {
         UpdateListBox();
     }
 }
Beispiel #4
0
        public void AddFitnessClass()
        {
            AddFitnessClassForm frm = new AddFitnessClassForm();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    fitnessClassList.addFitnessClass(frm.GetData());

                    UpdateListbox();
                }
                catch (DuplicateIdException exception)
                {
                    MessageBox.Show(exception.Message);
                }
            }
        }