Exemplo n.º 1
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            string newCodVac, newDpto, abvDpto;
            int    idEstado, idDpto, cupoNumber, corrVac;

            vacante     = txtVacante.Text;
            newDpto     = cmbDepartamento.Text;
            idDpto      = oDepartamentosBLL.getDptoID(newDpto);
            descripcion = txtDescripcion.Text;
            idEstado    = int.Parse(cmbEstado.SelectedValue.ToString());
            cupoNumber  = decimal.ToInt32(txtCupo.Value);

            if (departamento.Equals(newDpto))
            {
                newCodVac = codVac;
            }
            else
            {
                corrVac = oVacantesBLL.getCorrVac(idDpto);
                abvDpto = oDepartamentosBLL.getDptoAbv(idDpto);
                int idVac = oVacantesBLL.getIdVac(codVac);
                newCodVac = oVacantesBLL.setVacCode(abvDpto, corrVac) + idVac;
            }

            oVacantesBLL.updateVacante(codVac, newCodVac, vacante, descripcion, idDpto, idEstado, cupoNumber);

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetVacantes(newCodVac));
            Close();
        }
Exemplo n.º 2
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetRequisito(idReq));
            Close();
        }
Exemplo n.º 3
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            int idEmp;

            if (string.IsNullOrEmpty(cmbEmpleados.Text))
            {
                MessageBox.Show("Asegurese de llenar los campos");
            }
            else
            {
                idEmp = int.Parse(cmbEmpleados.SelectedValue.ToString());

                if (capacitaciones.validateCapEmp(idCap, idEmp))
                {
                    capacitaciones.asignarEmpCap(idCap, idEmp);

                    Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];
                    ControlUtils.abrirFormEnPanel(pnlContent, new DetCapacitaciones(idCap));
                    Close();
                }
                else
                {
                    MessageBox.Show("Ese empleado ya se encuentra asignado a esta capacitacion");
                }
            }
        }
Exemplo n.º 4
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetVacantes(codVac));
            Close();
        }
Exemplo n.º 5
0
        private void btnAddAplicante_Click(object sender, EventArgs e)
        {
            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new AddAplicante(idVac, codVac));
            Close();
        }
Exemplo n.º 6
0
        private void btnAgregarCapacitacion_Click(object sender, EventArgs e)
        {
            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new AddCapacitaciones());
            Close();
        }
Exemplo n.º 7
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            int    idAplicante;
            string fechaEvaluacion, horaEvaluacion;

            fechaEvaluacion = dtpFechaEval.Value.ToShortDateString();
            horaEvaluacion  = dtpHoraEval.Value.ToShortTimeString();

            if (string.IsNullOrEmpty(cmbAplicantes.Text))
            {
                MessageBox.Show("Asegurese de llenar los campos");
            }
            else
            {
                idAplicante = int.Parse(cmbAplicantes.SelectedValue.ToString());

                if (evaluaciones.validateEvApl(idEval, idAplicante))
                {
                    evaluaciones.asignAplEval(idEval, idAplicante, fechaEvaluacion, horaEvaluacion);

                    Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];
                    ControlUtils.abrirFormEnPanel(pnlContent, new DetEvaluacion(idEval));
                    Close();
                }
                else
                {
                    MessageBox.Show("Ese aplicante ya se encuentra asignado a esta evaluacion");
                }
            }
        }
Exemplo n.º 8
0
        private void btnAgregarRequisito_Click(object sender, EventArgs e)
        {
            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new AddRequisitoFromDetails(codVac));
            Close();
        }
Exemplo n.º 9
0
        private void btnCancelar_Click(object sender, EventArgs e)
        {
            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetCapacitaciones(idCap));
            Close();
        }
Exemplo n.º 10
0
        private void btnCancelarVacante_Click(object sender, EventArgs e)
        {
            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetEvaluacion(idEval));
            Close();
        }
Exemplo n.º 11
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            int idPrior;

            requisito = txtRequisito.Text;
            detalles  = txtDetalles.Text;

            switch (cmbPrioridad.Text)
            {
            case "Alta":
                idPrior = 1;
                break;

            case "Media":
                idPrior = 2;
                break;

            case "Baja":
                idPrior = 3;
                break;

            default:
                idPrior = 0;
                break;
            }

            oVacantesBLL.updateRequisito(idReq, requisito, detalles, idPrior);

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetRequisito(idReq));
            Close();
        }
Exemplo n.º 12
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new Evaluaciones());
            Close();
        }
Exemplo n.º 13
0
        private void btnAsignarAplicantes_Click(object sender, EventArgs e)
        {
            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new AddAsignEvaluacion(idEval));
            Close();
        }
Exemplo n.º 14
0
        private void btnCancelar_Click(object sender, EventArgs e)
        {
            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new Empleados());
            Close();
        }
