public IActionResult Delete(int id)
        {
            var model = new ProductViewModel();

            model.Delete(id);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public ActionResult Delete(int?id)
        {
            bool result = false;

            if (id.HasValue)
            {
                ProductViewModel model = ProductViewModel.ExecuteCreate(id.Value);

                if (model != null)
                {
                    model.Delete();
                    result = true;
                }
            }

            return(Json(new { Success = result }, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
 private void BtnDelete_Click(object sender, RoutedEventArgs e)
 {
     vm.Delete();
 }
Ejemplo n.º 4
0
 private void DeleteButton_Click(object sender, RoutedEventArgs e)
 {
     _viewModel.Delete();
 }
Ejemplo n.º 5
0
 public void Execute(object parameter)
 {
     viewModel.Delete();
 }