예제 #1
0
        private void toolModificar_Click(object sender, EventArgs e)
        {
            //int fila = 0;
            //fila = dgvInfonavit.CurrentCell.RowIndex;
            //frmModificacionInfonavit mi = new frmModificacionInfonavit();
            //mi.OnInfonavit += mi_OnInfonavit;
            //mi._idEmpleado = int.Parse(dgvInfonavit.Rows[fila].Cells[0].Value.ToString());
            //mi._nombreEmpleado = dgvInfonavit.Rows[fila].Cells[2].Value.ToString();
            //mi._activo = dgvInfonavit.Rows[fila].Cells[7].Value.ToString();
            //mi.MdiParent = this.MdiParent;
            //mi.Show();

            int fila = 0;
            fila = dgvInfonavit.CurrentCell.RowIndex;
            frmInfonavit i = new frmInfonavit();
            i._tipoOperacion = GLOBALES.MODIFICAR;
            i.OnNuevoInfonavit += i_OnNuevoInfonavit;
            i._idEmpleado = int.Parse(dgvInfonavit.Rows[fila].Cells[0].Value.ToString());
            i._nombreEmpleado = dgvInfonavit.Rows[fila].Cells[2].Value.ToString();
            i._estatusInfonavit = dgvInfonavit.Rows[fila].Cells[6].Value.ToString() == "ACTIVO" ? true : false;
            i._modificar = 1;
            i.MdiParent = this.MdiParent;
            i.Show();
        }
예제 #2
0
        private void Seleccion(int edicion)
        {
            int fila = 0;
            frmInfonavit i = new frmInfonavit();
            i.MdiParent = this.MdiParent;

            if (edicion != GLOBALES.NUEVO)
            {
                fila = dgvInfonavit.CurrentCell.RowIndex;
                i._idEmpleado = int.Parse(dgvInfonavit.Rows[fila].Cells[0].Value.ToString());
                i._nombreEmpleado = dgvInfonavit.Rows[fila].Cells[2].Value.ToString();
                i._estatusInfonavit = dgvInfonavit.Rows[fila].Cells[6].Value.ToString() == "ACTIVO" ? true : false;
            }

            i.OnNuevoInfonavit += i_OnNuevoInfonavit;
            i._modificar = 0;
            i._tipoOperacion = edicion;
            i.Show();
        }