Пример #1
0
 public ActionResult Agregar(Producto producto)
 {
     try
     {
         if (ModelState.IsValid)
         {
             pd = new ProductoData();
             if (pd.Add(producto))
             {
                 ViewBag.Mensagem = " ingresado con exito ";
             }
         }
         return(View());
     }
     catch (Exception)
     {
         return(View("ObtenerLista"));
     }
 }