Beispiel #1
0
    protected void txt_rutCond_TextChanged(object sender, EventArgs e)
    {
        if (!chk_conductorExtranjero.Checked && !utils.validarRut(txt_conductorRut.Text))
        {
            txt_conductorRut.Text    = "";
            txt_conductorNombre.Text = "";
            utils.ShowMessage2(this, "conductor", "warn_rutNovalido");
            return;
        }
        ServiciosExternosConductorBC c = new ServiciosExternosConductorBC();

        c = c.ObtenerXRut(utils.formatearRut(txt_conductorRut.Text));

        if (c.ID == 0)
        {
            utils.ShowMessage2(this, "conductor", "warn_conductorNoexiste");
            return;
        }
        if (c.BLOQUEADO)
        {
            txt_conductorRut.Text    = "";
            txt_conductorNombre.Text = "";
            utils.ShowMessage2(this, "conductor", "warn_conductorBloqueado");
            return;
        }
        txt_conductorNombre.Text = c.NOMBRE;
        utils.ShowMessage2(this, "conductor", "success");
    }
Beispiel #2
0
 protected void txt_editRut_TextChanged(object sender, EventArgs e)
 {
     if (this.validarRut(txt_editRut.Text))
     {
         ServiciosExternosConductorBC c = new ServiciosExternosConductorBC();
         c = c.ObtenerXRut(this.txt_editRut.Text);
         if (c.ID != 0)
         {
             this.hf_id.Value         = c.ID.ToString();
             this.txt_editNombre.Text = c.NOMBRE;
             this.txt_editRut.Enabled = false;
             utils.ShowMessage2(this, "crear", "warn_rutEncontrado");
         }
         this.txt_editNombre.Focus();
     }
     else
     {
         utils.ShowMessage2(this, "crear", "warn_rutNoValido");
         this.txt_editRut.Text = "";
         this.txt_editRut.Focus();
     }
 }