コード例 #1
0
        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:
                if (null == editSatuanDetailForm || editSatuanDetailForm.IsDisposed)
                {
                    editSatuanDetailForm = new dataSatuanDetailForm(globalConstants.EDIT_UNIT, selectedUnitID);
                }

                editSatuanDetailForm.Show();
                editSatuanDetailForm.WindowState = FormWindowState.Normal;
                break;
            }
        }
コード例 #2
0
        private void newButton_Click(object sender, EventArgs e)
        {
            if (null == displaySatuanDetailForm || displaySatuanDetailForm.IsDisposed)
            {
                displaySatuanDetailForm = new dataSatuanDetailForm(globalConstants.NEW_UNIT);
            }

            displaySatuanDetailForm.Show();
            displaySatuanDetailForm.WindowState = FormWindowState.Normal;
        }