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