protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //instancia DetalleBL Carrito.DetalleBL tabla = new Carrito.DetalleBL((DataTable)Session["carrito"]); //listar GridView2.DataSource = tabla.getRegistro; GridView2.DataBind(); } Correo = (string)(Session["Correo"]); monto = Pago.DatosCarrito.monto; SqlCommand comando = new SqlCommand("Select Nom_cliente, Ape_cliente from Clientes where Email_cliente='" + Correo + "'", conexion); conexion.Open(); SqlDataReader leer = comando.ExecuteReader(); if (leer.Read()) { nombre = leer.GetString(0).Trim() + " " + leer.GetString(1).Trim(); txtCorreo.Text = Correo; conexion.Close(); } conexion.Close(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //instancia DetalleBL Carrito.DetalleBL tabla = new Carrito.DetalleBL((DataTable)Session["carrito"]); //listar GridView3.DataSource = tabla.getRegistro; GridView3.DataBind(); } Correo = (string)(Session["Correo"]); monto = Pago.DatosCarrito.monto; SqlCommand comando1 = new SqlCommand("Select Numero_tarjeta from Clientes where Email_cliente='"+Correo+"'",conexion); conexion.Open(); SqlDataReader leer = comando1.ExecuteReader(); if (leer.Read()) { nombre = leer.GetString(0); txtTarjeta.Text = leer.GetString(0); conexion.Close(); } conexion.Close(); conexion.Open(); SqlCommand coamdno = new SqlCommand("Select Nom_cliente, Ape_cliente from Clientes where Numero_tarjeta='" + nombre + "'", conexion); SqlDataReader lectur = coamdno.ExecuteReader(); if (lectur.Read()) { cliente = lectur.GetString(0).Trim() + " " + lectur.GetString(1); } conexion.Close(); }