private void cmdAdd_Click(object sender, EventArgs e) { Master.frmRoleApplicationUpdate ifrmChild = new Master.frmRoleApplicationUpdate(this); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); }
private void cmdEdit_Click(object sender, EventArgs e) { if (dataGridView1.SelectedCells.Count > 0) { string roleID = dataGridView1.SelectedCells[0].OwningRow.Cells["RoleID"].Value.ToString(); Master.frmRoleApplicationUpdate ifrmChild = new Master.frmRoleApplicationUpdate(this, roleID); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } else { MessageBox.Show(Messages.Error.RowNotSelected); } }