コード例 #1
0
        private void newButton_Click(object sender, EventArgs e)
        {          
            if (null == newSupplierForm || newSupplierForm.IsDisposed)
                    newSupplierForm = new dataSupplierDetailForm(globalConstants.NEW_SUPPLIER);

            newSupplierForm.Show();
            newSupplierForm.WindowState = FormWindowState.Normal;
        }
コード例 #2
0
        private void dataSupplierDataGridView_KeyDown(object sender, KeyEventArgs e)
        {
            if (dataSupplierDataGridView.Rows.Count <= 0)
                return;

            if (e.KeyCode == Keys.Enter)
            {
                int selectedrowindex = dataSupplierDataGridView.SelectedCells[0].RowIndex;

                DataGridViewRow selectedRow = dataSupplierDataGridView.Rows[selectedrowindex];
                selectedSupplierID = Convert.ToInt32(selectedRow.Cells["SUPPLIER_ID"].Value);

                if (originModuleID == globalConstants.PEMBAYARAN_HUTANG)
                {
                    if (null == pembayaranHutangForm || pembayaranHutangForm.IsDisposed)
                            pembayaranHutangForm = new pembayaranLumpSumForm(originModuleID, selectedSupplierID);

                    pembayaranHutangForm.Show();
                    pembayaranHutangForm.WindowState = FormWindowState.Normal;
                }
                else
                {
                    if (null == editSupplierForm || editSupplierForm.IsDisposed)
                            editSupplierForm = new dataSupplierDetailForm(globalConstants.EDIT_SUPPLIER, selectedSupplierID);

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