Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Marcas marca = marcaService.FindById(id);

            marcaService.Delete(marca);
            return(RedirectToAction("Index"));
        }
        private void btnMarcaEliminar_Click(object sender, EventArgs e)
        {
            var row = dgvMarca.SelectedCells[0].OwningRow;

            var marca = _context.Marca.Find(Convert.ToInt32(row.Cells[0].Value));

            _marcaService.Delete(marca);

            MarcaVehiculo_Load(sender, e);
        }
Beispiel #3
0
 public ActionResult Delete(int id)
 {
     _marcaService.Delete(id);
     return(RedirectToAction(nameof(Index)));
 }