Пример #1
0
 /// <summary>
 /// Function to call this form from frmPurchaseOrder to view and select the products.
 /// </summary>
 /// <param name="frmPurchaseOrder"></param>
 /// <param name="decIndex"></param>
 /// <param name="strProductCode"></param>
 public void CallFromPurchaseOrder(frmPurchaseOrder frmPurchaseOrder, decimal decIndex, string strProductCode)
 {
     try
     {
         decCurrentRowIndex = decIndex;
         base.Show();
         this.frmPurchaseOrderObj = frmPurchaseOrder;
         int inRowCount = dgvProductSearchPopup.Rows.Count;
         for (int i = 0; i < inRowCount; i++)
         {
             if (dgvProductSearchPopup.Rows[i].Cells["dgvtxtProductCode"].Value.ToString() == strProductCode)
             {
                 dgvProductSearchPopup.Rows[i].DefaultCellStyle.BackColor = Color.MediumSeaGreen;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PSP5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #2
0
 /// <summary>
 /// Calls corresponding voucher on cell double click in Datagridview
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvPurchaseOrderRegister_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.RowIndex > -1 && e.ColumnIndex > -1)
         {
             if (dgvPurchaseOrderRegister.CurrentRow != null)
             {
                 if (dgvPurchaseOrderRegister.Rows.Count > 0 && e.ColumnIndex > -1)
                 {
                     if (dgvPurchaseOrderRegister.CurrentRow.Cells["dgvtxtPurchaseOrderMasterId"].Value != null && dgvPurchaseOrderRegister.CurrentRow.Cells["dgvtxtPurchaseOrderMasterId"].Value != DBNull.Value)
                     {
                         frmPurchaseOrder.isEdit = true;
                         frmPurchaseOrder frmPurchaseOrderObj = new frmPurchaseOrder();
                         frmPurchaseOrderObj.MdiParent = formMDI.MDIObj;
                         frmPurchaseOrder open = Application.OpenForms["frmPurchaseOrder"] as frmPurchaseOrder;
                         if (open == null)
                         {
                             frmPurchaseOrderObj.WindowState = FormWindowState.Normal;
                             frmPurchaseOrderObj.MdiParent   = formMDI.MDIObj;//Edited by Najma
                             frmPurchaseOrderObj.CallFromPurchaseOrderRegister(this, Convert.ToDecimal(dgvPurchaseOrderRegister.CurrentRow.Cells["dgvtxtPurchaseOrderMasterId"].Value.ToString()), isPendingOrder);
                         }
                         else
                         {
                             open.CallFromPurchaseOrderRegister(this, Convert.ToDecimal(dgvPurchaseOrderRegister.CurrentRow.Cells["dgvtxtPurchaseOrderMasterId"].Value.ToString()), isPendingOrder);
                             if (open.WindowState == FormWindowState.Minimized)
                             {
                                 open.WindowState = FormWindowState.Normal;
                             }
                         }
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("POREG8:" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #3
0
        public void ShowPurchaseOrder()
        {
            statusBar.Visible      = true;
            statusBarMessage.Text  = "Loading...Please Wait";
            statusBarMessage.Width = 150;

            statusBar.Maximum     = 100;
            statusBar.Value       = 0;
            pnlPleaseWait.Visible = true;
            pnlPleaseWait.Refresh();
            pnlPleaseWait.Update();
            statusBar.Value = 50;
            frmPurchaseOrder frm = new frmPurchaseOrder();

            frm.MdiParent   = this;
            statusBar.Value = 75;
            frm.Show();
            pnlPleaseWait.Visible = false;
            statusBar.Value       = 100;
            statusBar.Value       = 0;
            statusBar.Visible     = false;
            statusBarMessage.Text = "";
        }
Пример #4
0
        /// <summary>
        /// Opens the corresponding Vouchers based on voucher type on Go button click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnGo_Click(object sender, EventArgs e)
        {
            try
            {
                if (cmbVoucherType.SelectedIndex != -1)
                {
                    switch (VoucherType)
                    {
                    case "Monthly Salary Voucher":
                        decimal decVoucherTypeId     = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string  strVoucherTypeName   = cmbVoucherType.Text;
                        frmMonthlySalaryVoucher frm  = new frmMonthlySalaryVoucher();
                        frmMonthlySalaryVoucher open = Application.OpenForms["frmMonthlySalaryVoucher"] as frmMonthlySalaryVoucher;
                        if (open == null)
                        {
                            frm.MdiParent = this.MdiParent;
                            frm.CallFromVoucherTypeSelection(decVoucherTypeId, strVoucherTypeName);
                        }
                        else
                        {
                            open.CallFromVoucherTypeSelection(decVoucherTypeId, strVoucherTypeName);
                        }

                        this.Close();
                        break;

                    case "Advance Payment":
                        decimal decVoucherTypeNo    = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string  strVoucherTypeNames = cmbVoucherType.Text;

                        frmAdvancePayment abc   = new frmAdvancePayment();
                        frmAdvancePayment opens = Application.OpenForms["frmAdvancePayment"] as frmAdvancePayment;
                        if (opens == null)
                        {
                            abc.MdiParent = this.MdiParent;
                            abc.CallFromVoucherTypeSelection(decVoucherTypeNo, strVoucherTypeNames);
                        }
                        else
                        {
                            opens.CallFromVoucherTypeSelection(decVoucherTypeNo, strVoucherTypeNames);
                        }



                        this.Close();
                        break;

                    case "Daily Salary Voucher":
                        decimal decDailyVoucherTypeId         = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string  strDailySalaryVoucherTypeName = cmbVoucherType.Text.ToString();
                        frmDailySalaryVoucher frmobj          = new frmDailySalaryVoucher();
                        frmDailySalaryVoucher DailyOpen       = Application.OpenForms["frmDailySalaryVoucher"] as frmDailySalaryVoucher;
                        if (DailyOpen == null)
                        {
                            frmobj.MdiParent = this.MdiParent;
                            frmobj.CallFromVoucherTypeSelection(decDailyVoucherTypeId, strDailySalaryVoucherTypeName);
                        }
                        else
                        {
                            DailyOpen.CallFromVoucherTypeSelection(decDailyVoucherTypeId, strDailySalaryVoucherTypeName);
                        }

                        this.Close();
                        break;

                    case "Payment Voucher":
                        decimal           decPaymentVoucherTypeId = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
                        string            strVoucherTypeNames2    = cmbVoucherType.Text.ToString();
                        frmPaymentVoucher frmPaymentObj           = new frmPaymentVoucher();
                        frmPaymentVoucher PaymentOpen             = Application.OpenForms["frmPaymentVoucher"] as frmPaymentVoucher;
                        if (PaymentOpen == null)
                        {
                            frmPaymentObj.MdiParent = this.MdiParent;
                            frmPaymentObj.CallFromVoucherTypeSelection(decPaymentVoucherTypeId, strVoucherTypeNames2);
                        }
                        else
                        {
                            PaymentOpen.CallFromVoucherTypeSelection(decPaymentVoucherTypeId, strVoucherTypeNames2);
                        }

                        this.Close();
                        break;

                    case "Contra Voucher":
                        decimal          decContraVoucherTypeId = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string           strVoucherTypeNames3   = cmbVoucherType.Text.ToString();
                        frmContraVoucher frmcontraObj           = new frmContraVoucher();
                        frmContraVoucher ContraOpen             = Application.OpenForms["frmContraVoucher"] as frmContraVoucher;
                        if (ContraOpen == null)
                        {
                            frmcontraObj.MdiParent = this.MdiParent;
                            frmcontraObj.CallFromVoucherTypeSelection(decContraVoucherTypeId, strVoucherTypeNames3);
                        }
                        else
                        {
                            ContraOpen.CallFromVoucherTypeSelection(decContraVoucherTypeId, strVoucherTypeNames3);
                        }

                        this.Close();
                        break;

                    case "Journal Voucher":
                        decimal           decJournalVoucherTypeId = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string            strVoucherTypeNames4    = cmbVoucherType.Text.ToString();
                        frmJournalVoucher frmJournalObj           = new frmJournalVoucher();
                        frmJournalVoucher JournalOpen             = Application.OpenForms["frmJournalVoucher"] as frmJournalVoucher;
                        if (JournalOpen == null)
                        {
                            frmJournalObj.MdiParent = this.MdiParent;
                            frmJournalObj.CallFromVoucherTypeSelection(decJournalVoucherTypeId, strVoucherTypeNames4);
                        }
                        else
                        {
                            JournalOpen.CallFromVoucherTypeSelection(decJournalVoucherTypeId, strVoucherTypeNames4);
                        }

                        this.Close();
                        break;

                    case "Credit Note":

                        decimal       decCreditNoteVoucherTypeId   = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string        strCreditNoteVoucherTypeName = cmbVoucherType.Text.ToString();
                        frmCreditNote frmCreditNoteObj             = new frmCreditNote();
                        frmCreditNote CreditNoteOpen = Application.OpenForms["frmCreditNote"] as frmCreditNote;
                        if (CreditNoteOpen == null)
                        {
                            frmCreditNoteObj.MdiParent = this.MdiParent;
                            frmCreditNoteObj.CallFromVoucherTypeSelection(decCreditNoteVoucherTypeId, strCreditNoteVoucherTypeName);
                        }
                        else
                        {
                            CreditNoteOpen.CallFromVoucherTypeSelection(decCreditNoteVoucherTypeId, strCreditNoteVoucherTypeName);
                        }

                        this.Close();
                        break;

                    case "Receipt Voucher":
                        decimal           decReceiptVoucherTypeId   = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string            strReceiptVoucherTypeName = cmbVoucherType.Text.ToString();
                        frmReceiptVoucher frmReceiptObj             = new frmReceiptVoucher();
                        frmReceiptVoucher ReceiptOpen = Application.OpenForms["frmReceiptVoucher"] as frmReceiptVoucher;
                        if (ReceiptOpen == null)
                        {
                            frmReceiptObj.MdiParent = this.MdiParent;
                            frmReceiptObj.CallFromVoucherTypeSelection(decReceiptVoucherTypeId, strReceiptVoucherTypeName);
                        }
                        else
                        {
                            ReceiptOpen.CallFromVoucherTypeSelection(decReceiptVoucherTypeId, strReceiptVoucherTypeName);
                        }

                        this.Close();
                        break;

                    case "Service Voucher":
                        decimal           decServiceVoucherTypeId   = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string            strServiceVoucherTypeName = cmbVoucherType.Text.ToString();
                        frmServiceVoucher frmServiceVoucherObj      = new frmServiceVoucher();
                        frmServiceVoucher ServiceVoucherOpen        = Application.OpenForms["frmServiceVoucher"] as frmServiceVoucher;
                        if (ServiceVoucherOpen == null)
                        {
                            frmServiceVoucherObj.MdiParent = this.MdiParent;
                            frmServiceVoucherObj.CallFromVoucherTypeSelection(decServiceVoucherTypeId, strServiceVoucherTypeName);
                        }
                        else
                        {
                            ServiceVoucherOpen.CallFromVoucherTypeSelection(decServiceVoucherTypeId, strServiceVoucherTypeName);
                        }

                        this.Close();
                        break;

                    case "Purchase Order":
                        decimal          decPurchaseOrderTypeId   = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string           strPurchaseOrderTypeName = cmbVoucherType.Text.ToString();
                        frmPurchaseOrder frmPurchaseOrderObj      = new frmPurchaseOrder();
                        frmPurchaseOrder OpenPurchaseOrder        = Application.OpenForms["frmPurchaseOrder"] as frmPurchaseOrder;
                        if (OpenPurchaseOrder == null)
                        {
                            frmPurchaseOrderObj.MdiParent = this.MdiParent;
                            frmPurchaseOrderObj.CallFromVoucherTypeSelection(decPurchaseOrderTypeId, strPurchaseOrderTypeName);
                        }
                        else
                        {
                            OpenPurchaseOrder.CallFromVoucherTypeSelection(decPurchaseOrderTypeId, strPurchaseOrderTypeName);
                        }
                        this.Close();
                        break;

                    case "Debit Note":
                        decimal      decDebitNoteVoucherTypeId   = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string       strDebitNoteVoucherTypeName = cmbVoucherType.Text.ToString();
                        frmDebitNote frmDebitNoteObj             = new frmDebitNote();
                        frmDebitNote DebitNoteOpen = Application.OpenForms["frmDebitNote"] as frmDebitNote;
                        if (DebitNoteOpen == null)
                        {
                            frmDebitNoteObj.MdiParent = this.MdiParent;
                            frmDebitNoteObj.CallFromVoucherTypeSelection(decDebitNoteVoucherTypeId, strDebitNoteVoucherTypeName);
                        }
                        else
                        {
                            DebitNoteOpen.CallFromVoucherTypeSelection(decDebitNoteVoucherTypeId, strDebitNoteVoucherTypeName);
                        }

                        this.Close();
                        break;

                    case "Sales Return":
                        decimal        decSalesReturnVoucherTypeId  = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string         strSalesReturnVoucheTypeName = cmbVoucherType.Text;
                        frmSalesReturn frmSalesReturnObj            = new frmSalesReturn();
                        frmSalesReturn SalesReturnOpen = Application.OpenForms["frmSalesReturn"] as frmSalesReturn;
                        if (SalesReturnOpen == null)
                        {
                            frmSalesReturnObj.MdiParent = this.MdiParent;
                            frmSalesReturnObj.CallFromVoucherTypeSelection(decSalesReturnVoucherTypeId, strSalesReturnVoucheTypeName);
                        }
                        else
                        {
                            SalesReturnOpen.CallFromVoucherTypeSelection(decSalesReturnVoucherTypeId, strSalesReturnVoucheTypeName);
                        }

                        this.Close();
                        break;

                    case "Material Receipt":
                        decimal decMaterialReceiptVoucherTypeId  = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string  strMaterialReceiptVoucheTypeName = cmbVoucherType.Text;

                        frmMaterialReceipt frmMaterialReceiptObj = new frmMaterialReceipt();
                        frmMaterialReceipt MaterialReceiptOpen   = Application.OpenForms["frmMaterialReceipt"] as frmMaterialReceipt;
                        if (MaterialReceiptOpen == null)
                        {
                            frmMaterialReceiptObj.MdiParent = this.MdiParent;
                            frmMaterialReceiptObj.CallFromVoucherTypeSelection(decMaterialReceiptVoucherTypeId, strMaterialReceiptVoucheTypeName);
                        }
                        else
                        {
                            MaterialReceiptOpen.CallFromVoucherTypeSelection(decMaterialReceiptVoucherTypeId, strMaterialReceiptVoucheTypeName);
                        }



                        this.Close();
                        break;

                    case "Sales Order":
                        decimal decSalesOrderTypeId          = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string  strSalesOrderVoucherTypeName = cmbVoucherType.Text;

                        frmSalesOrder frmSalesOrderObj = new frmSalesOrder();
                        frmSalesOrder SalesOrderOpen   = Application.OpenForms["frmSalesOrder"] as frmSalesOrder;
                        if (SalesOrderOpen == null)
                        {
                            frmSalesOrderObj.MdiParent = this.MdiParent;
                            frmSalesOrderObj.CallFromVoucherTypeSelection(decSalesOrderTypeId, strSalesOrderVoucherTypeName);
                        }
                        else
                        {
                            SalesOrderOpen.CallFromVoucherTypeSelection(decSalesOrderTypeId, strSalesOrderVoucherTypeName);
                        }



                        this.Close();
                        break;

                    case "Rejection Out":
                        decimal         decRejectionOutVoucherTypeId   = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string          strRejectionOutVoucherTypeName = cmbVoucherType.Text.ToString();
                        frmRejectionOut frmRejectionOutObj             = new frmRejectionOut();
                        frmRejectionOut RejectionOutOpen = Application.OpenForms["frmRejectionOut"] as frmRejectionOut;
                        if (RejectionOutOpen == null)
                        {
                            frmRejectionOutObj.MdiParent = this.MdiParent;
                            frmRejectionOutObj.CallFromVoucherTypeSelection(decRejectionOutVoucherTypeId, strRejectionOutVoucherTypeName);
                        }
                        else
                        {
                            RejectionOutOpen.CallFromVoucherTypeSelection(decRejectionOutVoucherTypeId, strRejectionOutVoucherTypeName);
                        }

                        this.Close();
                        break;

                    case "Rejection In":
                        decimal        decRejectionInVoucherTypeId   = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string         strRejectionInVoucherTypeName = cmbVoucherType.Text.ToString();
                        frmRejectionIn frmRejectionInObj             = new frmRejectionIn();
                        frmRejectionIn RejectionInOpen = Application.OpenForms["frmRejectionIn"] as frmRejectionIn;
                        if (RejectionInOpen == null)
                        {
                            frmRejectionInObj.MdiParent = this.MdiParent;
                            frmRejectionInObj.CallFromVoucherTypeSelection(decRejectionInVoucherTypeId, strRejectionInVoucherTypeName);
                        }
                        else
                        {
                            RejectionInOpen.CallFromVoucherTypeSelection(decRejectionInVoucherTypeId, strRejectionInVoucherTypeName);
                        }

                        this.Close();
                        break;

                    case "Sales Quotation":
                        decimal           decsalesQuotationTypeId = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string            strSalesQuotationName   = cmbVoucherType.Text.ToString();
                        frmSalesQuotation frmsalesQuotationObj    = new frmSalesQuotation();
                        frmSalesQuotation frmsalesQuotationOpen   = Application.OpenForms["frmSalesQuotation"] as frmSalesQuotation;
                        if (frmsalesQuotationOpen == null)
                        {
                            frmsalesQuotationObj.MdiParent = this.MdiParent;
                            frmsalesQuotationObj.CallFromVoucherTypeSelection(decsalesQuotationTypeId, strSalesQuotationName);
                        }
                        else
                        {
                            frmsalesQuotationOpen.CallFromVoucherTypeSelection(decsalesQuotationTypeId, strSalesQuotationName);
                        }
                        this.Close();
                        break;

                    case "PDC Payable":
                        decimal       decPDCpayableVoucherTypeId  = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string        strPDCpayableVoucheTypeName = cmbVoucherType.Text.ToString();
                        frmPdcPayable frmPDCPayableOBj            = new frmPdcPayable();
                        frmPdcPayable frmPDCPayableOpen           = Application.OpenForms["frmPdcPayable"] as frmPdcPayable;

                        if (frmPDCPayableOpen == null)
                        {
                            frmPDCPayableOBj.MdiParent = this.MdiParent;
                            frmPDCPayableOBj.CallFromVoucherTypeSelection(decPDCpayableVoucherTypeId, strPDCpayableVoucheTypeName);
                        }
                        else
                        {
                            frmPDCPayableOpen.CallFromVoucherTypeSelection(decPDCpayableVoucherTypeId, strPDCpayableVoucheTypeName);
                        }

                        this.Close();
                        break;


                    case "Sales Invoice":
                        decimal         decSalesInvoiceVoucherTypeId  = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string          strSalesInvoiceVoucheTypeName = cmbVoucherType.Text.ToString();
                        frmSalesInvoice frmSalesInvoiceOBj            = new frmSalesInvoice();
                        frmSalesInvoice frmSalesInvoiceOpen           = Application.OpenForms["frmSalesInvoice"] as frmSalesInvoice;

                        if (frmSalesInvoiceOpen == null)
                        {
                            frmSalesInvoiceOBj.MdiParent = this.MdiParent;
                            frmSalesInvoiceOBj.CallFromVoucherTypeSelection(decSalesInvoiceVoucherTypeId, strSalesInvoiceVoucheTypeName);
                        }
                        else
                        {
                            frmSalesInvoiceOpen.CallFromVoucherTypeSelection(decSalesInvoiceVoucherTypeId, strSalesInvoiceVoucheTypeName);
                        }

                        this.Close();
                        break;


                    case "Purchase Invoice":
                        decimal            decPurchaseInvoiceVoucherTypeId  = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string             strPurchaseInvoiceVoucheTypeName = cmbVoucherType.Text.ToString();
                        frmPurchaseInvoice frmPurchaseInvoiceOBj            = new frmPurchaseInvoice();
                        frmPurchaseInvoice frmPurchaseInvoiceOpen           = Application.OpenForms["frmPurchaseInvoice"] as frmPurchaseInvoice;

                        if (frmPurchaseInvoiceOpen == null)
                        {
                            frmPurchaseInvoiceOBj.MdiParent = this.MdiParent;
                            frmPurchaseInvoiceOBj.CallFromVoucherTypeSelection(decPurchaseInvoiceVoucherTypeId, strPurchaseInvoiceVoucheTypeName);
                        }
                        else
                        {
                            frmPurchaseInvoiceOpen.CallFromVoucherTypeSelection(decPurchaseInvoiceVoucherTypeId, strPurchaseInvoiceVoucheTypeName);
                        }

                        this.Close();
                        break;

                    case "Delivery Note":
                        decimal decDeliveryVoucherTypeNo    = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string  strDeliveryVoucherTypeNames = cmbVoucherType.Text;

                        frmDeliveryNote DeliveryNote     = new frmDeliveryNote();
                        frmDeliveryNote openDeliveryNote = Application.OpenForms["frmDeliveryNote"] as frmDeliveryNote;
                        if (openDeliveryNote == null)
                        {
                            DeliveryNote.MdiParent = this.MdiParent;
                            DeliveryNote.CallFromVoucherTypeSelection(decDeliveryVoucherTypeNo, strDeliveryVoucherTypeNames);
                        }
                        else
                        {
                            openDeliveryNote.CallFromVoucherTypeSelection(decDeliveryVoucherTypeNo, strDeliveryVoucherTypeNames);
                        }



                        this.Close();
                        break;

                    case "Purchase Return":
                        decimal decPurchaseReturnVoucherTypeId    = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string  strPurchaseReturnVoucherTypeNames = cmbVoucherType.Text.ToString();

                        frmPurchaseReturn frmPurchase      = new frmPurchaseReturn();
                        frmPurchaseReturn FrmPurchaseOpens = Application.OpenForms["frmPurchaseReturn"] as frmPurchaseReturn;
                        if (FrmPurchaseOpens == null)
                        {
                            frmPurchase.MdiParent = this.MdiParent;
                            frmPurchase.CallFromVoucherTypeSelection(decPurchaseReturnVoucherTypeId, strPurchaseReturnVoucherTypeNames);
                        }
                        else
                        {
                            FrmPurchaseOpens.CallFromVoucherTypeSelection(decPurchaseReturnVoucherTypeId, strPurchaseReturnVoucherTypeNames);
                        }
                        this.Close();
                        break;

                    case "POS":
                        decimal decPOSVoucherTypeId = decimal.Parse(cmbVoucherType.SelectedValue.ToString());

                        string strPOSVoucheTypeName = "POS";
                        frmPOS frmPOSOBj            = new frmPOS();
                        frmPOS frmPOSOpen           = Application.OpenForms["frmPOS"] as frmPOS;

                        if (frmPOSOpen == null)
                        {
                            frmPOSOBj.MdiParent = this.MdiParent;
                            frmPOSOBj.CallFromVoucherTypeSelection(decPOSVoucherTypeId, strPOSVoucheTypeName);
                        }
                        else
                        {
                            frmPOSOpen.CallFromVoucherTypeSelection(decPOSVoucherTypeId, strPOSVoucheTypeName);
                        }

                        this.Close();

                        break;

                    case "Physical Stock":
                        decimal          DecPhysicalStockVoucherTypeId   = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string           strPhysicalStockVocherTypeNames = cmbVoucherType.Text;
                        frmPhysicalStock frmPhysicalStock     = new frmPhysicalStock();
                        frmPhysicalStock frmPhysicalStockOpen = Application.OpenForms["frmPhysicalStock"] as frmPhysicalStock;
                        if (frmPhysicalStockOpen == null)
                        {
                            frmPhysicalStock.MdiParent = this.MdiParent;
                            frmPhysicalStock.CallFromVoucherTypeSelection(DecPhysicalStockVoucherTypeId, strPhysicalStockVocherTypeNames);
                        }
                        else
                        {
                            frmPhysicalStockOpen.CallFromVoucherTypeSelection(DecPhysicalStockVoucherTypeId, strPhysicalStockVocherTypeNames);
                        }
                        this.Close();
                        break;

                    case "PDC Receivable":
                        decimal          decPDCReceivableVoucherTypeId  = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string           strPDCReceivableVoucheTypeName = cmbVoucherType.Text.ToString();
                        frmPdcReceivable frmpdreceivableObj             = new frmPdcReceivable();

                        frmPdcReceivable frmPDCReceivableOpen = Application.OpenForms["frmPdcReceivable"] as frmPdcReceivable;

                        if (frmPDCReceivableOpen == null)
                        {
                            frmpdreceivableObj.MdiParent = this.MdiParent;
                            frmpdreceivableObj.CallFromVoucherTypeSelection(decPDCReceivableVoucherTypeId, strPDCReceivableVoucheTypeName);
                        }
                        else
                        {
                            frmPDCReceivableOpen.CallFromVoucherTypeSelection(decPDCReceivableVoucherTypeId, strPDCReceivableVoucheTypeName);
                        }

                        this.Close();
                        break;

                    case "Stock Journal":
                        decimal         decStockJournalVoucherTypeId = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string          strSockJournalVocherTypeName = cmbVoucherType.Text;
                        frmStockJournal frmStockJournalObj           = new frmStockJournal();
                        frmStockJournal frmStockJournalOpen          = Application.OpenForms["frmStockJournal"] as frmStockJournal;
                        if (frmStockJournalOpen == null)
                        {
                            frmStockJournalObj.MdiParent = this.MdiParent;
                            frmStockJournalObj.CallFromVoucherTypeSelection(decStockJournalVoucherTypeId, strSockJournalVocherTypeName);
                        }
                        else
                        {
                            frmStockJournalOpen.CallFromVoucherTypeSelection(decStockJournalVoucherTypeId, strSockJournalVocherTypeName);
                        }
                        this.Close();
                        break;

                    case "PDC Clearance":
                        decimal         decPDCClearanceVoucherTypeId  = decimal.Parse(cmbVoucherType.SelectedValue.ToString());
                        string          strPDCClearanceVoucheTypeName = cmbVoucherType.Text.ToString();
                        frmPdcClearance frmpdcClearanceObj            = new frmPdcClearance();
                        frmPdcClearance frmpdcclearanceOpen           = Application.OpenForms["frmPdcClearance"] as frmPdcClearance;

                        if (frmpdcclearanceOpen == null)
                        {
                            frmpdcClearanceObj.MdiParent = this.MdiParent;
                            frmpdcClearanceObj.CallFromVoucherTypeSelection(decPDCClearanceVoucherTypeId, strPDCClearanceVoucheTypeName);
                        }
                        else
                        {
                            frmpdcclearanceOpen.CallFromVoucherTypeSelection(decPDCClearanceVoucherTypeId, strPDCClearanceVoucheTypeName);
                        }

                        this.Close();
                        break;
                    }
                }
                else
                {
                    Messages.InformationMessage("Select voucher type");
                    cmbVoucherType.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("VTS2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #5
0
        /// <summary>
        /// Cell double click in grid to view the curresponding item in that form and open the form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvVoucherwiseProductSearch_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex != -1)
                {
                    int inI = dgvVoucherwiseProductSearch.CurrentCell.RowIndex;
                    foreach (DataGridViewRow dgv in dgvVoucherwiseProductSearch.Rows)
                    {
                        decMasterId      = decimal.Parse(dgv.Cells["dgvtxtmasterId"].Value.ToString());
                        strVoucherType   = dgv.Cells["dgvtxtTypeOfVoucher"].Value.ToString();
                        decVoucherTypeId = Convert.ToDecimal(dgv.Cells["dgvtxtvoucherTypeId"].Value.ToString());
                        if (dgv.Index == inI)
                        {
                            break;
                        }
                    }

                    if (decMasterId != 0 && strVoucherType == "Material Receipt")
                    {
                        frmMaterialReceipt objReceipt = new frmMaterialReceipt();
                        objReceipt.WindowState = FormWindowState.Normal;
                        objReceipt.MdiParent   = formMDI.MDIObj;
                        objReceipt.CallFromVoucherWiseProductSearch(this, decMasterId);
                        this.Enabled = false;
                    }

                    else if (decMasterId != 0 && strVoucherType == "Physical Stock")
                    {
                        frmPhysicalStock objPhysical = new frmPhysicalStock();
                        objPhysical.WindowState = FormWindowState.Normal;
                        objPhysical.MdiParent   = formMDI.MDIObj;
                        objPhysical.CallFromVoucherWiseProductSearch(this, decMasterId);
                        this.Enabled = false;
                    }

                    else if (decMasterId != 0 && strVoucherType == "Purchase Invoice")
                    {
                        frmPurchaseInvoice objpurchase = new frmPurchaseInvoice();
                        objpurchase.WindowState = FormWindowState.Normal;
                        objpurchase.MdiParent   = formMDI.MDIObj;
                        objpurchase.CallFromVoucherWiseProductSearch(this, decMasterId);
                        this.Enabled = false;
                    }

                    else if (decMasterId != 0 && strVoucherType == "Rejection Out")
                    {
                        frmRejectionOut objRejection = new frmRejectionOut();
                        objRejection.WindowState = FormWindowState.Normal;
                        objRejection.MdiParent   = formMDI.MDIObj;
                        objRejection.CallFromVoucherWiseProductSearch(this, decMasterId);
                        this.Enabled = false;
                    }


                    else if (decMasterId != 0 && strVoucherType == "Rejection In")
                    {
                        frmRejectionIn objRejection = new frmRejectionIn();
                        objRejection.WindowState = FormWindowState.Normal;
                        objRejection.MdiParent   = formMDI.MDIObj;
                        objRejection.CallFromVoucherWiseProductSearch(this, decMasterId);
                        this.Enabled = false;
                    }
                    else if (decMasterId != 0 && strVoucherType == "Purchase Return")
                    {
                        frmPurchaseReturn objPurchase = new frmPurchaseReturn();
                        objPurchase.WindowState = FormWindowState.Normal;
                        objPurchase.MdiParent   = formMDI.MDIObj;
                        objPurchase.CallFromVoucherWiseProductSearch(this, decMasterId);
                        this.Enabled = false;
                    }
                    else if (decMasterId != 0 && strVoucherType == "Sales Return")
                    {
                        frmSalesReturn frmObj = new frmSalesReturn();
                        frmObj.WindowState = FormWindowState.Normal;
                        frmObj.MdiParent   = formMDI.MDIObj;
                        frmObj.CallFromVoucherWiseProductSearch(this, decMasterId, true);
                        this.Enabled = false;
                    }

                    else if (decMasterId != 0 && strVoucherType == "Delivery Note")
                    {
                        frmDeliveryNote objDeliveryReport = new frmDeliveryNote();
                        objDeliveryReport.WindowState = FormWindowState.Normal;
                        objDeliveryReport.MdiParent   = formMDI.MDIObj;
                        objDeliveryReport.CallFromVoucherWiseProductSearch(this, decMasterId);
                        this.Enabled = false;
                    }

                    else if (decMasterId != 0 && strVoucherType == "Sales Order")
                    {
                        frmSalesOrder dbjfrmSalesorder = new frmSalesOrder();
                        dbjfrmSalesorder.WindowState = FormWindowState.Normal;
                        dbjfrmSalesorder.MdiParent   = formMDI.MDIObj;
                        dbjfrmSalesorder.CallFromVoucherWiseProductSearch(this, decMasterId);
                        this.Enabled = false;
                    }

                    else if (decMasterId != 0 && strVoucherType == "Purchase Order")
                    {
                        frmPurchaseOrder objfrmPurchaseorder = new frmPurchaseOrder();

                        objfrmPurchaseorder.WindowState = FormWindowState.Normal;
                        objfrmPurchaseorder.MdiParent   = formMDI.MDIObj;
                        objfrmPurchaseorder.CallFromVoucherWiseProductSearch(this, decMasterId);
                        this.Enabled = false;
                    }

                    else if (decMasterId != 0 && strVoucherType == "Sales Quotation")
                    {
                        frmSalesQuotation objfrmSalesquotation = new frmSalesQuotation();

                        objfrmSalesquotation.WindowState = FormWindowState.Normal;
                        objfrmSalesquotation.MdiParent   = formMDI.MDIObj;
                        objfrmSalesquotation.CallFromVoucherWiseProductSearch(this, decMasterId);
                        this.Enabled = false;
                    }

                    else if (decMasterId != 0 && strVoucherType == "Sales Invoice")
                    {
                        frmSalesInvoice objSalesReport = new frmSalesInvoice();
                        SalesMasterSP   spSalesMaster  = new SalesMasterSP();
                        objSalesReport.WindowState = FormWindowState.Normal;
                        objSalesReport.MdiParent   = formMDI.MDIObj;
                        bool            blPOS           = spSalesMaster.DayBookSalesInvoiceOrPOS(decMasterId, decVoucherTypeId);
                        frmSalesInvoice frmSalesInvoice = new frmSalesInvoice();
                        frmPOS          frmPOS          = new frmPOS();
                        if (blPOS == true)
                        {
                            frmPOS = Application.OpenForms["frmPOS"] as frmPOS;
                            if (frmPOS == null)
                            {
                                frmPOS           = new frmPOS();
                                frmPOS.MdiParent = formMDI.MDIObj;

                                frmPOS.callFromVoucherWiseProductSearch(this, decMasterId);
                            }
                        }
                        else
                        {
                            frmSalesInvoice = Application.OpenForms["frmSalesInvoice"] as frmSalesInvoice;
                            if (frmSalesInvoice == null)
                            {
                                frmSalesInvoice           = new frmSalesInvoice();
                                frmSalesInvoice.MdiParent = formMDI.MDIObj;
                                objSalesReport.CallFromVoucherWiseProductSearch(this, decMasterId);
                            }
                        }

                        this.Enabled = false;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("VPS :11" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #6
0
        public void navBar_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            if (this.ValidateRight("View", AppConstant.UserID, e.Link.Caption))
            {
                switch (e.Link.Caption)
                {
                case "Quotations Review":
                    frmPOaward _frmPOaward = new frmPOaward();
                    _frmPOaward.ShowDialog();
                    break;

                case "Purchase Order":
                    frmPO _frmPO = new frmPO();
                    _frmPO.ShowDialog();
                    break;

                case "Purchase Requisition":
                    frmRequisition _frmRequisition = new frmRequisition();
                    _frmRequisition.ShowDialog();
                    break;

                case "Requisition Approval":
                    frmRequisitionReview _frmRequisitionReview = new frmRequisitionReview();
                    _frmRequisitionReview.ShowDialog();
                    break;

                case "Supplier Quotations":
                    frmSupplierQuotations _frmSupplierQuotations = new frmSupplierQuotations();
                    _frmSupplierQuotations.ShowDialog();
                    break;

                case "Requisitions":
                    requisitionslauncher _requisitionslauncher = new requisitionslauncher();
                    _requisitionslauncher.ShowDialog();
                    break;

                case "Department Access":
                    frmDepartmentAccess _frmDepartmentAccess = new frmDepartmentAccess();
                    _frmDepartmentAccess.ShowDialog();
                    break;

                case "Customers":
                    frmCustomers _frmCustomers = new frmCustomers();
                    _frmCustomers.ShowDialog();
                    break;

                case "Return OutWards":
                    frmReturnOutwards _frmReturnOutwards = new frmReturnOutwards();
                    _frmReturnOutwards.ShowDialog();
                    break;

                case "Sales Summary":
                    frmSalesSummary _frmSalesSummary = new frmSalesSummary();
                    _frmSalesSummary.ShowDialog();
                    break;

                case "Stock Sheet Inquiry":
                    frmstockshettinquiry _frmstockshettinquiry = new frmstockshettinquiry();
                    _frmstockshettinquiry.ShowDialog();
                    break;

                case "COA":
                    frmCOA _frmCOA = new frmCOA();
                    _frmCOA.ShowDialog();
                    break;

                case "PO Reprint":
                    frmPoReprint _frmPoReprint = new frmPoReprint();
                    _frmPoReprint.ShowDialog();
                    break;

                case "Customer Invoices":
                    frmCustomerInvoiceReprint _frmCustomerInvoiceReprint = new frmCustomerInvoiceReprint();
                    _frmCustomerInvoiceReprint.ShowDialog();
                    break;

                case "Supplier Balances":
                    frmSupplierBalances _frmSupplierBalances = new frmSupplierBalances();
                    _frmSupplierBalances.ShowDialog();
                    break;

                case "Supplier Balance":
                    frmrptSupplierBalance _frmrptSupplierBalance = new frmrptSupplierBalance();
                    _frmrptSupplierBalance.ShowDialog();
                    break;

                case "Customer Balances":
                    frmCustomerBalanceLauncher _frmCustomerBalanceLauncher = new frmCustomerBalanceLauncher();
                    _frmCustomerBalanceLauncher.ShowDialog();
                    break;

                case "Credit Notes":
                    frmcustomercreditnoteLauncher _frmcustomercreditnoteLauncher = new frmcustomercreditnoteLauncher();
                    _frmcustomercreditnoteLauncher.ShowDialog();
                    break;

                case "Customer Refunds":
                    frmCustomerRefund _frmCustomerRefund = new frmCustomerRefund();
                    _frmCustomerRefund.ShowDialog();
                    break;

                case "Payouts":
                    frmPayOuts _frmPayOuts = new frmPayOuts();
                    _frmPayOuts.ShowDialog();
                    break;

                case "Return Inwards":
                    frmReturnInwards _frmReturnInwards = new frmReturnInwards();
                    _frmReturnInwards.ShowDialog();
                    break;

                case "Supplier Payments":
                    frmSupplierPayment _frmSupplierPayment = new frmSupplierPayment();
                    _frmSupplierPayment.ShowDialog();
                    break;

                case "Bank Accounts":
                    frmBankAccounts _frmBankAccounts = new frmBankAccounts();
                    _frmBankAccounts.ShowDialog();
                    break;

                //case "Supplier Balance":
                //    frmSupplierBalances _frmSupplierBalances = new frmSupplierBalances();
                //    _frmSupplierBalances.ShowDialog();
                //    break;
                case "Direct Invoices":
                    frmDirectSupplierInvoice _frmDirectSupplierInvoice = new frmDirectSupplierInvoice();
                    _frmDirectSupplierInvoice.ShowDialog();
                    break;

                case "Invoice Matching":
                    frmInvoiceMatching _frmInvoiceMatching = new frmInvoiceMatching();
                    _frmInvoiceMatching.ShowDialog();
                    break;

                case "Recruitment Parameters":
                    frmHRRecruitmentParam _frmHRRecruitmentParam = new frmHRRecruitmentParam();
                    _frmHRRecruitmentParam.ShowDialog();
                    break;

                case "Job Applications":
                    frmJobApplications _frmJobApplications = new frmJobApplications();
                    _frmJobApplications.ShowDialog();
                    break;

                case "Job Description":
                    frmJobDescription _frmJobDescription = new frmJobDescription();
                    _frmJobDescription.ShowDialog();
                    break;

                case "Job Requisition":
                    frmJobRequisition _frmJobRequisition = new frmJobRequisition();
                    _frmJobRequisition.ShowDialog();
                    break;

                case "Job Appraisals":
                    frmJobAppraisals _frmJobAppraisals = new frmJobAppraisals();
                    _frmJobAppraisals.ShowDialog();
                    break;

                case "Employeee information":
                    frmEmployeeMaster _frmEmployeeMaster = new frmEmployeeMaster();
                    _frmEmployeeMaster.ShowDialog();
                    break;

                case "Distribution Orders":
                    frmDistributionOders _frmDistributionOders = new frmDistributionOders();
                    _frmDistributionOders.ShowDialog();
                    break;

                case "Inventory Adjustment":
                    frmInventoryAdjustment _frmInventoryAdjustment = new frmInventoryAdjustment();
                    _frmInventoryAdjustment.ShowDialog();
                    break;

                case "Inventory Transfers":
                    frmInventoryTransfer _frmInventoryTransfer = new frmInventoryTransfer();
                    _frmInventoryTransfer.ShowDialog();
                    break;

                case "Inventory Issues":
                    frmInventoryIssues _frmInventoryIssues = new frmInventoryIssues();
                    _frmInventoryIssues.ShowDialog();
                    break;

                case "Inventory Receipts":
                    frmInventoryReceipt _frmInventoryReceipt = new frmInventoryReceipt();
                    _frmInventoryReceipt.ShowDialog();
                    break;

                case "Purchase Orders":
                    frmPurchaseOrder _frmPurchaseOrder = new frmPurchaseOrder();
                    _frmPurchaseOrder.ShowDialog();
                    break;

                case "Ware houses":
                    frmWareHouses _frmWareHouses = new frmWareHouses();
                    _frmWareHouses.ShowDialog();
                    break;

                case "Sales Order":
                    frmSalesOrder _frmSalesOrder = new frmSalesOrder();
                    _frmSalesOrder.ShowDialog();
                    break;

                case "PO Receipts":
                    frmPOReceipt _frmPOReceipt = new frmPOReceipt();
                    _frmPOReceipt.ShowDialog();
                    break;

                case "Opening Stock":
                    frmOpeningStock _frmOpeningStock = new frmOpeningStock();
                    _frmOpeningStock.ShowDialog();
                    break;

                case "Exchange Rates":
                    frmExchangeRates _frmExchangeRates = new frmExchangeRates();
                    _frmExchangeRates.ShowDialog();
                    break;

                case "Payroll Review":
                    frmPayrollReview _frmPayrollReview = new frmPayrollReview();
                    _frmPayrollReview.ShowDialog();
                    break;

                case "Bank Branches":
                    frmBankBranches _frmBankBranches = new frmBankBranches();
                    _frmBankBranches.ShowDialog();
                    break;

                case "Banks":
                    frmbanks _frmbanks = new frmbanks();
                    _frmbanks.ShowDialog();
                    break;

                case "Payroll Processing":
                    frmPayroll _frmPayroll = new frmPayroll();
                    _frmPayroll.ShowDialog();
                    break;

                case "Posting Periods":
                    frmPostingPeriods _frmPostingPeriods = new frmPostingPeriods();
                    _frmPostingPeriods.ShowDialog();
                    break;

                case "Tax Rates":
                    frmTaxRates _frmTaxRates = new frmTaxRates();
                    _frmTaxRates.ShowDialog();
                    break;

                case "Benefits & Deductions":
                    frmDBAs _frmDBAs = new frmDBAs();
                    _frmDBAs.ShowDialog();
                    break;

                case "Approvers":
                    frmApprovers _frmApprovers = new frmApprovers();
                    _frmApprovers.ShowDialog();
                    break;

                case "Commission Entry":
                    frmCommisionEntry _frmCommisionEntry = new frmCommisionEntry();
                    _frmCommisionEntry.ShowDialog();
                    break;

                case "Commission Tax Rates":
                    frmCommisionRates _frmCommisionRates = new frmCommisionRates();
                    _frmCommisionRates.ShowDialog();
                    break;

                case "Leave Management":
                    frmLeaveManagent _frmLeaveManagent = new frmLeaveManagent();
                    _frmLeaveManagent.ShowDialog();
                    break;

                case "Leave Types":
                    frmLeaveTypes _frmLeaveTypes = new frmLeaveTypes();
                    _frmLeaveTypes.ShowDialog();
                    break;

                case "NHIF Rates":
                    frmNHIFRates _frmNHIFRates = new frmNHIFRates();
                    _frmNHIFRates.ShowDialog();
                    break;

                case "NSSF Rates":
                    frmNSSFRates _frmNSSFRates = new frmNSSFRates();
                    _frmNSSFRates.ShowDialog();
                    break;

                case "Over Time":
                    frmOverTime _frmOverTime = new frmOverTime();
                    _frmOverTime.ShowDialog();
                    break;

                case "Over Time Rates":
                    frmOverTimeRates _frmOverTimeRates = new frmOverTimeRates();
                    _frmOverTimeRates.ShowDialog();
                    break;

                case "Salary Advance":
                    frmSalaryAdvance _frmSalaryAdvance = new frmSalaryAdvance();
                    _frmSalaryAdvance.ShowDialog();
                    break;

                case "Tax Tables":
                    frmTaxTables _frmTaxTables = new frmTaxTables();
                    _frmTaxTables.ShowDialog();
                    break;

                case "User Codes":
                    frmUserCodes _frmUserCodes = new frmUserCodes();
                    _frmUserCodes.ShowDialog();
                    break;

                case "Companies":
                    frmCompanies _frmCompanies = new frmCompanies();
                    _frmCompanies.ShowDialog();
                    break;

                case "User Code Categories":
                    frmUserCodeCategories _frmUserCodeCategories = new frmUserCodeCategories();
                    _frmUserCodeCategories.ShowDialog();
                    break;

                case "CostCenters":
                    frmCostCenter _frmCostCenter = new frmCostCenter();
                    _frmCostCenter.ShowDialog();
                    break;

                case "CostCenter Access":
                    frmCompanyCostCenterAccess _frmCompanyCostCenterAccess = new frmCompanyCostCenterAccess();
                    _frmCompanyCostCenterAccess.ShowDialog();
                    break;

                case "Security Groups":
                    frmSecurityGroups _frmSecurityGroups = new frmSecurityGroups();
                    _frmSecurityGroups.ShowDialog();
                    break;

                case "Roles":
                    frmRoles _frmRoles = new frmRoles();
                    _frmRoles.ShowDialog();
                    break;

                case "User Roles":
                    frmUserRoles _frmUserRoles = new frmUserRoles();
                    _frmUserRoles.ShowDialog();
                    break;

                case "Users":
                    frmUsers _frmUsers = new frmUsers();
                    _frmUsers.ShowDialog();
                    break;

                case "User Groups":
                    frmUserGroups _frmUserGroups = new frmUserGroups();
                    _frmUserGroups.ShowDialog();
                    break;

                case "Currencies":
                    frmCurrencies _frmCurrencies = new frmCurrencies();
                    _frmCurrencies.ShowDialog();
                    break;

                case "Countries":
                    frmCountry _frmCountry = new frmCountry();
                    _frmCountry.ShowDialog();
                    break;

                case "UOM Convertions":
                    frmUOMConversions _frmUOMConversions = new frmUOMConversions();
                    _frmUOMConversions.ShowDialog();
                    break;

                case "Counties":
                    frmCounties _frmCounties = new frmCounties();
                    _frmCounties.ShowDialog();
                    break;

                case "Beneficiaries":
                    frmBeneficiaries _frmBeneficiaries = new frmBeneficiaries();
                    _frmBeneficiaries.ShowDialog();
                    break;

                case "Payroll Reversal":
                    frmPayrollReverse _frmPayrollReverse = new frmPayrollReverse();
                    _frmPayrollReverse.ShowDialog();
                    break;

                case "KPIs":
                    frmKPIs _frmKPIs = new frmKPIs();
                    _frmKPIs.ShowDialog();
                    break;

                case "KPIs Entry":
                    frmKPIEntry _frmKPIEntry = new frmKPIEntry();
                    _frmKPIEntry.ShowDialog();
                    break;

                case "Absence Registration":
                    frmAbsenceRegistration _frmAbsenceRegistration = new frmAbsenceRegistration();
                    _frmAbsenceRegistration.ShowDialog();
                    break;

                case "UOM":
                    frmUOM _frmUOM = new frmUOM();
                    _frmUOM.ShowDialog();
                    break;

                case "Categories":
                    frmItemCategories _frmItemCategories = new frmItemCategories();
                    _frmItemCategories.ShowDialog();
                    break;

                case "Suppliers":
                    Suppliers _Suppliers = new Suppliers();
                    _Suppliers.ShowDialog();
                    break;

                case "Journal Entry":
                    frmJournalEntry _frmJournalEntry = new frmJournalEntry();
                    _frmJournalEntry.ShowDialog();
                    break;

                case "Ledgers":
                    frmLedger1 _frmLedger1 = new frmLedger1();
                    _frmLedger1.ShowDialog();
                    break;

                case "Item Master":
                    frmItems _frmItems = new frmItems();
                    _frmItems.ShowDialog();
                    break;

                case "Petty Cash":
                    frmPettyCash _frmPettyCash = new frmPettyCash();
                    _frmPettyCash.ShowDialog();
                    break;

                case "Cheque Books":
                    frmChequeBooks _frmChequeBooks = new frmChequeBooks();
                    _frmChequeBooks.ShowDialog();
                    break;

                case "Cashier Checkin":
                    frmCashierCheckin _frmCashierCheckin = new frmCashierCheckin();
                    _frmCashierCheckin.ShowDialog();
                    break;

                case "Price Bands":
                    frmPriceBands _frmPriceBands = new frmPriceBands();
                    _frmPriceBands.ShowDialog();
                    break;

                case "Cost/Price Revision":
                    frmCostPriceRevisions _frmCostPriceRevisions = new frmCostPriceRevisions();
                    _frmCostPriceRevisions.ShowDialog();
                    break;

                default:
                    break;
                }
            }
            else
            {
                e.Link.Item.Dispose();
                MessageBox.Show("You have insufficient rights to access this page", "Privilege Violation", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #7
0
        private void purchaseOrderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmPurchaseOrder frm = new frmPurchaseOrder();

            frm.ShowDialog();
        }