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;
            }
        }
        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;
        }
Example #3
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:
                dataSatuanDetailForm displayedForm = new dataSatuanDetailForm(globalConstants.EDIT_UNIT, selectedUnitID);
                displayedForm.ShowDialog(this);
                break;
            }
        }
Example #4
0
        private void newButton_Click(object sender, EventArgs e)
        {
            dataSatuanDetailForm displayedForm = new dataSatuanDetailForm(globalConstants.NEW_UNIT);

            displayedForm.ShowDialog(this);
        }