Example #1
0
        public ActionResult Delete(long id)
        {
            Fabricante fabricante = fabricanteServico.EliminarFabricantePorId(id);

            TempData["Message"] = "Fabricante" + fabricante.Nome.ToUpper() + "foi excluído";
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Delete(long id)
 {
     try
     {
         Fabricante fabricante = fabricanteServico.EliminarFabricantePorId(id);
         TempData["Message"] = $"Fabricante {fabricante.Nome.ToUpper()} foi removido.";
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
 public ActionResult Delete(long id)
 {
     try
     {
         var fabricante = fabricanteServico.EliminarFabricantePorId(id);
         TempData["msg"] = $"Fabricante {fabricante.Nome.ToUpper()} ecluído!";
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Example #4
0
 public ActionResult Delete(long id)
 {
     try
     {
         var fabricante = fabricanteServico.EliminarFabricantePorId(id);
         TempData["Message"] = "Fabricante " + fabricante.Nome.ToUpper() + " foi Removido!";
         return(RedirectToAction("Index"));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Example #5
0
        public ActionResult Delete(long id)
        {
            //fabricantes.Remove(
            //    fabricantes.Where(c => c.FabricanteId == fabricante.FabricanteId)
            //    .First());
            try
            {
                Fabricante fabricante = fabricanteServico.EliminarFabricantePorId(id);

                TempData["Message"] = "Fabricante " + fabricante.Nome.ToUpper() + " foi removido";

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }