private void dgvAvisosEstoque_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (e.RowIndex >= 0) { var codigo = dgvAvisosEstoque.CurrentRow.Cells["Código"].Value.ToString(); if (codigo != null) { var formAlertEstoque = new frmGerenciarEstoque(); GerenciarGerenciamentoDeEstoque.FecharForm(formAlertEstoque); Estoque.CodigoEstoque = codigo; OpenMdiForm.LoadNewKeepAnother(ContainerContext.Context, formAlertEstoque); } } } catch (Exception erro) { SaveErroInTxt.RecordInTxt(erro, this.GetType().Name); throw; } }