protected void txtCedula1_TextChanged(object sender, EventArgs e) { VehiculoServiceClient servVehiculo = new VehiculoServiceClient(); VehiculoBE consultar_conductor = new VehiculoBE(); long resp; try { resp = servVehiculo.ConsultarExistenciaConductor(txtCedula1.Text); if (resp == 0) { MessageBox.Show("El conductor no se encuentra registrado en el sistema", "Registro de Vehículos"); txtCedula1.Text = ""; txtCedConductor.Text = ""; txtNombreCond.Text = ""; txtSegundoApellidoCond.Text = ""; txtPrimerApellidoCond.Text = ""; DivDatosConductor.Visible = false; txtCedula1.Focus(); } else { ConductorBE objConductor = servVehiculo.Consultar_Conductor(txtCedula1.Text); txtCedConductor.Text = objConductor.Cedula; txtNombreCond.Text = objConductor.Nombres_Conductor; txtPrimerApellidoCond.Text = objConductor.Apellido_1; txtSegundoApellidoCond.Text = objConductor.Apellido_2; DivDatosConductor.Visible = true; btnGuardar.Visible = true; txtCedula1.Text = ""; btnGuardar.Focus(); } } catch (Exception ex) { Response.Redirect("~/About.aspx"); } finally { servVehiculo.Close(); } }
protected void txtCedula_TextChanged(object sender, EventArgs e) { VehiculoServiceClient servVehiculo = new VehiculoServiceClient(); long resp; try { resp = servVehiculo.ConsultarExistenciaConductor(txtCedula.Text); if (resp != 0) { MessageBox.Show("El Conductor ya se encuentra registrado en el sistema", "Registrar Conductor"); divInfoConductor.Visible = false; btnGuardar.Visible = false; txtCedulaCond.Text = ""; txtCedula.Text = ""; txtDireccion.Text = ""; txtPrimerApellido.Text = ""; txtNombreConductor.Text = ""; txtTelefono.Text = ""; txtCedula.Focus(); } else { divInfoConductor.Visible = true; btnGuardar.Visible = true; txtNombreConductor.Focus(); txtCedulaCond.Text = txtCedula.Text; txtCedula.Text = ""; } } catch (Exception ex) { Response.Redirect("~/About.aspx"); } finally { servVehiculo.Close(); } }
protected void txtCedula1_TextChanged(object sender, EventArgs e) { VehiculoServiceClient servVehiculo = new VehiculoServiceClient(); VehiculoBE consultar_conductor = new VehiculoBE(); long resp; try { resp = servVehiculo.ConsultarExistenciaConductor(txtCedula1.Text); if (resp == 0) { MessageBox.Show("El conductor no se encuentra registrado en el sistema", "Modificar Vehículo"); } else { ConductorBE objConductor = servVehiculo.Consultar_Conductor(txtCedula1.Text); lblImprimirCedula.Text = objConductor.Cedula; txtNombreCond.Text = objConductor.Nombres_Conductor; txtPrimerApellidoCond.Text = objConductor.Apellido_1; txtSegundoApellidoCond.Text = objConductor.Apellido_2; DivDatosConductor.Visible = true; btnGuardar.Visible = true; txtCedula1.Text = ""; } } catch (Exception ex) { Response.Redirect("~/About.aspx"); } finally { servVehiculo.Close(); lstRuta.Focus(); } }