protected void BotonHistorialPrestamos_Click(object sender, EventArgs e) { String MensajeDevuelto = ""; try { if (Page.IsValid) { validarFechaInicio(); validarFechaFinal(); cSGPRPRESTAMONegocios Prestamo = new cSGPRPRESTAMONegocios(Global.gCOD_APLICACION, "CA", 2, "cosejo"); string[] arregloFechas = TextBoxFechaInicio.Text.Split('/'); string fechaInicio = arregloFechas[1] + "/" + arregloFechas[0] + "/" + arregloFechas[2]; arregloFechas = TextBoxFechaFinal.Text.Split('/'); string fechaFinal = arregloFechas[1] + "/" + arregloFechas[0] + "/" + arregloFechas[2]; DataTable DT_Prestamos = Prestamo.obtenerReporte(Convert.ToDateTime(fechaInicio), Convert.ToDateTime(fechaFinal)); llenarTablaPrestamos(TextBoxFechaInicio.Text, TextBoxFechaFinal.Text, DT_Prestamos); } LabelMensaje.ForeColor = System.Drawing.Color.Blue; } catch (Exception ex) { MensajeDevuelto = ex.Message; LabelMensaje.ForeColor = System.Drawing.Color.Red; } LabelMensaje.Text = MensajeDevuelto; }