private void HapusGayaRenangMethod(object obj) { Gaya gayaHapus = (Gaya)obj; GayaDAO gayaDAO = new GayaDAO(); gayaDAO.HapusGaya(gayaHapus); ListGaya = gayaDAO.GetAllGaya(); }
private void TambahGayaRenangMethod(object obj) { Gaya gayaInput = (Gaya)obj; GayaDAO gayaDAO = new GayaDAO(); gayaDAO.InsertGaya(gayaInput); ListGaya = gayaDAO.GetAllGaya(); }
public KelolaGayaRenang() { GayaDAO gayaDAO = new GayaDAO(); GayaInput = new Gaya(); ListGaya = gayaDAO.GetAllGaya(); TambahGayaRenang = new RelayCommand(TambahGayaRenangMethod); HapusGayaRenang = new RelayCommand(HapusGayaRenangMethod); }
public KelolaAcaraPerlombaan(Application applicationVM, Perlombaan selectedPerlombaan) { _ApplicationVM = applicationVM; SelectedPerlombaan = selectedPerlombaan; SelectedKelompok = SelectedPerlombaan.ListKelompok[0]; GayaDAO gayaDAO = new GayaDAO(); ListGaya = gayaDAO.GetAllGaya(); TambahAcara = new RelayCommand(o => TambahAcaraMethod()); SubmitAcara = new RelayCommand(o => SubmitAcaraMethod()); KelolaPerlombaanPageOpen = new RelayCommand(o => KelolaPerlombaanPageOpenMethod()); //helper generate JenisAcaraHelper = new List <KeyValuePair <JenisAcara, string> >(); JenisAcaraHelper.Add(new KeyValuePair <JenisAcara, string>(JenisAcara.Putra, "Putra")); JenisAcaraHelper.Add(new KeyValuePair <JenisAcara, string>(JenisAcara.Putri, "Putri")); JenisAcaraHelper.Add(new KeyValuePair <JenisAcara, string>(JenisAcara.Campur, "Campuran")); //end helper generate }