예제 #1
0
        private void dataSupplierDataGridView_DoubleClick(object sender, EventArgs e)
        {
            if (dataSupplierDataGridView.Rows.Count <= 0)
            {
                return;
            }

            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;
            }
        }
예제 #2
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;
        }