private void displaySpecificForm() { int selectedrowindex = dataUnitGridView.SelectedCells[0].RowIndex; DataGridViewRow selectedRow = dataUnitGridView.Rows[selectedrowindex]; selectedUnitID = Convert.ToInt32(selectedRow.Cells["UNIT_ID"].Value); switch (originModuleID) { case globalConstants.PRODUK_DETAIL_FORM: parentForm.setSelectedUnitID(selectedUnitID); this.Close(); break; default: dataSatuanDetailForm displayedForm = new dataSatuanDetailForm(globalConstants.EDIT_UNIT, selectedUnitID); displayedForm.ShowDialog(this); break; } }
private void newButton_Click(object sender, EventArgs e) { dataSatuanDetailForm displayedForm = new dataSatuanDetailForm(globalConstants.NEW_UNIT); displayedForm.ShowDialog(this); }