}
private ModelAndView registrarCancha(HttpServletRequest request) {
ModelAndView view = null;
Cancha cancha = new Cancha();
//Obtener atributos de la cancha
String strLocal = request.getParameter("local");
String nombre = request.getParameter("nombre");
String tarifaDiurna = request.getParameter("tarifaDiurna");
String tarifaNocturna = request.getParameter("tarifaNocturna");
try {
Local local = new Local();
local.setId(Integer.valueOf(strLocal));
cancha.setLocal(local);
} catch (Exception ex) {
}
cancha.setNombre(nombre);
try {
cancha.setTarifaDiurna(Double.parseDouble(tarifaDiurna));
} catch (Exception ex) {
}
try {
cancha.setTarifaNocturna(Double.parseDouble(tarifaNocturna));
} catch (Exception ex) {
}
//Obtener horario
HorarioCancha hc = null;