private void btnCadastrar_Click(object sender, EventArgs e) { frmCadTarefas Cad = new frmCadTarefas(codproj); Cad.MdiParent = Application.OpenForms.OfType <MDIddsw>().FirstOrDefault(); Cad.Show(); }
private void dttarefas_CellClick(object sender, DataGridViewCellEventArgs e) { DataGridViewRow row = dtgtarefas.CurrentRow; if (row != null) { int cod = Convert.ToInt32(dtgtarefas.CurrentRow.Cells[0].Value); if (cod != 0) { frmCadTarefas Cad = new frmCadTarefas(codproj, cod); Cad.MdiParent = Application.OpenForms.OfType <MDIddsw>().FirstOrDefault(); Cad.Show(); } } }