Exemplo n.º 15
0
        private void btnVerTodasVacantes_Click(object sender, EventArgs e)
        {
            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new Vacantes());
            Close();
        }
Exemplo n.º 16
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            string nombres, apellidos, correo, direccion, telefono, dui;
            int    idTipo;

            nombres   = txtNombres.Text;
            apellidos = txtApellidos.Text;
            correo    = txtEmail.Text;
            direccion = txtDireccion.Text;
            telefono  = txtTelefono.Text;
            dui       = txtDui.Text;
            idTipo    = int.Parse(cmbTipo.SelectedValue.ToString());

            if (string.IsNullOrEmpty(nombres))
            {
                emptyFields = true;
            }
            else if (string.IsNullOrEmpty(apellidos))
            {
                emptyFields = true;
            }
            else if (string.IsNullOrEmpty(correo))
            {
                emptyFields = true;
            }
            else if (string.IsNullOrEmpty(direccion))
            {
                emptyFields = true;
            }
            else if (string.IsNullOrEmpty(telefono))
            {
                emptyFields = true;
            }
            else
            {
                emptyFields = false;
            }

            if (emptyFields)
            {
                MessageBox.Show("Debe llenar todos los campos");
            }
            else
            {
                if (vacantes.uniqueAplDui(dui))
                {
                    vacantes.insertAplicante(idVac, nombres, apellidos, correo, telefono, direccion, idTipo, dui);

                    Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];
                    ControlUtils.abrirFormEnPanel(pnlContent, new DetVacantes(codVac));
                    Close();
                }
                else
                {
                    MessageBox.Show("Ese DUI ya esta registrado");
                }
            }
        }
Exemplo n.º 17
0
        private void dgvVacantes_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string codVac = dgvVacantes.Rows[e.RowIndex].Cells[1].Value.ToString();

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetVacantes(codVac));
            Close();
        }
Exemplo n.º 18
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            capacitaciones.deleteCapacitacion(idCap);

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new Capacitaciones());
            Close();
        }
Exemplo n.º 19
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            oVacantesBLL.deleteRequisito(idReq);

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetVacantes(codVac));
            Close();
        }
Exemplo n.º 20
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            empleados.deleteEmpleado(idEmp);

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new Empleados());
            Close();
        }
Exemplo n.º 21
0
        private void dgvCapacitaciones_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int idCap = int.Parse(dgvCapacitaciones.Rows[e.RowIndex].Cells[0].Value.ToString());

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetCapacitaciones(idCap));
            Close();
        }
Exemplo n.º 22
0
        private void dgvReq_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int idReq = int.Parse(dgvReq.Rows[e.RowIndex].Cells[0].Value.ToString());

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetRequisito(idReq));
            Close();
        }
Exemplo n.º 23
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            evaluaciones.deleteAsignEval(idAsign);

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetEvaluacion(idEval));
            Close();
        }
Exemplo n.º 24
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            capacitaciones.deleteAsignCap(idAsign);

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetCapacitaciones(idCap));
            Close();
        }
Exemplo n.º 25
0
        private void btnCancelarVacante_Click(object sender, EventArgs e)
        {
            // Borrar vacante y sus requisitos y volver al listado de vacantes
            oVacantesBLL.deleteVacante(codeVac);

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new Vacantes());
            Close();
        }
Exemplo n.º 26
0
        private void btnGuardarVacante_Click(object sender, EventArgs e)
        {
            string vacante, departamento, descripcion, codVac, abvDpto;
            int    cupo, idDepartamento, corrVac, idVac;

            if (string.IsNullOrEmpty(txtVacante.Text))
            {
                emptyFields = true;
            }
            else if (string.IsNullOrEmpty(cmbDepartamento.Text))
            {
                emptyFields = true;
            }
            else if (string.IsNullOrEmpty(txtDescripcion.Text))
            {
                emptyFields = true;
            }
            else if (string.IsNullOrEmpty(txtCupo.Text))
            {
                emptyFields = true;
            }
            else
            {
                emptyFields = false;
            }

            if (emptyFields)
            {
                MessageBox.Show("Debe llenar los campos");
            }
            else
            {
                vacante      = txtVacante.Text;
                departamento = cmbDepartamento.Text;
                descripcion  = txtDescripcion.Text;
                cupo         = decimal.ToInt32(txtCupo.Value);

                idDepartamento = oDepartamentosBLL.getDptoID(departamento);
                abvDpto        = oDepartamentosBLL.getDptoAbv(idDepartamento);
                corrVac        = oVacantesBLL.getCorrVac(idDepartamento);
                codVac         = oVacantesBLL.setVacCode(abvDpto, corrVac);

                oVacantesBLL.insertVacante(codVac, vacante, idDepartamento, cupo, descripcion);

                idVac = oVacantesBLL.getIdVac(codVac);
                string newCodVac = codVac + idVac;

                oVacantesBLL.updateVacante(codVac, newCodVac, vacante, descripcion, idDepartamento, 3, cupo);

                Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];
                ControlUtils.abrirFormEnPanel(pnlContent, new AddRequisitos(newCodVac));
                Close();
            }
        }
