private void MantenimientoEmpleado_Load(object sender, EventArgs e)
        {
            T_NoCuenta.Text = "0";
            T_Salario.Text  = "0";
            try
            {
                DataSet ds = ProDepartamento.VistaDePuestos();
                dt = ds.Tables[0];
                C_Puesto.DisplayMember = "Posicion";
                C_Puesto.ValueMember   = "Id";
                C_Puesto.DataSource    = dt;
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message + error.StackTrace);
            }

            G_Busqueda.Show();
            G_Empleado.Hide();
            try
            {
                DataSet ds = PEmpleados.Vista();
                dt = ds.Tables[0];
                dataGridView1.DataSource = dt;
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message + error.StackTrace);
            }
        }
        private void B_Editar_Click(object sender, EventArgs e)
        {
            if (dataGridView1.CurrentRow != null)
            {
                //Txt_ID.Text = dgvProductos.CurrentRow.Cells["Id"].Value.ToString();
                // lbl_id.Text= dataGridView1.CurrentRow.Cells["Id"].Value.ToString();
                T_Nombre.Text   = dataGridView1.CurrentRow.Cells["Nombre"].Value.ToString();
                T_Apellido.Text = dataGridView1.CurrentRow.Cells["Apellido"].Value.ToString();
                T_Cedula.Text   = dataGridView1.CurrentRow.Cells["Cedula"].Value.ToString();

                T_Direccion.Text   = dataGridView1.CurrentRow.Cells["Direccion"].Value.ToString();
                T_Telefono.Text    = dataGridView1.CurrentRow.Cells["Telefono"].Value.ToString();
                T_Correo.Text      = dataGridView1.CurrentRow.Cells["Email"].Value.ToString();
                T_EstadoCivil.Text = dataGridView1.CurrentRow.Cells["Estado_Civil"].Value.ToString();

                T_Salario.Text  = dataGridView1.CurrentRow.Cells["Salario"].Value.ToString();
                T_NoCuenta.Text = dataGridView1.CurrentRow.Cells["NoCuenta"].Value.ToString();
                T_Status.Text   = dataGridView1.CurrentRow.Cells["Estado"].Value.ToString();
                //  C_Puesto.Text = dataGridView1.CurrentRow.Cells["Departamento"].Value.ToString();


                G_Busqueda.Hide();
                G_Empleado.Show();
            }
        }
 private void BusquedaEmpleado_Click(object sender, EventArgs e)
 {
     G_Busqueda.Show();
     G_Empleado.Hide();
     try
     {
         DataSet ds = PEmpleados.Vista();
         dt = ds.Tables[0];
         dataGridView1.DataSource = dt;
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message + error.StackTrace);
     }
 }
        private void Empleados_Click(object sender, EventArgs e)
        {
            G_Busqueda.Hide();
            G_Empleado.Show();

            try
            {
                DataSet ds = ProDepartamento.VistaDePuestos();
                dt = ds.Tables[0];
                C_Puesto.DisplayMember = "Posicion";
                C_Puesto.ValueMember   = "Id";
                C_Puesto.DataSource    = dt;
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message + error.StackTrace);
            }
        }