private void btnEditar_Click(object sender, EventArgs e)
 {
     try
     {
         if (oSesion.ComprobarPermiso(4))
         {
             if (MessageBox.Show("¿Realmente desea EDITAR el registro seleccionado?", "Pregunta", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 EmpleadosEdicion f = new EmpleadosEdicion();
                 f.txbIDEmpleado.Text      = dtgEmpleados.CurrentRow.Cells["IDEmpleado"].Value.ToString();
                 f.txbNombres.Text         = dtgEmpleados.CurrentRow.Cells["Nombres"].Value.ToString();
                 f.txbApellidos.Text       = dtgEmpleados.CurrentRow.Cells["Apellidos"].Value.ToString();
                 f.dtpFechaNacimiento.Text = dtgEmpleados.CurrentRow.Cells["FechaNacimiento"].Value.ToString();
                 f.cbbSexo.Text            = dtgEmpleados.CurrentRow.Cells["Sexo"].Value.ToString();
                 f.txbTelefono.Text        = dtgEmpleados.CurrentRow.Cells["Telefono"].Value.ToString();
                 f.txbDui.Text             = dtgEmpleados.CurrentRow.Cells["DUI"].Value.ToString();
                 f.txbNit.Text             = dtgEmpleados.CurrentRow.Cells["NIT"].Value.ToString();
                 f.txbTitulo.Text          = dtgEmpleados.CurrentRow.Cells["Titulo"].Value.ToString();
                 f.ShowDialog();
                 Cargar();
             }
         }
     }
     catch
     {
     }
 }
示例#2
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     try
     {
         if (MessageBox.Show("¿Realmente desea editar el registro seleccionado?", "Aviso", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             EmpleadosEdicion f = new EmpleadosEdicion();
             f.btnSiguiente.Visible = false;
             f.btnCancelar2.Visible = false;
             // sincronizar
             f.txtIDEmpleado.Text = dtgDatos.CurrentRow.Cells["IDEmpleado"].Value.ToString();
             f.txtNombres.Text    = dtgDatos.CurrentRow.Cells["Nombre"].Value.ToString();
             f.txtApellidos.Text  = dtgDatos.CurrentRow.Cells["Apellidos"].Value.ToString();
             f.txtDUI.Text        = dtgDatos.CurrentRow.Cells["DUI"].Value.ToString();
             f.txtNIT.Text        = dtgDatos.CurrentRow.Cells["NIT"].Value.ToString();
             f.txtDireccion.Text  = dtgDatos.CurrentRow.Cells["Direccion"].Value.ToString();
             f.txtTelefono.Text   = dtgDatos.CurrentRow.Cells["Telefono"].Value.ToString();
             f.cbbGenero.Text     = dtgDatos.CurrentRow.Cells["Genero"].Value.ToString();
             f.dtpFechaNac.Text   = dtgDatos.CurrentRow.Cells["FechaNac"].Value.ToString();
             f.ShowDialog();
             Cargar();
         }
     }
     catch
     {
     }
 }
示例#3
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            EmpleadosEdicion f = new EmpleadosEdicion();

            f.btnAceptaar.Visible  = false;
            f.btnCancelar.Visible  = false;
            f.btnCancelar2.Visible = true;
            f.ShowDialog();
            Cargar();
        }
示例#4
0
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     try
     {
         EmpleadosEdicion f = new EmpleadosEdicion();
         f.ShowDialog();
         Cargar();
     }
     catch
     {
     }
 }
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     try
     {
         if (oSesion.ComprobarPermiso(4))
         {
             EmpleadosEdicion f = new EmpleadosEdicion();
             f.ShowDialog();
             Cargar();
         }
     }
     catch
     {
     }
 }
示例#6
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)
         {
             EmpleadosEdicion f = new EmpleadosEdicion();
             f.txtIDEmpleado.Text      = dtgEmpleados.CurrentRow.Cells["IDEmpleado"].Value.ToString();
             f.txtNombres.Text         = dtgEmpleados.CurrentRow.Cells["Nombres"].Value.ToString();
             f.txtApellidos.Text       = dtgEmpleados.CurrentRow.Cells["Apellidos"].Value.ToString();
             f.dtpFechaNacimiento.Text = dtgEmpleados.CurrentRow.Cells["FechaNacimiento"].Value.ToString();
             f.ShowDialog();
             Cargar();
         }
     }
     catch
     {
     }
 }