BUSQUEDA ASPNET POR TECLA TAB Y F7
Publicado por maria (1 intervención) el 05/02/2017 17:51:26
buenas expertos mi duda es la siguiente
tengo un formulario de mantenimiento de clientes y quiero hacer los siguiente
tengo un txtidcliente.text y otros textbox, lño que quiero es que al hacer tab en el txtidcliente me haga la busqueda que la hago por el button....
esta es el contenido de mi button..
tengo un formulario de mantenimiento de clientes y quiero hacer los siguiente
tengo un txtidcliente.text y otros textbox, lño que quiero es que al hacer tab en el txtidcliente me haga la busqueda que la hago por el button....
esta es el contenido de mi button..
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
protected void btnConsultar_Click(object sender, EventArgs e)
{
if(txtidcliente.Text == "")
{
lblmensaje.Text = "Debe Ingresar un ID de Cliente";
txtidcliente.Focus();
return;
}
if (!CADFacturacion.CADCliente.ExisteCliente(txtidcliente.Text))
{
lblmensaje.Text = "Cliente no existe";
txtnombres.Text = "";
txtapellidos.Text = "";
txtfecha.Text = "";
txtelefono.Text = "";
txtcorreo.Text = "";
txtdireccion.Text = "";
txtcupo.Text = "";
txtidcliente.Focus();
return;
}
CADFacturacion.dsfacturacion.ClienteDataTable micliente = CADFacturacion.CADCliente.GetCliente(txtidcliente.Text);
foreach (DataRow row in micliente.Rows)
{
txtnombres.Text = row["Nombres"].ToString();
txtapellidos.Text = row["apellidos"].ToString();
txtdireccion.Text = row["direccion"].ToString();
txtelefono.Text = row["telefono"].ToString();
txtcorreo.Text = row["correo"].ToString();
txtfecha.Text = row["fechanacimiento"].ToString();
txtcupo.Text = row["cupo"].ToString();
}
lblmensaje.Text = "Cliente consultada";
}
Valora esta pregunta


0