private void cmdAdd_Click(object sender, EventArgs e) { if (cmbKota.SelectedValue.ToString() == "") { return; } _Kota = cmbKota.SelectedValue.ToString(); Master.frmTargetKotaUpdate ifrmChild = new Master.frmTargetKotaUpdate(this, _Kota); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); }
private void commandButton2_Click(object sender, EventArgs e) { if (cgvTargetKota.SelectedCells.Count > 0) { Guid rowID = (Guid)cgvTargetKota.SelectedCells[0].OwningRow.Cells["ColRowID"].Value; _Kota = cmbKota.SelectedValue.ToString(); Master.frmTargetKotaUpdate ifrmChild = new Master.frmTargetKotaUpdate(this, rowID, _Kota); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } else { MessageBox.Show(Messages.Error.RowNotSelected); } }