private void btnagregar2_Click(object sender, EventArgs e)
        {
            try
            {
                PRUEBAS_PARTICIPANTES p = new PRUEBAS_PARTICIPANTES();


                p.ID_Pruebas       = Convert.ToInt32(IdPruebas);
                p.ID_Participantes = Convert.ToInt32(IdParticipantes);

                Formato objformato = new Formato();
                objformato                  = new Formato();
                objformato.Texto            = txtnota.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronTEL;

                if (!R_Humanos.ValidarTexto(objformato))
                {
                    MessageBox.Show("El formato de la NOTA no es valido, corregir por favor");
                    return;
                }
                p.Nota = Convert.ToInt32(txtnota.Text.Trim());

                R_Humanos.AgregarNotaPruebas(p);
                MessageBox.Show("Nota agregada correctamente");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 2
0
        private void btnmodificar_Click(object sender, EventArgs e)
        {
            try
            {
                PARTICIPANTES p = new PARTICIPANTES();

                p.ID_Reclutamiento = Convert.ToInt32(nombrepuesto);
                p.Cedula_          = txtcedula.Text.Trim();
                p.Nombre           = txtnombre.Text.Trim();
                p.Apellido_1       = txtapellido1.Text.Trim();
                p.Apellido_2       = txtapellido2.Text.Trim();
                p.Correo           = txtcorreo.Text.Trim();
                p.Telefono         = txttelefono.Text.Trim();
                p.ID_Provincia     = provincia_id;
                p.ID_Canton        = canton_id;
                p.ID_Distrito      = Convert.ToInt32(id_Distritos);
                p.Direccion        = txtdireccion.Text.Trim();
                p.Estado           = Convert.ToInt32(nombreEstado);

                R_Humanos.ModificarPostulantes(p);
                MessageBox.Show("Postulante Modificado");
                limpiar();
                cargarGridParticipantes();
                cboreclutamiento.Focus();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void btnmodificar_Click(object sender, EventArgs e)
        {
            try
            {
                PERSONAL p = new PERSONAL();

                //p.ID_Puesto = Convert.ToInt32(cboidpuesto.Text.Trim());

                p.ID_Puesto          = Convert.ToInt32(nombrepuesto);
                p.Cedula             = txtcedula.Text.Trim();
                p.Nombre             = txtnombre.Text.Trim();
                p.Apellido_1         = txtapellido1.Text.Trim();
                p.Apellido_2         = txtapellido2.Text.Trim();
                p.Salario_Hora       = Convert.ToDecimal(txtsalariohora.Text.Trim());
                p.Salario_Mensual    = Convert.ToDecimal(txtsalariomes.Text.Trim());
                p.Fecha_Contratacion = Convert.ToDateTime(dtpfecha.Text.Trim());
                // p.Estado = Convert.ToInt32(cboestado.Text.Trim());
                p.Estado             = Convert.ToInt32(nombreEstado);
                p.Direccion          = txtdireccion.Text.Trim();
                p.Correo_Electronico = txtcorreo.Text.Trim();
                p.Telefono           = txttelefono.Text.Trim();

                R_Humanos.ModificarPersonal(p);
                MessageBox.Show("Personal Modificado");
                cargarGridPersonal();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 4
0
        private void CargarCombosDistritos()
        {
            List <DISTRITOS> lstresultado = R_Humanos.ConsultaDistritos(canton_id);

            this.Distritocbo.DataSource = lstresultado;
            Distritocbo.ValueMember     = "ID_Distritos";
            Distritocbo.DisplayMember   = "Nombre";
            Distritocbo.Refresh();
        }
        private void CargarCombosPersonal()
        {
            List <PERSONAL> lstresultado = R_Humanos.ConsultarIDPersonal();

            this.cbopersonal.DataSource = lstresultado;
            cbopersonal.ValueMember     = "ID_Personal";
            cbopersonal.DisplayMember   = "Cedula";
            cbopersonal.Refresh();
        }
        private void CargarCombos3()
        {
            List <PUESTOS> lstresultado = R_Humanos.ConsultaTipoCargo();

            this.cbonombre.DataSource = lstresultado;
            cbonombre.ValueMember     = "ID_Puestos";
            cbonombre.DisplayMember   = "Nombre";
            cbonombre.Refresh();
        }
        private void CargarCombosEstado()
        {
            List <ESTADOS> lstresultado = R_Humanos.ConsultarTipoEstadoUsuario();

            this.cboestado.DataSource = lstresultado;
            cboestado.ValueMember     = "ID_Estados";
            cboestado.DisplayMember   = "Nombre";
            cboestado.Refresh();
        }
Esempio n. 8
0
        private void CargarCombosProvincias()
        {
            List <PROVINCIAS> lstresultado = R_Humanos.ConsultaProvincia();

            this.Provinciacbo.DataSource = lstresultado;
            Provinciacbo.ValueMember     = "ID_Provincias";
            Provinciacbo.DisplayMember   = "Nombre";
            Provinciacbo.Refresh();
            CargarCombosCantones();
        }
Esempio n. 9
0
        private void CargarCombosCantones()
        {
            List <CANTONES> lstresultado = R_Humanos.ConsultaCantones(provincia_id);

            this.Cantoncbo.DataSource = lstresultado;
            Cantoncbo.ValueMember     = "ID_Cantones";
            Cantoncbo.DisplayMember   = "Nombre";
            Cantoncbo.Refresh();
            CargarCombosDistritos();
        }
        private void btnconsultar_Click(object sender, EventArgs e)
        {
            try
            {
                List <ROLES> lstresultados = R_Humanos.Obtener_Roles();

                this.dgvroles.DataSource = lstresultados;
                this.dgvroles.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 11
0
        private void btnmostrar_Click(object sender, EventArgs e)
        {
            try
            {
                List <PRUEBAS_PARTICIPANTES> lstresultados = R_Humanos.ObtenerPruebasParticipantes();

                this.dgvpruebas.DataSource = lstresultados;
                this.dgvpruebas.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 12
0
        private void btnmostrar_Click(object sender, EventArgs e)
        {
            try
            {
                List <NOMINA> lstresultados = R_Humanos.Obtener_Nomina();

                this.dgvnomina.DataSource = lstresultados;
                this.dgvnomina.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 13
0
        private void Cantoncbo_SelectedIndexChanged(object sender, EventArgs e)
        {
            id_Canton = Cantoncbo.SelectedValue.ToString();
            string          nombreCanton = Cantoncbo.Text;
            List <CANTONES> ls           = R_Humanos.ConsultarCanton(nombreCanton);
            CANTONES        c            = new CANTONES();

            foreach (CANTONES item in ls)
            {
                c.ID_Cantones = item.ID_Cantones;
            }

            canton_id = c.ID_Cantones;
            CargarCombosDistritos();
        }
        private void CargarComboIdParticipantes()
        {
            try
            {
                List <PARTICIPANTES> lstresultado = R_Humanos.NotasIdParticipantes();

                this.cboparticipantes.DataSource = lstresultado;
                cboparticipantes.ValueMember     = "ID_Participantes";
                cboparticipantes.DisplayMember   = "Cedula_";
                cboparticipantes.Refresh();
            }
            catch (Exception)
            {
                MessageBox.Show("No hay participantes agregados");
            }
        }
        private void CargarComboIdPruebas()
        {
            try
            {
                List <PRUEBAS> lstresultado = R_Humanos.NotasIdPruebas();

                this.cbopruebas.DataSource = lstresultado;
                cbopruebas.ValueMember     = "ID_Pruebas";
                cbopruebas.DisplayMember   = "Nombre";
                cbopruebas.Refresh();
            }
            catch (Exception)
            {
                MessageBox.Show("No hay pruebas agregadas");
            }
        }
        private void cargarGridPersonal()
        {
            try
            {
                this.dgvpersonal.DataSource = null;
                this.dgvpersonal.Refresh();

                this.dgvpersonal.DataSource = R_Humanos.Obtener_PersonalDGV(this.txtcedula.Text.Trim());

                this.dgvpersonal.Refresh();
            }
            catch (Exception)
            {
                throw;
            }
        }
Esempio n. 17
0
        private void CargarComboIdReclutamiento()
        {
            try
            {
                List <RECLUTAMIENTO> lstresultado = R_Humanos.ConsultarIDReclutamiento();

                this.cboreclutamiento.DataSource = lstresultado;
                cboreclutamiento.ValueMember     = "ID_Reclutamiento";
                cboreclutamiento.DisplayMember   = "Nombre";
                cboreclutamiento.Refresh();
            }
            catch (Exception)
            {
                MessageBox.Show("No hay reclutamientos creados");
            }
        }
Esempio n. 18
0
        private void cargarGridParticipantes()
        {
            try
            {
                this.dgvparticipantes.DataSource = null;
                this.dgvparticipantes.Refresh();

                this.dgvparticipantes.DataSource = R_Humanos.Obtener_Participantes(this.txtcedula.Text.Trim());
                // this.dataGridView1.DataSource = Clientes_BLL.ConsultarClientes(this.textBox6.Text.Trim());

                this.dgvparticipantes.Refresh();
            }
            catch (Exception)
            {
                throw;
            }
        }
        private void btnagregar_Click(object sender, EventArgs e)
        {
            try
            {
                PRUEBAS p = new PRUEBAS();

                p.Nombre      = txtnombre.Text.Trim();
                p.Descripcion = txtdescripcion.Text.Trim();

                R_Humanos.AgregarPruebas(p);
                MessageBox.Show("Prueba agregada correctamente");
                CargarComboIdPruebas();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                USUARIOS u = new USUARIOS();

                u.ID_Personal = Convert.ToInt32(IdPersonal);
                u.UserName    = txtusuario.Text.Trim();
                u.Pass        = txtcontrasena.Text.Trim();
                u.Estado      = Convert.ToInt32(EstadoUsuario);

                R_Humanos.ModificarUsuario(u);
                MessageBox.Show("Usuario Modificado correctamente");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                NOMINA p = new NOMINA();

                p.Nombre       = txtnombre.Text.Trim();
                p.Fecha_Inicio = Convert.ToDateTime(dtpfechainicio.Text.Trim());
                p.Fecha_Fin    = Convert.ToDateTime(dtpfechafinal.Text.Trim());
                p.Descripcion  = txtdescripcion.Text.Trim();



                R_Humanos.AgregarNomina(p);
                MessageBox.Show("Nómina Creada");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void btncrear_Click(object sender, EventArgs e)
        {
            try
            {
                RECLUTAMIENTO p = new RECLUTAMIENTO();

                // p.ID_Puestos = Convert.ToInt32(cboidpuesto.Text.Trim());
                p.ID_Puestos  = puestos;
                p.Nombre      = nombrepuesto;
                p.Descripcion = txtdescripcion.Text.Trim();
                //  p.Estado = Convert.ToInt32(cboestado.Text.Trim());
                p.Estado = Convert.ToInt32(nombreEstado);

                R_Humanos.AgregarReclutamiento(p);
                MessageBox.Show("Reclutamiento creado con éxito");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 23
0
        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                m.ID_Personal = Convert.ToInt32(txtidpersonal.Text.Trim());
                m.Tipo        = p.ID_Tipo;
                txthora.Text  = DateTime.Now.ToString("hh:mm:ss");
                txtfecha.Text = DateTime.Now.ToShortDateString();
                m.Hora        = TimeSpan.Parse(txthora.Text.Trim());
                m.Fecha       = Convert.ToDateTime(txtfecha.Text.Trim());


                R_Humanos.AgregarMarcaTodos(m);
                MessageBox.Show("Marca agregada correctamente");
                txtidpersonal.Text = "";
                cboturno.Text      = "";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 24
0
        private void btnagregar_Click(object sender, EventArgs e)
        {
            try
            {
                PARTICIPANTES p = new PARTICIPANTES();

                p.ID_Reclutamiento = Convert.ToInt32(nombrepuesto);

                /*********************************************************************************************/
                Formato objformato = new Formato();

                objformato.Texto            = txtcedula.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronID;
                if (!R_Humanos.ValidarTexto(objformato))
                {
                    MessageBox.Show("El formato de la Cédula no es valido, corregir por favor");
                    return;
                }
                p.Cedula_ = txtcedula.Text.Trim();

                /*********************************************************************************************/
                objformato                  = new Formato();
                objformato.Texto            = txtnombre.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronNOMBRE;
                if (!R_Humanos.ValidarTexto(objformato) || objformato.Texto.Length == 0)
                {
                    MessageBox.Show("El formato del Nombre no es valido, corregir por favor");
                    return;
                }
                p.Nombre = txtnombre.Text.Trim();

                /*********************************************************************************************/
                objformato                  = new Formato();
                objformato.Texto            = txtapellido1.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronNOMBRE;
                if (!R_Humanos.ValidarTexto(objformato) || objformato.Texto.Length == 0)
                {
                    MessageBox.Show("El formato del Apellido no es valido, corregir por favor");
                    return;
                }
                p.Apellido_1 = txtapellido1.Text.Trim();

                /*********************************************************************************************/
                objformato                  = new Formato();
                objformato.Texto            = txtapellido2.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronNOMBRE;
                if (!R_Humanos.ValidarTexto(objformato) || objformato.Texto.Length == 0)
                {
                    MessageBox.Show("El formato del Apellido no es valido, corregir por favor");
                    return;
                }
                p.Apellido_2 = txtapellido2.Text.Trim();

                /*********************************************************************************************/
                objformato                  = new Formato();
                objformato.Texto            = txtcorreo.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronCORREO;

                if (!R_Humanos.ValidarTexto(objformato))
                {
                    MessageBox.Show("El formato del CORREO no es valido, corregir por favor");
                    return;
                }
                p.Correo = txtcorreo.Text.Trim();

                /*********************************************************************************************/
                objformato                  = new Formato();
                objformato.Texto            = txttelefono.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronTEL;

                if (!R_Humanos.ValidarTexto(objformato))
                {
                    MessageBox.Show("El formato del TELÉFONO no es valido, corregir por favor");
                    return;
                }
                p.Telefono = txttelefono.Text.Trim();

                /*********************************************************************************************/
                p.ID_Provincia = provincia_id;
                p.ID_Canton    = canton_id;
                p.ID_Distrito  = Convert.ToInt32(id_Distritos);
                p.Direccion    = txtdireccion.Text.Trim();
                p.Estado       = Convert.ToInt32(nombreEstado);

                R_Humanos.AgregarPostulantes(p);
                MessageBox.Show("Postulante agregado correctamente");
                limpiar();
                cargarGridParticipantes();
                cboreclutamiento.Focus();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void btnagregar_Click(object sender, EventArgs e)
        {
            try
            {
                PERSONAL p = new PERSONAL();

                p.ID_Puesto = Convert.ToInt32(nombrepuesto);

                /*********************************************************************************************/

                Formato objformato = new Formato();

                objformato.Texto            = txtcedula.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronID;
                if (!R_Humanos.ValidarTexto(objformato))
                {
                    MessageBox.Show("El formato de la Cédula no es valido, corregir por favor");
                    return;
                }
                p.Cedula = txtcedula.Text.Trim();

                /*********************************************************************************************/

                objformato                  = new Formato();
                objformato.Texto            = txtnombre.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronNOMBRE;
                if (!R_Humanos.ValidarTexto(objformato) || objformato.Texto.Length == 0)
                {
                    MessageBox.Show("El formato del Nombre no es valido, corregir por favor");
                    return;
                }
                p.Nombre = txtnombre.Text.Trim();

                /*********************************************************************************************/

                objformato                  = new Formato();
                objformato.Texto            = txtapellido1.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronNOMBRE;
                if (!R_Humanos.ValidarTexto(objformato) || objformato.Texto.Length == 0)
                {
                    MessageBox.Show("El formato del Apellido no es valido, corregir por favor");
                    return;
                }
                p.Apellido_1 = txtapellido1.Text.Trim();

                /*********************************************************************************************/

                objformato                  = new Formato();
                objformato.Texto            = txtapellido2.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronNOMBRE;
                if (!R_Humanos.ValidarTexto(objformato) || objformato.Texto.Length == 0)
                {
                    MessageBox.Show("El formato del Apellido no es valido, corregir por favor");
                    return;
                }
                p.Apellido_2 = txtapellido2.Text.Trim();

                /*********************************************************************************************/

                p.Salario_Hora       = Convert.ToDecimal(txtsalariohora.Text.Trim());
                p.Salario_Mensual    = Convert.ToDecimal(txtsalariomes.Text.Trim());
                p.Fecha_Contratacion = Convert.ToDateTime(dtpfecha.Text.Trim());
                p.Estado             = Convert.ToInt32(nombreEstado);
                p.Direccion          = txtdireccion.Text.Trim();

                /*********************************************************************************************/

                objformato                  = new Formato();
                objformato.Texto            = txtcorreo.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronCORREO;

                if (!R_Humanos.ValidarTexto(objformato))
                {
                    MessageBox.Show("El formato del CORREO no es valido, corregir por favor");
                    return;
                }
                p.Correo_Electronico = txtcorreo.Text.Trim();

                /*********************************************************************************************/

                objformato                  = new Formato();
                objformato.Texto            = txttelefono.Text.Trim();
                objformato.PatronValidacion = Constantes.PatronTEL;

                if (!R_Humanos.ValidarTexto(objformato))
                {
                    MessageBox.Show("El formato del TELÉFONO no es valido, corregir por favor");
                    return;
                }
                p.Telefono = txttelefono.Text.Trim();


                R_Humanos.AgregarPersonal(p);
                MessageBox.Show("Personal agregado correctamente");
                cargarGridPersonal();
                txtcedula.Focus();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }