private void btnVerificarFuncionario_Click(object sender, EventArgs e)
        {
            daoWebService dao = new daoWebService();
            string        rut = txtRutFuncionario.Text.Replace(".", "").Replace("-", "").Trim();
            string        run = rut.Substring(0, rut.Length - 1);

            CargarWebService.RunWorkerAsync(run);
        }
Example #2
0
        private void CargarWebService_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker IniciarAplicacion = sender as BackgroundWorker;
            string           funcionario       = (string)e.Argument;

            CargarWebService.ReportProgress(1);
            daoWebService dao = new daoWebService();

            Cl_Persona per = dao.RecuperarPersona(funcionario);

            if (per != null)
            {
                CargarWebService.ReportProgress(2, per);
            }
            else
            {
                CargarWebService.ReportProgress(3);
            }
        }