Exemple #1
0
        private void dtgEmpleados_DoubleClick(object sender, EventArgs e)
        {
            UsuarioEdicion f = new UsuarioEdicion();

            f.txtIDEmpleado.Text = dtgEmpleados.CurrentRow.Cells["IDEmpleado"].Value.ToString();
            f.txtEmpleado.Text   = dtgEmpleados.CurrentRow.Cells["Nombres"].Value.ToString() + " " + dtgEmpleados.CurrentRow.Cells["Apellidos"].Value.ToString();
            this.Hide();
        }
Exemple #2
0
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     try
     {
         UsuarioEdicion f = new UsuarioEdicion();
         f.ShowDialog();
         Cargar();
     }
     catch
     {
     }
 }
Exemple #3
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     try
     {
         if (MessageBox.Show("¿Realmente desea EDITAR el registro seleccionado?", "Pregunta", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             UsuarioEdicion f = new UsuarioEdicion();
             f.txtIDUsuario.Text  = dtgUsuarios.CurrentRow.Cells["IDUsuario"].Value.ToString();
             f.txtUsuario.Text    = dtgUsuarios.CurrentRow.Cells["Usuario"].Value.ToString();
             f.txtIDEmpleado.Text = dtgUsuarios.CurrentRow.Cells["IDEmpleado"].Value.ToString();
             f.txtEmpleado.Text   = dtgUsuarios.CurrentRow.Cells["Empleado"].Value.ToString();
             f.txtClave.Text      = dtgUsuarios.CurrentRow.Cells["Clave"].Value.ToString();
             //f.cbbRoles.SelectedIndex = dtgUsuarios.CurrentRow.Cells["IDRol"].Value.ToString();
             f.ShowDialog();
             Cargar();
         }
     }
     catch
     {
     }
 }