private void cmdAdd_Click(object sender, EventArgs e) { Penjualan.frmNumeratorUpdate ifrmChild = new Penjualan.frmNumeratorUpdate(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 doc = dataGridView1.SelectedCells[0].OwningRow.Cells["Doc"].Value.ToString(); Penjualan.frmNumeratorUpdate ifrmChild = new Penjualan.frmNumeratorUpdate(this, doc); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } else { MessageBox.Show(Messages.Error.RowNotSelected); } }