Exemple #1
0
        private void BtnDelete_Click(object sender, RoutedEventArgs e)
        {
            int selectedId = (VehicleGrid.SelectedItem as CarVM).Id;
            var responce   = CarLogic.Delete(new CarVM
            {
                Id = selectedId,
            });

            if (responce.IsCompleted)
            {
                VehicleGrid.ItemsSource = CarLogic.List().Object;
            }
        }
Exemple #2
0
        public async Task <IActionResult> Delete(int carId)
        {
            var isSuccess = await CarLogic.Delete(GetToken(), carId);

            return(Ok(isSuccess));
        }
Exemple #3
0
 public IActionResult Delete(string id)
 {
     logic.Delete(id);
     return(RedirectToAction(nameof(Dashboard)));
 }