public ActionResult Alerta(int id = 0) { if (!this.currentUser()) { return(RedirectToAction("Ingresar", "Login")); } try { Usuarios user = getCurrentUser(); Alerta obj = new Alerta(); if (id > 0) { obj = dal.GetAlerta(id); return(View(obj)); } obj.Fecha = DateTime.Now; obj.IdCliente = user.id_Usuario; obj.Cantidad = 1; return(View(obj)); } catch (Exception ex) { throw ex; } }