private void cmdADD_Click(object sender, EventArgs e) { Master.frmJnsTransaksiUpdate ifrmChild = new Master.frmJnsTransaksiUpdate(this); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); }
private void cmdEDIT_Click(object sender, EventArgs e) { if (dataGridView1.SelectedCells.Count > 0) { Guid rowID = (Guid)dataGridView1.SelectedCells[0].OwningRow.Cells["RowID"].Value; Master.frmJnsTransaksiUpdate ifrmChild = new Master.frmJnsTransaksiUpdate(this, rowID); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } else { MessageBox.Show(Messages.Error.RowNotSelected); } }