Пример #1
0
        private void editBtnAkomodasi_Click(object sender, RoutedEventArgs e)
        {
            Button             button     = sender as Button;
            ModelListAkomodasi dataObject = button.DataContext as ModelListAkomodasi;

            this.NavigationService.Navigate(new EditLokasi.EditPage(this.token, dataObject));
        }
Пример #2
0
        private void deleteBtnAkomodasi_Click(object sender, RoutedEventArgs e)
        {
            Button             button     = sender as Button;
            ModelListAkomodasi dataObject = button.DataContext as ModelListAkomodasi;
            MessageBoxResult   result     = MessageBox.Show("Are you sure want to perform this action?", "Delete Service", MessageBoxButton.YesNo, MessageBoxImage.Warning);

            switch (result)
            {
            case MessageBoxResult.Yes:
                getController().callMethod("deleteAkomodasi", dataObject.id.ToString(), this.token);

                break;
            }
        }
Пример #3
0
        private void deleteBtn_Click(object sender, RoutedEventArgs e)
        {
            for (int i = 0; i < listServices.Count; i++)
            {
                //listServices.ElementAt(i).id = actualId.ElementAt(i);
            }

            Button             button     = sender as Button;
            ModelListAkomodasi dataObject = button.DataContext as ModelListAkomodasi;

            Console.WriteLine(dataObject.id);
            MessageBoxResult result = MessageBox.Show("Are you sure want to perform this action?", "Delete Service", MessageBoxButton.YesNo, MessageBoxImage.Warning);

            switch (result)
            {
            case MessageBoxResult.Yes:
                getController().callMethod("deleteService", dataObject.id);

                break;
            }
        }