private void displaySpecificForm(string noInvoice, string revNo = "", string doID = "")
        {
            int    salesActiveStatus = 0;
            string dialogMessage     = "";

            switch (originModuleID)
            {
            case globalConstants.SALES_QUOTATION:
                cashierForm displayedForm = new cashierForm(globalConstants.EDIT_SALES_QUOTATION, noInvoice);
                displayedForm.ShowDialog(this);
                break;

            case globalConstants.SALES_ORDER_REVISION:
                cashierForm cashierFormDisplay = new cashierForm(noInvoice, revNo);
                cashierFormDisplay.ShowDialog(this);
                break;

            case globalConstants.DELIVERY_ORDER:
                //salesActiveStatus = Convert.ToInt32(DS.getDataSingleValue("SELECT SALES_ACTIVE FROM SALES_HEADER WHERE SALES_INVOICE = '" + noInvoice + "' AND REV_NO = '" + revNo + "'"));
                //if (salesActiveStatus == 1)
                //{
                //    dialogMessage = "TERBITKAN DELIVERY ORDER ?";
                //}
                //else
                //{
                //    dialogMessage = "TERBITKAN COPY DELIVERY ORDER ?";
                //}

                //if (DialogResult.Yes == MessageBox.Show(dialogMessage, "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
                //{
                //// UPDATE SALES HEADER SET TO NON ACTIVE AND REDUCE STOCK
                //if (processSalesOrderToDO(noInvoice, revNo, salesActiveStatus))
                //    printOutDeliveryOrder(noInvoice, revNo, salesActiveStatus);
                //if (salesActiveStatus == 1)
                //{
                deliveryOrderForm DOForm = new deliveryOrderForm(noInvoice, revNo);
                DOForm.ShowDialog(this);
                //}
                //else
                //{
                //    printOutDeliveryOrder(noInvoice, revNo);
                //}
                //}
                break;

            case globalConstants.COPY_DELIVERY_ORDER:
                dialogMessage = "TERBITKAN COPY DELIVERY ORDER ?";
                if (DialogResult.Yes == MessageBox.Show(dialogMessage, "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
                {
                    printOutDeliveryOrder(noInvoice, revNo, doID);
                }
                break;

            case globalConstants.PRE_ORDER_SALES:
                cashierForm cashierFormDisplayPreOrder = new cashierForm(noInvoice, revNo, globalConstants.PRE_ORDER_SALES_REVISION);
                cashierFormDisplayPreOrder.ShowDialog(this);
                break;
            }

            loadInvoiceData();
        }
        private void displaySpecificForm(string noInvoice, int status = 0)
        {
            //int salesActiveStatus = 0;
            //string dialogMessage = "";
            switch (originModuleID)
            {
            //case globalConstants.SALES_QUOTATION:
            //    if (status == 0)
            //    {
            //        cashierForm displayedForm = new cashierForm(globalConstants.EDIT_SALES_QUOTATION, noInvoice);
            //        displayedForm.ShowDialog(this);
            //        displayedForm.Dispose();
            //    }
            //    break;

            //case globalConstants.SQ_TO_SO:
            //case globalConstants.COPY_NOTA_SQ:
            //    cashierForm displayedFormCashier = new cashierForm(originModuleID, noInvoice);
            //    displayedFormCashier.ShowDialog(this);
            //    displayedFormCashier.Dispose();
            //    break;

            case globalConstants.EDIT_SALES_ORDER:
            case globalConstants.SO_FULFILLMENT:
                cashierForm editCashierFormDisplay = new cashierForm(originModuleID, noInvoice);
                editCashierFormDisplay.ShowDialog(this);
                editCashierFormDisplay.Dispose();
                break;

            case globalConstants.COPY_NOTA:
                cashierForm cashierFormDisplay = new cashierForm(noInvoice);
                cashierFormDisplay.ShowDialog(this);
                cashierFormDisplay.Dispose();
                break;

            case globalConstants.CASHIER_MODULE:
                parentCashierForm.setReferenceSO(noInvoice);
                this.Close();
                break;

            case globalConstants.DELIVERY_ORDER:
                //int salesActiveStatus = 0;
                //string dialogMessage = "";

                //salesActiveStatus = Convert.ToInt32(DS.getDataSingleValue("SELECT SALES_ORDER_COMPLETED FROM SALES_HEADER WHERE SALES_INVOICE = '" + noInvoice + "'"));
                //if (salesActiveStatus == 0)
                //{
                //    dialogMessage = "TERBITKAN DELIVERY ORDER ?";
                //}
                //else
                //{
                //    dialogMessage = "TERBITKAN COPY DELIVERY ORDER ?";
                //}

                //if (DialogResult.Yes == MessageBox.Show(dialogMessage, "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
                //{
                //    // UPDATE SALES HEADER SET TO NON ACTIVE AND REDUCE STOCK
                //    if (processSalesOrderToDO(noInvoice, salesActiveStatus))
                //        printOutDeliveryOrder(noInvoice, salesActiveStatus);
                //}
                deliveryOrderForm displayDeliveryOrderForm = new deliveryOrderForm(noInvoice, status.ToString());
                displayDeliveryOrderForm.ShowDialog(this);
                break;
            }
        }