public ActionResult DetalleVehiculo(string id2) { string name = TempData["username"].ToString(); string nameRol = TempData["rol"].ToString(); int codUser = Int32.Parse(TempData["codUser"].ToString()); ViewBag.name = name; ViewBag.rol = nameRol; TempData["username"] = name; TempData["rol"] = nameRol; TempData["codUser"] = codUser; DAOUsuario dataU = DAOUsuario.getInstance(); string today = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss tt"); string accion = "Detalles del vehiculo en " + id2; dataU.insertarAccion(codUser, 2, today, accion); DAOVehiculo data = DAOVehiculo.getInstance(); Vehiculo veh = data.buscarDetalleTerrestre(id2); if (veh.placa == null) { veh = data.buscarDetalleBarco(id2); } if (veh.placa == null) { veh = data.buscarDetalleAvion(id2); } return(View(veh)); }
public ActionResult Reporte27E() { string name = TempData["username"].ToString(); string nameRol = TempData["rol"].ToString(); int codUser = Int32.Parse(TempData["codUser"].ToString()); ViewBag.name = name; ViewBag.rol = nameRol; TempData["username"] = name; TempData["rol"] = nameRol; TempData["codUser"] = codUser; DAOUsuario dataU = DAOUsuario.getInstance(); string today = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss tt"); string accion = "Reporte 27E"; dataU.insertarAccion(codUser, 2, today, accion); DAOVehiculo data = DAOVehiculo.getInstance(); List <Vehiculo> paquetes = data.obtenerReporte27E(); return(View(paquetes)); }