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