Пример #1
0
        private void btneliminar_Click(object sender, EventArgs e)
        {
            Operaciones op  = new Operaciones();
            frmEmpleado emp = new frmEmpleado();

            if (MessageBox.Show("SEGURO QUE DESEA ELIMINAR ESTE REGISTRO?", "ELIMINAR ", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)

            {
                op.ConsultasSinResultados("DELETE FROM empleados WHERE idempleado = '" + txtid.Text + "'");
            }
        }
Пример #2
0
        private void dgvempleado_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            frmEmpleado emp = new frmEmpleado();
            DataGridViewRow rellenar = dgvempleado.Rows[e.RowIndex];
            emp.txtsueldo.Text = rellenar.Cells["sueldoempleado"].Value.ToString();
            emp.cmbcargo.Text = rellenar.Cells["idcargo"].Value.ToString();
            emp.cmbdepartamento.Text = rellenar.Cells["iddepartmento"].Value.ToString();
            emp.cmbestado.Text = rellenar.Cells["idestado"].Value.ToString();
            emp.txtdescriccion.Text = rellenar.Cells["descriempleado"].Value.ToString();
            emp.txtnombre.Text= rellenar.Cells["nombreempleado"].Value.ToString();
            emp.txtapellido.Text = rellenar.Cells["apellidoempleado"].Value.ToString();
            emp.txtcedula.Text = rellenar.Cells["cedulaempleado"].Value.ToString();
            emp.txttelefono.Text = rellenar.Cells["telefonoempleado"].Value.ToString();
            emp.cmbsexo.Text = rellenar.Cells["sexoempleado"].Value.ToString();
            emp.txtdireccion.Text = rellenar.Cells["direccionempleado"].Value.ToString();
            emp.txtfechanacimiento.Text = rellenar.Cells["fechanacimiento"].Value.ToString();
            emp.txtfechaingreso.Text = rellenar.Cells["fechaingreso"].Value.ToString();
            emp.txtid.Text = rellenar.Cells["idempleado"].Value.ToString();

            emp.Show();
        }
Пример #3
0
        private void btncrear_Click(object sender, EventArgs e)
        {
            frmEmpleado em = new frmEmpleado();

            em.Show();
        }
Пример #4
0
        private void crearEmpleadoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form crear = new frmEmpleado();

            crear.Show();
        }