private void MnuAmigo_Click(object sender, EventArgs e) { TelaCadastroAmigo oFrm = new TelaCadastroAmigo(); oFrm.MdiParent = this; oFrm.Show(); MnuAmigo.Enabled = false; }
private void GrdAmigos_CellClick(object sender, DataGridViewCellEventArgs e) { AMIGO oAmigo = ((AMIGO)GrdAmigos.Rows[e.RowIndex].DataBoundItem); if (GrdAmigos.Rows[e.RowIndex].DataBoundItem != null) { if (GrdAmigos.Columns[e.ColumnIndex].Name == "BtnEscolher") { TelaCadastroAmigo frmAmigo = new TelaCadastroAmigo(oAmigo); frmAmigo.MdiParent = this.MdiParent; frmAmigo.Show(); this.Close(); } } }