Exemplo n.º 27
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            string  newDui = txtDUI.Text;
            Boolean sameDUI, duiGo;

            if (newDui.Equals(dui))
            {
                sameDUI = true;
                duiGo   = true;
            }
            else
            {
                sameDUI = false;
                duiGo   = false;
            }

            if (!sameDUI)
            {
                if (vacantes.uniqueAplDui(newDui))
                {
                    duiGo = true;
                }
                else
                {
                    duiGo = false;
                }
            }

            if (duiGo)
            {
                nombres          = txtNombres.Text;
                apellidos        = txtApellidos.Text;
                correo           = txtEmail.Text;
                direcion         = txtDireccion.Text;
                telefono1        = txtTelefono1.Text;
                telefono2        = txtTelefono2.Text;
                idEstadoContrato = int.Parse(cmbEstadoContrato.SelectedValue.ToString());
                idPuesto         = int.Parse(cmbPuesto.SelectedValue.ToString());
                idDepartamento   = int.Parse(cmbDepartamento.SelectedValue.ToString());
                salarioNumber    = double.Parse(txtSalario.Value.ToString());

                empleados.updateEmpleado(nombres, apellidos, newDui, correo, telefono1,
                                         telefono2, direcion, idDepartamento, idPuesto, salarioNumber, idEstadoContrato, idEmp);

                Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];
                ControlUtils.abrirFormEnPanel(pnlContent, new DetEmpleado(idEmp));
                Close();
            }
            else
            {
                MessageBox.Show("El DUI que ha ingresado ya se encuentra registrado");
            }
        }
Exemplo n.º 28
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtReq.Text))
            {
                emptyFields = true;
            }
            else if (string.IsNullOrEmpty(txtDetReq.Text))
            {
                emptyFields = true;
            }
            else
            {
                emptyFields = false;
            }

            if (emptyFields)
            {
                MessageBox.Show("Debe llenar los campos");
            }
            else
            {
                // Guardar requisito y regresar a detalles de la vacante
                int    idVac = oVacantesBLL.getIdVac(codVac);
                string req   = txtReq.Text;
                string det   = txtDetReq.Text;
                int    idPrior;

                switch (cmbReq.Text)
                {
                case "Alta":
                    idPrior = 1;
                    break;

                case "Media":
                    idPrior = 2;
                    break;

                case "Baja":
                    idPrior = 3;
                    break;

                default:
                    idPrior = 0;
                    break;
                }

                oVacantesBLL.insertRequisito(idVac, codVac, req, det, idPrior);

                Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];
                ControlUtils.abrirFormEnPanel(pnlContent, new DetVacantes(codVac));
                Close();
            }
        }
Exemplo n.º 29
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            string  newDui = txtDUI.Text;
            int     idResultado, idTipo;
            Boolean sameDUI, duiGo;

            if (newDui.Equals(dui))
            {
                sameDUI = true;
                duiGo   = true;
            }
            else
            {
                sameDUI = false;
                duiGo   = false;
            }

            if (!sameDUI)
            {
                if (vacantes.uniqueAplDui(newDui))
                {
                    duiGo = true;
                }
                else
                {
                    duiGo = false;
                }
            }

            if (duiGo)
            {
                nombres     = txtNombres.Text;
                apellidos   = txtApellidos.Text;
                correo      = txtCorreo.Text;
                telefono    = txtTelefono.Text;
                direccion   = txtDireccion.Text;
                idResultado = int.Parse(cmbResultado.SelectedValue.ToString());
                idTipo      = int.Parse(cmbTipo.SelectedValue.ToString());

                vacantes.updateAplicante(idApl, nombres, apellidos, newDui, correo, direccion, telefono, idTipo, idResultado);

                Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];
                ControlUtils.abrirFormEnPanel(pnlContent, new DetAplicantes(idApl, codVac));
                Close();
            }
            else
            {
                MessageBox.Show("El DUI que ha ingresado ya se encuentra registrado");
            }
        }
Exemplo n.º 30
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            evaluacion     = txtEvaluacion.Text;
            idTipo         = int.Parse(cmbTipoEval.SelectedValue.ToString());
            maxScoreNumber = int.Parse(txtMaxScore.Value.ToString());
            objetivo       = txtObjetivo.Text;

            evaluaciones.updateEvaluacion(idEval, evaluacion, objetivo, idTipo, maxScoreNumber);

            Control pnlContent = ParentForm.Controls.Find("pnlContent", true)[0];

            ControlUtils.abrirFormEnPanel(pnlContent, new DetEvaluacion(idEval));
            Close();
        }