示例#1
0
        private void HapusGayaRenangMethod(object obj)
        {
            Gaya    gayaHapus = (Gaya)obj;
            GayaDAO gayaDAO   = new GayaDAO();

            gayaDAO.HapusGaya(gayaHapus);
            ListGaya = gayaDAO.GetAllGaya();
        }
示例#2
0
        private void TambahGayaRenangMethod(object obj)
        {
            Gaya    gayaInput = (Gaya)obj;
            GayaDAO gayaDAO   = new GayaDAO();

            gayaDAO.InsertGaya(gayaInput);
            ListGaya = gayaDAO.GetAllGaya();
        }
示例#3
0
        public KelolaGayaRenang()
        {
            GayaDAO gayaDAO = new GayaDAO();

            GayaInput        = new Gaya();
            ListGaya         = gayaDAO.GetAllGaya();
            TambahGayaRenang = new RelayCommand(TambahGayaRenangMethod);
            HapusGayaRenang  = new RelayCommand(HapusGayaRenangMethod);
        }
示例#4
0
        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
        }