Пример #1
0
 /// <summary>
 /// On form closing
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmPurchaseInvoice_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (frmPurchaseInvoiceRegisterObj != null)
         {
             frmPurchaseInvoiceRegisterObj.Enabled = true;
             frmPurchaseInvoiceRegisterObj.GridFill();
             frmPurchaseInvoiceRegisterObj = null;
         }
         if (frmPurchaseReportObj != null)
         {
             frmPurchaseReportObj.Enabled = true;
             frmPurchaseReportObj.GridFill();
             frmPurchaseReportObj = null;
         }
         if (frmDayBookObj != null)
         {
             frmDayBookObj.Enabled = true;
             frmDayBookObj.dayBookGridFill();
             frmDayBookObj = null;
         }
         if (frmLedgerDetailsObj != null)
         {
             frmLedgerDetailsObj.Enabled = true;
             frmLedgerDetailsObj.LedgerDetailsView();
             frmLedgerDetailsObj = null;
         }
         if (objVoucherProduct != null)
         {
             objVoucherProduct.Enabled = true;
             objVoucherProduct.FillGrid();
             objVoucherProduct = null;
         }
         if (objVoucherSearch != null)
         {
             objVoucherSearch.Enabled = true;
             objVoucherSearch.GridFill();
             objVoucherSearch = null;
         }
         if (frmAgeingObj != null)
         {
             frmAgeingObj.Enabled = true;
             frmAgeingObj.FillGrid();
             frmAgeingObj = null;
         }
         if (vatReturnReportobj != null)
         {
             vatReturnReportobj.Enabled = true;
             vatReturnReportobj.GridFill();
             vatReturnReportobj = null;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PI67:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #2
0
 /// <summary>
 /// Function to call this form from frmVoucherSearch to view details and for updation 
 /// </summary>
 public void CallFromVoucherSearch(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         base.Show();
         objVoucherSearch = frm;
         decStockJournalMasterIdForEdit = decId;
         FillRegisterOrReport();
     }
     catch (Exception ex)
     {
         MessageBox.Show("SJ:12" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Form Closing. checking the other form is active or not
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmDeliveryNote_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (frmDayBookObj != null)
         {
             frmDayBookObj.Enabled = true;
             frmDayBookObj.dayBookGridFill();
             frmDayBookObj = null;
         }
         if (objVoucherSearch != null)
         {
             objVoucherSearch.Enabled = true;
             objVoucherSearch.GridFill();
             objVoucherSearch = null;
         }
         if (objVoucherProduct != null)
         {
             objVoucherProduct.Enabled = true;
             objVoucherProduct.FillGrid();
         }
         if (frmDeliveryNoteRegisterObj != null)
         {
             frmDeliveryNoteRegisterObj.Enabled = true;
             frmDeliveryNoteRegisterObj.GridFill();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("DN65:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to call form VoucherSearch For update or delete
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallThisFormFromVoucherSearch(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         base.Show();
         this.frmsearch = frm;
         btnSave.Text = "Update";
         btnDelete.Enabled = true;
         isEditMode = true;
         decMasterId = decId;
         FillFunction();
     }
     catch (Exception ex)
     {
         MessageBox.Show("CV:21" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        /// <summary>
        /// Function to call this form from frmVoucherSearch form to view voucher details
        /// </summary>
        /// <param name="frm"></param>
        /// <param name="decId"></param>
        public void CallFromVoucherSerach(frmVoucherSearch frm, decimal decId)
        {
            try
            {

                isEditMode = true;
                decIsEditModeMasterId = decId;
                base.Show();
                SalaryVoucherMasterSP SpMaster = new SalaryVoucherMasterSP();
                SalaryVoucherMasterInfo InfoMaster = new SalaryVoucherMasterInfo();
                VoucherTypeSP spVoucherType = new VoucherTypeSP();
                btnDelete.Enabled = true;
                btnSave.Text = "Update";
                InfoMaster = SpMaster.SalaryVoucherMasterView(decIsEditModeMasterId);
                strVoucherNoforEdit = InfoMaster.VoucherNo;
                strVoucherNo = InfoMaster.VoucherNo;
                txtVoucherNo.Text = InfoMaster.InvoiceNo;
                strInvoiceNo = InfoMaster.InvoiceNo;
                txtVoucherDate.Text = InfoMaster.Date.ToString("dd-MMMM-yyyy");
                string stra = Convert.ToDateTime(InfoMaster.Month.ToString()).ToString("MMM yyyy");
                dtpMonth.Value = Convert.ToDateTime(InfoMaster.Month.ToString("MMM yyyy"));
                txtNarration.Text = InfoMaster.Narration;
                lblTotalAmount.Text = InfoMaster.TotalAmount.ToString();
                decMonthlySuffixPrefixId = InfoMaster.SuffixPrefixId;
                decMonthlyVoucherTypeId = InfoMaster.VoucherTypeId;
                this.objVoucherSearch = frm;
                cmbCashOrBankAcc.SelectedValue = InfoMaster.LedgerId;
                isAutomatic = spVoucherType.CheckMethodOfVoucherNumbering(decMonthlyVoucherTypeId);
                if (isAutomatic)
                {
                    txtVoucherNo.Enabled = false;
                }
                else
                {
                    txtVoucherNo.Enabled = true;
                }
                dtpMonth.Enabled = false;
                GridFill(isEditMode);
            }
            catch (Exception ex)
            {
                MessageBox.Show("MSV2: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #6
0
 /// <summary>
 /// Clear button click, check the other form are opend or not
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnClear_Click(object sender, EventArgs e)
 {
     try
     {
         Clear();
         if (frmSalesinvoiceRegisterObj != null)
         {
             frmSalesinvoiceRegisterObj.Close();
             frmSalesinvoiceRegisterObj = null;
         }
         if (frmSalesReportObj != null)
         {
             frmSalesReportObj.Close();
             frmSalesReportObj = null;
         }
         if (frmDayBookObj != null)
         {
             frmDayBookObj.Close();
             frmDayBookObj = null;
         }
         if (frmAgeingObj != null)
         {
             frmAgeingObj.Close();
             frmAgeingObj = null;
         }
         if (objVoucherSearch != null)
         {
             objVoucherSearch.Close();
             objVoucherSearch = null;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SI: 117" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        /// <summary>
        /// Function to call this form from frmVoucherSearch to view details and for updation 
        /// </summary>
        /// <param name="frm"></param>
        /// <param name="decId"></param>
        public void CallThisFormFromVoucherSearch(frmVoucherSearch frm, decimal decId)
        {
            try
            {
                this.objVoucherSearch = frm;
                decMasterIdforEdit = decId;

                fillFunction();

            }
            catch (Exception ex)
            {
                MessageBox.Show("DSV7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #8
0
 /// <summary>
 /// Calls frmVoucherSearch form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void voucherSearchToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmVoucherSearch", "View"))
         {
             frmVoucherSearch objVoucherSearch = new frmVoucherSearch();
             frmVoucherSearch open = Application.OpenForms["frmVoucherSearch"] as frmVoucherSearch;
             if (open == null)
             {
                 objVoucherSearch.MdiParent = this;
                 objVoucherSearch.Show();
             }
             else
             {
                 open.Activate();
                 if (open.WindowState == FormWindowState.Minimized)
                 {
                     open.WindowState = FormWindowState.Normal;
                 }
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MDI 152: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to call this form from frmVoucherSearch to view details and for updation 
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallThisFormFromVoucherSearch(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         this._frmVoucherSearch = frm;
         decPaymentmasterId = decId;
         btnSave.Text = "Update";
         btnDelete.Enabled = true;
         FillFunction();
         this.Activate();
         this.BringToFront();
     }
     catch (Exception ex)
     {
         MessageBox.Show("PV7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #10
0
 /// <summary>
 /// Function to call this form from frmVoucherSearch to view details and for updation 
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallFromVoucherSearch(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         base.Show();
         objVoucherSearch = frm;
         decPDCClearanceEditId = decId;
         FillFunction();
     }
     catch (Exception ex)
     {
         MessageBox.Show("PC4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #11
0
 /// <summary>
 /// Load the form while calling from the voucherSearch in editmode
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallFromVoucherSerach(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         base.Show();
         objVoucherSearch = frm;
         decRejectionOutId = decId;
         FillRejectionOutReportForEdit();
     }
     catch (Exception ex)
     {
         MessageBox.Show("RO05:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #12
0
 /// <summary>
 /// Form closing event, checking the other opend form status
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmSalesReturn_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (objFromSalesReturnRegister != null)
         {
             objFromSalesReturnRegister.SalesReturnGrideFill();
             objFromSalesReturnRegister.Enabled = true;
         }
         if (objFromSalesReturnReport != null)
         {
             objFromSalesReturnReport.SalesReturnReportGrideFill();
             objFromSalesReturnReport.Enabled = true;
         }
         if (frmDayBookObj != null)
         {
             frmDayBookObj.Enabled = true;
             frmDayBookObj.dayBookGridFill();
             frmDayBookObj = null;
         }
         if (frmAgeingObj != null)
         {
             frmAgeingObj.Enabled = true;
             frmAgeingObj.FillGrid();
             frmAgeingObj = null;
         }
         if (frmLedgerDetailsObj != null)
         {
             frmLedgerDetailsObj.Enabled = true;
             frmLedgerDetailsObj.LedgerDetailsView();
             frmLedgerDetailsObj = null;
         }
         if (objVoucherSearch != null)
         {
             objVoucherSearch.Enabled = true;
             objVoucherSearch.GridFill();
             objVoucherSearch = null;
         }
         if (objVoucherProduct != null)
         {
             objVoucherProduct.Enabled = true;
             objVoucherProduct.FillGrid();
             objVoucherProduct = null;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SR80:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to call this form from frmVoucherSearch to view details and for updation 
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallFromVoucherSerach(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         base.Show();
         objVoucherSearch = frm;
         decRejectionInIdToEdit = decId;
         RejectionInview();
     }
     catch (Exception ex)
     {
         MessageBox.Show("RI:29" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        /// <summary>
        /// Event to clear RejectionIn Form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnClear_Click(object sender, EventArgs e)
        {
            try
            {
                ClearRejectionIn();

                if (frmRejectionInRegisterObj != null)
                {
                    frmRejectionInRegisterObj.Close();
                    frmRejectionInRegisterObj = null;
                }

                if (frmRejectionInReportObj != null)
                {
                    frmRejectionInReportObj.Close();
                    frmRejectionInReportObj = null;
                }
                if (frmVoucherSearchObj != null)
                {
                    frmVoucherSearchObj.Close();
                    frmVoucherSearchObj = null;
                }
                cmbDeliveryNoteNo.Visible = false;
                lblDeliverNoteNo.Visible = false;

            }
            catch (Exception ex)
            {
                MessageBox.Show("RI:49" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 /// <summary>
 /// Function to call from voucher search to fill selected Purchase order
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallFromVoucherSearch(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         base.Show();
         objVoucherSearch = frm;
         decPurchaseOrderMasterId = decId;
         FillRegisterOrReport(false);
     }
     catch (Exception ex)
     {
         MessageBox.Show("PO10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to call this form from frmVoucherSearch to view details and for updation
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallFromVoucherSearch(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         this.objfrmVoucherSearch = frm;
         btnSave.Text = "Update";
         btnDelete.Enabled = true;
         decMasterId = decId;
         FillFunction();
     }
     catch (Exception ex)
     {
         MessageBox.Show("PS:7" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #17
0
 /// <summary>
 /// Calls frmVoucherSearch form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void voucherSearchToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         frmVoucherSearch objVoucherSearch = new frmVoucherSearch();
         frmVoucherSearch open = Application.OpenForms["frmVoucherSearch"] as frmVoucherSearch;
         if (open == null)
         {
             objVoucherSearch.MdiParent = this;
             objVoucherSearch.Show();
         }
         else
         {
             open.Activate();
             if (open.WindowState == FormWindowState.Minimized)
             {
                 open.WindowState = FormWindowState.Normal;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MDI 152: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #18
0
        /// <summary>
        /// Clear button click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnClear_Click(object sender, EventArgs e)
        {
            try
            {
                ClearFunctions();
                if (objfrmSalesInvoiceRegister != null)
                {
                    objfrmSalesInvoiceRegister.Close();
                    objfrmSalesInvoiceRegister = null;
                }
                if (frmSalesReportObj != null)
                {
                    frmSalesReportObj.Close();
                    frmSalesReportObj = null;
                }
                if (frmDayBookObj != null)
                {
                    frmDayBookObj.Close();
                    frmDayBookObj = null;
                }
                if (frmAgeingObj != null)
                {
                    frmAgeingObj.Close();
                    frmAgeingObj = null;
                }
                if (objVoucherSearch != null)
                {
                    objVoucherSearch.Close();
                    objVoucherSearch = null;
                }
                if (frmledgerDetailsObj != null)
                {
                    frmledgerDetailsObj.Enabled = true;
                    frmledgerDetailsObj = null;
                }
                if (frmAgeingObj != null)
                {
                    frmAgeingObj.Enabled = true;
                    frmAgeingObj = null;
                }

                this.BringToFront();
            }
            catch (Exception ex)
            {
                MessageBox.Show("POS : 71" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #19
0
 /// <summary>
 /// Function to call this form from frmVoucherSearch to view details and for updation 
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallFromVoucherSearch(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         base.Show();
         this.objVoucherSearch = frm;
         decSalesInvoiceIdToEdit = decId;
         FillRegisterOrReport();
     }
     catch (Exception ex)
     {
         MessageBox.Show("SI: 16" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #20
0
 /// <summary>
 /// Function to call this form from frmVoucherSearch to view details and for updation 
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallFromVoucherSearch(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         base.Show();
         this.objVoucherSearch = frm;
         decSalesMasterId = decId;
         DetailsFillForEdit();
     }
     catch (Exception ex)
     {
         MessageBox.Show("POS : 53" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #21
0
        /// <summary>
        /// Function to load the form while calling from the vouchersearch
        /// </summary>
        /// <param name="frm"></param>
        /// <param name="decId"></param>
        public void CallThisFormFromVoucherSearch(frmVoucherSearch frm, decimal decId)
        {
            // Function to call form voucher Search
            try
            {
                this.objVoucherSearch = frm;
                decJournalMasterIdForEdit = decId;
                isEditMode = true;
                btnDelete.Enabled = true;
                FillFunction();

            }
            catch (Exception ex)
            {
                MessageBox.Show("JV5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #22
0
 /// <summary>
 /// Function to call from voucher search to fill selected material receipt
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallFromVoucherSerach(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         objVoucherSearch = frm;
         decPurchaseReturnMasterId = decId;
         FillRegisterOrReport();
     }
     catch (Exception ex)
     {
         MessageBox.Show("PR:62" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to call this form from frmVoucherSearch to view details and for updation 
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallThisFormFromVoucherSearch(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         this.objVoucherSearch = frm;
         decPDCReceivableEditId = decId;
         btnClear.Text = "New";
         btnSave.Text = "Update";
         btnDelete.Enabled = true;
         FillFunction();
         this.Activate();
     }
     catch (Exception ex)
     {
         MessageBox.Show("PR3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #24
0
 /// <summary>
 /// Function to call form Voucher Search, for  view Sales Quotation
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallFromVoucherSearch(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         base.Show();
         objVoucherSearch = frm;
         decSalesquotationMasterId = decId;
         FillRegisterOrReport();
     }
     catch (Exception ex)
     {
         MessageBox.Show("SQ:01" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #25
0
        /// <summary>
        /// on clear button click, clears the field
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnClear_Click(object sender, EventArgs e)
        {
            try
            {
                Clear();

                cmbCashOrBank.SelectedIndex = 0;
                cmbFinishedGoods.SelectedIndex = 0;
                btnTransfer.Enabled = false;
                if (decStockJournalMasterIdForEdit != 0)
                {
                    if (frmStockJournalRegisterObj != null)
                    {

                        frmStockJournalRegisterObj.Close();
                        frmStockJournalRegisterObj = null;
                    }
                    if (frmStockJournelReportObj != null)
                    {

                        frmStockJournelReportObj.Close();
                        frmStockJournelReportObj = null;
                    }
                    if (objVoucherSearch != null)
                    {
                        objVoucherSearch.Close();
                        objVoucherSearch = null;
                    }
                    if (frmDayBookObj != null)
                    {
                        frmDayBookObj.Close();
                        frmDayBookObj = null;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("SJ:78" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        /// <summary>
        /// Calls the corresponding voucher on click in Quick Launch menu
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn1_Click(object sender, EventArgs e)
        {
            this.SendToBack();
            Form frmObj = null;
            Form open = null;
            SettingsBll BllSettings = new SettingsBll();
            try
            {
                string str = ((Button)sender).Text;
                btnFocus.Focus();
                switch (str)
                {
                    case "Contra Voucher":
                        formMDI.MDIObj.ContraVoucherClick();
                        break;
                    case "Payment Voucher":
                        formMDI.MDIObj.PaymentVoucherClick();
                        break;
                    case "Receipt Voucher":
                        formMDI.MDIObj.ReceiptVoucherClick();
                        break;
                    case "Journal Voucher":
                        formMDI.MDIObj.JournalVoucherClick();
                        break;
                    case "Sales Invoice":
                        formMDI.MDIObj.SalesInvoiceClick();
                        break;
                    case "Purchase Invoice":
                        formMDI.MDIObj.PurchaseInvoiceClick();
                        break;
                    case "POS":
                        formMDI.MDIObj.POSClick();
                        break;
                    case "PDC Payable":
                        formMDI.MDIObj.PDCPayableClick();
                        break;
                    case "PDC Receivable":
                        formMDI.MDIObj.PDCReceivableClick();
                        break;
                    case "PDC Clearance":
                        formMDI.MDIObj.PDCClearenceClick();
                        break;
                    case "Bank Reconciliation":
                        frmObj = new frmBankReconciliation();
                        open = Application.OpenForms["frmBankReconciliation"] as frmBankReconciliation;
                        break;
                    case "Purchase Order":
                        formMDI.MDIObj.PurchaseOrderClick();
                        break;
                    case "Material Reciept":
                        formMDI.MDIObj.MaterialReceiptClick();
                        break;
                    case "Rejection Out":
                        formMDI.MDIObj.RejectionOutClick();
                        break;
                    case "Purchase Return":
                        formMDI.MDIObj.PurchaseReturnClick();
                        break;
                    case "Sales Quotation":
                        formMDI.MDIObj.SalesQuotationClick();
                        break;
                    case "Sales Order":
                        formMDI.MDIObj.SalesOrderClick();
                        break;
                    case "Delivery Note":
                        formMDI.MDIObj.DeliveryNoteClick();
                        break;
                    case "Rejection In":
                        formMDI.MDIObj.RejectionInClick();
                        break;
                    case "Sales Return":
                        formMDI.MDIObj.SalesReturnClick();
                        break;
                    case "Physical Stock":
                        formMDI.MDIObj.PhysicalStockClick();
                        break;
                    case "Service Voucher":
                        formMDI.MDIObj.ServiceVoucherClick();
                        break;
                    case "Credit Note":
                        formMDI.MDIObj.CreditNoteClick();
                        break;
                    case "Debit Note":
                        formMDI.MDIObj.DebitNoteClick();
                        break;
                    case "Stock Journal":
                        //frmObj = new frmStockJournal();
                        //open = Application.OpenForms["frmStockJournal"] as frmStockJournal;
                        formMDI.MDIObj.StockJournalClick();
                        break;
                    case "Bill Allocation":
                        frmObj = new frmBillallocation();
                        open = Application.OpenForms["frmBillallocation"] as frmBillallocation;
                        break;
                    case "Account Group":
                        frmObj = new frmAccountGroup();
                        open = Application.OpenForms["frmAccountGroup"] as frmAccountGroup;
                        break;
                    case "Account Ledger":
                        frmObj = new frmAccountLedger();
                        open = Application.OpenForms["frmAccountLedger"] as frmAccountLedger;
                        break;
                    case "Multiple Account Ledgers":
                        frmObj = new frmmultipleAccountLedger();
                        open = Application.OpenForms["frmmultipleAccountLedger"] as frmmultipleAccountLedger;
                        break;
                    case "Product Group":
                        frmObj = new frmProductGroup();
                        open = Application.OpenForms["frmProductGroup"] as frmProductGroup;
                        break;
                    case "Product Creation":
                        frmObj = new frmProductCreation();
                        open = Application.OpenForms["frmProductCreation"] as frmProductCreation;
                        break;
                    case "Multiple Product Creation":
                        frmObj = new frmMultipleProductCreation();
                        open = Application.OpenForms["frmMultipleProductCreation"] as frmMultipleProductCreation;
                        break;
                    case "Batch":
                        if (BllSettings.SettingsStatusCheck("AllowBatch") == "Yes")
                        {
                            frmObj = new frmBatch();
                            open = Application.OpenForms["frmBatch"] as frmBatch;
                        }
                        break;
                    case "Brand":
                        frmObj = new frmBrand();
                        open = Application.OpenForms["frmBrand"] as frmBrand;
                        break;
                    case "Model Number":
                        if (BllSettings.SettingsStatusCheck("AllowModelNo") == "Yes")
                        {
                            frmObj = new frmModalNo();
                            open = Application.OpenForms["frmModalNo"] as frmModalNo;
                        }
                        break;
                    case "Size":
                        if (BllSettings.SettingsStatusCheck("AllowSize") == "Yes")
                        {
                            frmObj = new frmSize();
                            open = Application.OpenForms["frmSize"] as frmSize;
                        }
                        break;
                    case "Unit":
                        frmObj = new frmUnit();
                        open = Application.OpenForms["frmUnit"] as frmUnit;
                        break;
                    case "Godown":
                        if (BllSettings.SettingsStatusCheck("AllowGodown") == "Yes")
                        {
                            frmObj = new frmGodown();
                            open = Application.OpenForms["frmGodown"] as frmGodown;
                        }
                        break;
                    case "Rack":
                        if (BllSettings.SettingsStatusCheck("AllowRack") == "Yes")
                        {
                            frmObj = new frmRack();
                            open = Application.OpenForms["frmRack"] as frmRack;
                        }
                        break;
                    case "Pricing Level":
                        frmObj = new frmPricingLevel();
                        open = Application.OpenForms["frmPricingLevel"] as frmPricingLevel;
                        break;
                    case "Price List":
                        frmObj = new frmPriceList();
                        open = Application.OpenForms["frmPriceList"] as frmPriceList;
                        break;
                    case "Standard Rate":
                        frmObj = new frmStandardRate();
                        open = Application.OpenForms["frmStandardRate"] as frmStandardRate;
                        break;
                    case "Tax":
                        if (BllSettings.SettingsStatusCheck("Tax") == "Yes")
                        {
                            frmObj = new frmTax();
                            open = Application.OpenForms["frmTax"] as frmTax;
                        }
                        break;
                    case "Currency":
                        if (BllSettings.SettingsStatusCheck("MultiCurrency") == "Yes")
                        {
                            frmObj = new frmCurrency();
                            open = Application.OpenForms["frmCurrency"] as frmCurrency;
                        }
                        break;
                    case "Exchange Rate":
                        frmObj = new frmExchangeRate();
                        open = Application.OpenForms["frmExchangeRate"] as frmExchangeRate;
                        break;
                    case "Service Category":
                        frmObj = new frmServiceCategory();
                        open = Application.OpenForms["frmServiceCategory"] as frmServiceCategory;
                        break;
                    case "Services":
                        frmObj = new frmServices();
                        open = Application.OpenForms["frmServices"] as frmServices;
                        break;
                    case "Voucher Type":
                        frmObj = new frmVoucherType();
                        open = Application.OpenForms["frmVoucherType"] as frmVoucherType;
                        break;
                    case "Area":
                        frmObj = new frmArea();
                        open = Application.OpenForms["frmArea"] as frmArea;
                        break;
                    case "Route":
                        frmObj = new frmRoute();
                        open = Application.OpenForms["frmRoute"] as frmRoute;
                        break;
                    case "Counter":
                        frmObj = new frmCounter();
                        open = Application.OpenForms["frmCounter"] as frmCounter;
                        break;
                    case "Product Register":
                        frmObj = new frmProductRegister();
                        open = Application.OpenForms["frmProductRegister"] as frmProductRegister;
                        break;
                    case "Salesman":
                        frmObj = new frmSalesman();
                        open = Application.OpenForms["frmSalesman"] as frmSalesman;
                        break;
                    case "Contra Register":
                        frmObj = new frmContraRegister();
                        open = Application.OpenForms["frmContraRegister"] as frmContraRegister;
                        break;
                    case "Payment Register":
                        frmObj = new frmPaymentRegister();
                        open = Application.OpenForms["frmPaymentRegister"] as frmPaymentRegister;
                        break;
                    case "Receipt Register":
                        frmObj = new frmReceiptRegister();
                        open = Application.OpenForms["frmReceiptRegister"] as frmReceiptRegister;
                        break;
                    case "Journal Register":
                        frmObj = new frmJournalRegister();
                        open = Application.OpenForms["frmJournalRegister"] as frmJournalRegister;
                        break;
                    case "PDC Payable Register":
                        frmObj = new frmPDCPayableRegister();
                        open = Application.OpenForms["frmPDCPayableRegister"] as frmPDCPayableRegister;
                        break;
                    case "PDC Receivable Register":
                        frmObj = new frmPDCReceivableRegister();
                        open = Application.OpenForms["frmPDCReceivableRegister"] as frmPDCReceivableRegister;
                        break;
                    case "PDC Clearance Register":
                        frmObj = new frmPdcClearanceRegister();
                        open = Application.OpenForms["frmPdcClearanceRegister"] as frmPdcClearanceRegister;
                        break;
                    case "Purchase Order Register":
                        frmObj = new frmPurchaseOrderRegister();
                        open = Application.OpenForms["frmPurchaseOrderRegister"] as frmPurchaseOrderRegister;
                        break;
                    case "Material Receipt Register":
                        frmObj = new frmMaterialReceiptRegister();
                        open = Application.OpenForms["frmMaterialReceiptRegister"] as frmMaterialReceiptRegister;
                        break;
                    case "Rejection Out Register":
                        frmObj = new frmRejectionOutRegister();
                        open = Application.OpenForms["frmRejectionOutRegister"] as frmRejectionOutRegister;
                        break;
                    case "Purchase Invoice Register":
                        frmObj = new frmPurchaseInvoiceRegister();
                        open = Application.OpenForms["frmPurchaseInvoiceRegister"] as frmPurchaseInvoiceRegister;
                        break;
                    case "Purchase Return Register":
                        frmObj = new frmPurchaseReturnRegister();
                        open = Application.OpenForms["frmPurchaseReturnRegister"] as frmPurchaseReturnRegister;
                        break;
                    case "Sales Quotation Register":
                        frmObj = new frmSalesQuotationRegister();
                        open = Application.OpenForms["frmSalesQuotationRegister"] as frmSalesQuotationRegister;
                        break;
                    case "Sales Order Register":
                        frmObj = new frmSalesOrderRegister();
                        open = Application.OpenForms["frmSalesOrderRegister"] as frmSalesOrderRegister;
                        break;
                    case "Delivery Note Register":
                        frmObj = new frmDeliveryNoteRegister();
                        open = Application.OpenForms["frmDeliveryNoteRegister"] as frmDeliveryNoteRegister;
                        break;
                    case "Rejection In Register":
                        frmObj = new frmRejectionInRegister();
                        open = Application.OpenForms["frmRejectionInRegister"] as frmRejectionInRegister;
                        break;
                    case "Sales Invoice Register":
                        frmObj = new frmSalesInvoiceRegister();
                        open = Application.OpenForms["frmSalesInvoiceRegister"] as frmSalesInvoiceRegister;
                        break;
                    case "Sales Return Register":
                        frmObj = new frmSalesReturnRegister();
                        open = Application.OpenForms["frmSalesReturnRegister"] as frmSalesReturnRegister;
                        break;
                    case "Physical Stock Register":
                        frmObj = new frmPhysicalStockRegister();
                        open = Application.OpenForms["frmPhysicalStockRegister"] as frmPhysicalStockRegister;
                        break;
                    case "Service Voucher Register":
                        frmObj = new frmServiceVoucherRegister();
                        open = Application.OpenForms["frmServiceVoucherRegister"] as frmServiceVoucherRegister;
                        break;
                    case "Credit Note Register":
                        frmObj = new frmCreditNoteRegister();
                        open = Application.OpenForms["frmCreditNoteRegister"] as frmCreditNoteRegister;
                        break;
                    case "Debit Note Register":
                        frmObj = new frmDebitNoteRegister();
                        open = Application.OpenForms["frmDebitNoteRegister"] as frmDebitNoteRegister;
                        break;
                    case "Stock Journal Register":
                        frmObj = new frmStockJournalRegister();
                        open = Application.OpenForms["frmStockJournalRegister"] as frmStockJournalRegister;
                        break;
                    case "Designation":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmDesignation();
                            open = Application.OpenForms["frmDesignation"] as frmDesignation;
                        }
                        break;
                    case "Pay Head":
                        {
                            frmObj = new frmPayHead();
                            open = Application.OpenForms["frmPayHead"] as frmPayHead;
                        }
                        break;
                    case "Salary Package Creation":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmSalaryPackageCreation();
                            open = Application.OpenForms["frmSalaryPackageCreation"] as frmSalaryPackageCreation;
                        }
                        break;
                    case "Salary Package Register":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmSalaryPackageRegister();
                            open = Application.OpenForms["frmSalaryPackageRegister"] as frmSalaryPackageRegister;
                        }
                        break;
                    case "Employee Creation":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmEmployeeCreation();
                            open = Application.OpenForms["frmEmployeeCreation"] as frmEmployeeCreation;
                        }
                        break;
                    case "Employee Register":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmEmployeeRegister();
                            open = Application.OpenForms["frmEmployeeRegister"] as frmEmployeeRegister;
                        }
                        break;
                    case "Holiday Settings":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmHolydaySettings();
                            open = Application.OpenForms["frmHolydaySettings"] as frmHolydaySettings;
                        }
                        break;
                    case "Monthly Salary Settings":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmMonthlySalarySettings();
                            open = Application.OpenForms["frmMonthlySalarySettings"] as frmMonthlySalarySettings;
                        }
                        break;
                    case "Attendance":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmAttendance();
                            open = Application.OpenForms["frmAttendance"] as frmAttendance;
                        }
                        break;
                    case "Advance Payment":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmAdvancePayment();
                            open = Application.OpenForms["frmAdvancePayment"] as frmAdvancePayment;
                        }
                        break;
                    case "Advance Register":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmAdvanceRegister();
                            open = Application.OpenForms["frmAdvanceRegister"] as frmAdvanceRegister;
                        }
                        break;
                    case "Bonus Deduction":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmBonusDeduction();
                            open = Application.OpenForms["frmBonusDeduction"] as frmBonusDeduction;
                        }
                        break;
                    case "Bonus Deduction Register":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmBonusDeductionRegister();
                            open = Application.OpenForms["frmBonusDeductionRegister"] as frmBonusDeductionRegister;
                        }
                        break;
                    case "Monthly Salary Voucher":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmMonthlySalaryVoucher();
                            open = Application.OpenForms["frmMonthlySalaryVoucher"] as frmMonthlySalaryVoucher;
                        }
                        break;
                    case "Monthly Salary Register":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmMonthlySalaryRegister();
                            open = Application.OpenForms["frmMonthlySalaryRegister"] as frmMonthlySalaryRegister;
                        }
                        break;
                    case "Daily Salary Voucher":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmDailySalaryVoucher();
                            open = Application.OpenForms["frmDailySalaryVoucher"] as frmDailySalaryVoucher;
                        }
                        break;
                    case "Daily Salary Register":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmDailySalaryRegister();
                            open = Application.OpenForms["frmDailySalaryRegister"] as frmDailySalaryRegister;
                        }
                        break;
                    case "Pay Slip":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmPaySlip();
                            open = Application.OpenForms["frmPaySlip"] as frmPaySlip;
                        }
                        break;
                    case "Budget":
                        if (BllSettings.SettingsStatusCheck("Budget") == "Yes")
                        {
                            frmObj = new frmBudget();
                            open = Application.OpenForms["frmBudget"] as frmBudget;
                        }
                        break;
                    case "Budget Variance":
                        if (BllSettings.SettingsStatusCheck("Budget") == "Yes")
                        {
                            frmObj = new frmBudgetVariance();
                            open = Application.OpenForms["frmBudgetVariance"] as frmBudgetVariance;
                        }
                        break;
                    case "Change Current Date":
                        frmObj = new frmChangeCurrentDate();
                        open = Application.OpenForms["frmChangeCurrentDate"] as frmChangeCurrentDate;
                        break;
                    case "Settings":
                        frmObj = new frmSettings();
                        open = Application.OpenForms["frmSettings"] as frmSettings;
                        break;
                    case "Role":
                        frmObj = new frmRole();
                        open = Application.OpenForms["frmRole"] as frmRole;
                        break;
                    case "Role Privilege Settings":
                        frmObj = new frmRolePrivilegeSettings();
                        open = Application.OpenForms["frmRolePrivilegeSettings"] as frmRolePrivilegeSettings;
                        break;
                    case "User Creation":
                        frmObj = new frmUserCreation();
                        open = Application.OpenForms["frmUserCreation"] as frmUserCreation;
                        break;
                    case "Change Password":
                        frmObj = new frmChangePassword();
                        open = Application.OpenForms["frmChangePassword"] as frmChangePassword;
                        break;
                    case "New Financial Year":
                        frmObj = new frmNewFinancialYear();
                        open = Application.OpenForms["frmNewFinancialYear"] as frmNewFinancialYear;
                        break;
                    case "Change Financial Year":
                        frmObj = new frmChangeFinancialYear();
                        open = Application.OpenForms["frmChangeFinancialYear"] as frmChangeFinancialYear;
                        break;
                    case "Barcode Settings":
                        frmObj = new frmBarcodeSettings();
                        open = Application.OpenForms["frmBarcodeSettings"] as frmBarcodeSettings;
                        break;
                    case "Barcode Printing":
                        frmObj = new frmBarcodePrinting();
                        open = Application.OpenForms["frmBarcodePrinting"] as frmBarcodePrinting;
                        break;
                    case "Suffix Prefix Settings":
                        frmObj = new frmSuffixPrefixSettings();
                        open = Application.OpenForms["frmSuffixPrefixSettings"] as frmSuffixPrefixSettings;
                        break;
                    case "Change Product Tax":
                        frmObj = new frmChangeProductTax();
                        open = Application.OpenForms["frmChangeProductTax"] as frmChangeProductTax;
                        break;
                    case "Product Search":
                        frmObj = new frmProductSearch();
                        open = Application.OpenForms["frmProductSearch"] as frmProductSearch;
                        break;
                    case "Voucher Search":
                        frmObj = new frmVoucherSearch();
                        open = Application.OpenForms["frmVoucherSearch"] as frmVoucherSearch;
                        break;
                    case "Voucher Wise Product Search":
                        frmObj = new frmVoucherWiseProductSearch();
                        open = Application.OpenForms["frmVoucherWiseProductSearch"] as frmVoucherWiseProductSearch;
                        break;
                    case "Personal Reminder":
                        frmObj = new frmPersonalReminder();
                        open = Application.OpenForms["frmPersonalReminder"] as frmPersonalReminder;
                        break;
                    case "Overdue Purchase Order":
                        frmObj = new frmOverduePurchaseOrder();
                        open = Application.OpenForms["frmOverduePurchaseOrder"] as frmOverduePurchaseOrder;
                        break;
                    case "Overdue Sales Order":
                        frmObj = new frmOverdueSalesOrder();
                        open = Application.OpenForms["frmOverdueSalesOrder"] as frmOverdueSalesOrder;
                        break;
                    case "Short Expiry":
                        frmObj = new frmShortExpiry();
                        open = Application.OpenForms["frmShortExpiry"] as frmShortExpiry;
                        break;
                    case "Stock":
                        frmObj = new frmStock();
                        open = Application.OpenForms["frmStock"] as frmStock;
                        break;
                    case "Trial Balance":
                        frmObj = new frmTrialBalance();
                        open = Application.OpenForms["frmTrialBalance"] as frmTrialBalance;
                        break;
                    case "Balance Sheet":
                        frmObj = new frmBalanceSheet();
                        open = Application.OpenForms["frmBalanceSheet"] as frmBalanceSheet;
                        break;
                    case "Profit and Loss":
                        frmObj = new frmProfitAndLoss();
                        open = Application.OpenForms["frmProfitAndLoss"] as frmProfitAndLoss;
                        break;
                    case "Cash Flow":
                        frmObj = new frmCashFlow();
                        open = Application.OpenForms["frmCashFlow"] as frmCashFlow;
                        break;
                    case "Fund Flow":
                        frmObj = new frmFundFlow();
                        open = Application.OpenForms["frmFundFlow"] as frmFundFlow;
                        break;
                    case "Chart of Account":
                        frmObj = new frmChartOfAccount();
                        open = Application.OpenForms["frmChartOfAccount"] as frmChartOfAccount;
                        break;
                    case "Contra Report":
                        frmObj = new frmContraReport();
                        open = Application.OpenForms["frmContraReport"] as frmContraReport;
                        break;
                    case "Payment Report":
                        frmObj = new frmPaymentReport();
                        open = Application.OpenForms["frmPaymentReport"] as frmPaymentReport;
                        break;
                    case "Receipt Report":
                        frmObj = new frmReceiptReport();
                        open = Application.OpenForms["frmReceiptReport"] as frmReceiptReport;
                        break;
                    case "Journal Report":
                        frmObj = new frmJournalReport();
                        open = Application.OpenForms["frmJournalReport"] as frmJournalReport;
                        break;
                    case "PDC Payable Report":
                        frmObj = new frmPDCPayableReport();
                        open = Application.OpenForms["frmPDCPayableReport"] as frmPDCPayableReport;
                        break;
                    case "PDC Receivable Report":
                        frmObj = new frmPDCRecievableReport();
                        open = Application.OpenForms["frmPDCRecievableReport"] as frmPDCRecievableReport;
                        break;
                    case "PDC Clearance Report":
                        frmObj = new frmPDCClearanceReport();
                        open = Application.OpenForms["frmPDCClearanceReport"] as frmPDCClearanceReport;
                        break;
                    case "Purchase Order Report":
                        frmObj = new frmPurchaseOrderReport();
                        open = Application.OpenForms["frmPurchaseOrderReport"] as frmPurchaseOrderReport;
                        break;
                    case "Material Receipt Report":
                        frmObj = new frmMaterialReceiptReport();
                        open = Application.OpenForms["frmMaterialReceiptReport"] as frmMaterialReceiptReport;
                        break;
                    case "Rejection Out Report":
                        frmObj = new frmRejectionOutReport();
                        open = Application.OpenForms["frmRejectionOutReport"] as frmRejectionOutReport;
                        break;
                    case "Purchase Invoice Report":
                        frmObj = new frmPurchaseReport();
                        open = Application.OpenForms["frmPurchaseReport"] as frmPurchaseReport;
                        break;
                    case "Purchase Return Report":
                        frmObj = new frmPurchaseReturnReport();
                        open = Application.OpenForms["frmPurchaseReturnReport"] as frmPurchaseReturnReport;
                        break;
                    case "Sales Quotation Report":
                        frmObj = new frmSalesQuotationReport();
                        open = Application.OpenForms["frmSalesQuotationReport"] as frmSalesQuotationReport;
                        break;
                    case "Sales Order Report":
                        frmObj = new frmSalesOrderReport();
                        open = Application.OpenForms["frmSalesOrderReport"] as frmSalesOrderReport;
                        break;
                    case "Delivery Note Report":
                        frmObj = new frmDeliveryNoteReport();
                        open = Application.OpenForms["frmDeliveryNoteReport"] as frmDeliveryNoteReport;
                        break;
                    case "Rejection In Report":
                        frmObj = new frmRejectionInReport();
                        open = Application.OpenForms["frmRejectionInReport"] as frmRejectionInReport;
                        break;
                    case "Sales Invoice Report":
                        frmObj = new frmSalesReport();
                        open = Application.OpenForms["frmSalesReport"] as frmSalesReport;
                        break;
                    case "Sales Return Report":
                        frmObj = new frmSalesReturnReport();
                        open = Application.OpenForms["frmSalesReturnReport"] as frmSalesReturnReport;
                        break;
                    case "Physical Stock Report":
                        frmObj = new frmPhysicalStockReport();
                        open = Application.OpenForms["frmPhysicalStockReport"] as frmPhysicalStockReport;
                        break;
                    case "Service Report":
                        frmObj = new frmServiceReport();
                        open = Application.OpenForms["frmServiceReport"] as frmServiceReport;
                        break;
                    case "Credit Note Report":
                        frmObj = new frmCreditNoteReport();
                        open = Application.OpenForms["frmCreditNoteReport"] as frmCreditNoteReport;
                        break;
                    case "Debit Note Report":
                        frmObj = new frmDebitNoteReport();
                        open = Application.OpenForms["frmDebitNoteReport"] as frmDebitNoteReport;
                        break;
                    case "Stock Journal Report":
                        frmObj = new frmStockJournelReport();
                        open = Application.OpenForms["frmStockJournelReport"] as frmStockJournelReport;
                        break;
                    case "Employee Report":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmEmployeeReport();
                            open = Application.OpenForms["frmEmployeeReport"] as frmEmployeeReport;
                        }
                        break;
                    case "Daily Attendance Report":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmDailyAttendanceReport();
                            open = Application.OpenForms["frmDailyAttendanceReport"] as frmDailyAttendanceReport;
                        }
                        break;
                    case "Monthly Attendance Report":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmMonthlyAttendanceReport();
                            open = Application.OpenForms["frmMonthlyAttendanceReport"] as frmMonthlyAttendanceReport;
                        }
                        break;
                    case "Daily Salary Report":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmDailySalaryReport();
                            open = Application.OpenForms["frmDailySalaryReport"] as frmDailySalaryReport;
                        }
                        break;
                    case "Monthly Salary Report":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmMonthlySalaryReport();
                            open = Application.OpenForms["frmMonthlySalaryReport"] as frmMonthlySalaryReport;
                        }
                        break;
                    case "Payhead Report":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmPayHeadReport();
                            open = Application.OpenForms["frmPayHeadReport"] as frmPayHeadReport;
                        }
                        break;
                    case "Salary Package Report":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmSalaryPackageReport();
                            open = Application.OpenForms["frmSalaryPackageReport"] as frmSalaryPackageReport;
                        }
                        break;
                    case "Advance Payment Report":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmAdvancePaymentReport();
                            open = Application.OpenForms["frmAdvancePaymentReport"] as frmAdvancePaymentReport;
                        }
                        break;
                    case "Bonus Deduction Report":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmBonusDeductionReport();
                            open = Application.OpenForms["frmBonusDeductionReport"] as frmBonusDeductionReport;
                        }
                        break;
                    case "Employee Address Book Report":
                        if (BllSettings.SettingsStatusCheck("Payroll") == "Yes")
                        {
                            frmObj = new frmEmployeeAddressBook();
                            open = Application.OpenForms["frmEmployeeAddressBook"] as frmEmployeeAddressBook;
                        }
                        break;
                    case "Day Book":
                        frmObj = new frmDayBook();
                        open = Application.OpenForms["frmDayBook"] as frmDayBook;
                        break;
                    case "Cash/Bank Book":
                        frmObj = new frmCashBankBookReport();
                        open = Application.OpenForms["frmCashBankBookReport"] as frmCashBankBookReport;
                        break;
                    case "Account Groupwise Report":
                        frmObj = new frmAccountGroupwiseReport();
                        open = Application.OpenForms["frmAccountGroupwiseReport"] as frmAccountGroupwiseReport;
                        break;
                    case "Account Ledger Report":
                        frmObj = new frmAccountLedgerReport();
                        open = Application.OpenForms["frmAccountLedgerReport"] as frmAccountLedgerReport;
                        break;
                    case "Outstanding Report":
                        frmObj = new frmOutstandingReport();
                        open = Application.OpenForms["frmOutstandingReport"] as frmOutstandingReport;
                        break;
                    case "Ageing Report":
                        frmObj = new frmAgeingReport();
                        open = Application.OpenForms["frmAgeingReport"] as frmAgeingReport;
                        break;
                    case "Party's Address Book":
                        frmObj = new frmPartyAddressBook();
                        open = Application.OpenForms["frmPartyAddressBook"] as frmPartyAddressBook;
                        break;
                    case "Stock Report":
                        frmObj = new frmStockReport();
                        open = Application.OpenForms["frmStockReport"] as frmStockReport;
                        break;
                    case "Short Expiry Report":
                        frmObj = new frmShortExpiryReport();
                        open = Application.OpenForms["frmShortExpiryReport"] as frmShortExpiryReport;
                        break;
                    case "Product Statistics":
                        frmObj = new frmProductStatistics();
                        open = Application.OpenForms["frmProductStatistics"] as frmProductStatistics;
                        break;
                    case "Price List Report":
                        frmObj = new frmPriceListReport();
                        open = Application.OpenForms["frmPriceListReport"] as frmPriceListReport;
                        break;
                    case "Tax Report":
                        frmObj = new frmTaxReport();
                        open = Application.OpenForms["frmTaxReport"] as frmTaxReport;
                        break;
                    case "VAT Report":
                        frmObj = new frmVatReturnReport();
                        open = Application.OpenForms["frmVatReturnReport"] as frmVatReturnReport;
                        break;
                    case "Cheque Report":
                        frmObj = new frmChequeReport();
                        open = Application.OpenForms["frmChequeReport"] as frmChequeReport;
                        break;
                    case "Free Sale Report":
                        frmObj = new frmFreeSaleReport();
                        open = Application.OpenForms["frmFreeSaleReport"] as frmFreeSaleReport;
                        break;
                    case "Product Vs Batch Report":
                        frmObj = new frmProductVsBatchReport();
                        open = Application.OpenForms["frmProductVsBatchReport"] as frmProductVsBatchReport;
                        break;

                    case "Customer":
                        frmObj = new frmCustomer();
                        open = Application.OpenForms["frmCustomer"] as frmCustomer;
                        break;

                    case "Supplier":
                        frmObj = new frmSupplier();
                        open = Application.OpenForms["frmSupplier"] as frmSupplier;
                        break;
                }
                if (frmObj != null)
                {
                    if (open == null)
                    {
                        frmObj.MdiParent = formMDI.MDIObj;
                        frmObj.Show();
                    }
                    else
                    {
                        open.Activate();
                        if (open.WindowState == FormWindowState.Minimized)
                        {
                            open.WindowState = FormWindowState.Normal;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("QL:4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 /// <summary>
 /// Function to call this form from frmVoucherSearch to view details and for updation 
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decId"></param>
 public void CallFromVoucherSerach(frmVoucherSearch frm, decimal decId)
 {
     try
     {
         base.Show();
         objVoucherSearch = frm;
         decDelivryNoteIdToEdit = decId;
         FillRegisterOrReport();
     }
     catch (Exception ex)
     {
         MessageBox.Show("DN10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Clear button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnClear_Click(object sender, EventArgs e)
 {
     try
     {
         Clear();
         if (frmDayBookObj != null)
         {
             frmDayBookObj.Close();
             frmDayBookObj = null;
         }
         if (frmLedgerPopupObj != null)
         {
             frmLedgerPopupObj.Close();
             frmLedgerPopupObj = null;
         }
         if (frmProductSearchPopupObj != null)
         {
             frmProductSearchPopupObj.Close();
             frmProductSearchPopupObj = null;
         }
         if (frmPurchaseOrderRegisterObj != null)
         {
             frmPurchaseOrderRegisterObj.Close();
             frmPurchaseOrderRegisterObj = null;
         }
         if (frmPurchaseOrderReportObj != null)
         {
             frmPurchaseOrderReportObj.Close();
             frmPurchaseOrderReportObj = null;
         }
         if (objVoucherSearch != null)
         {
             objVoucherSearch.Close();
             objVoucherSearch = null;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PO50:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        /// <summary>
        /// Function to call this form from frmVoucherSearch to view details and for updation
        /// </summary>
        /// <param name="frm"></param>
        /// <param name="decId"></param>
        public void CallFromVoucherSerach(frmVoucherSearch frm, decimal decId)
        {
            try
            {

                base.Show();
                objVoucherSearch = frm;
                decMasterId = decId;
                btnDelete.Enabled = true;
                FillFunction();
                btnSave.Text = "Update";
                isEditMode = true;
                if (!txtVoucherDate.ReadOnly)
                {
                    txtVoucherDate.Focus();
                    txtVoucherDate.SelectionStart = 0;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("SV 14 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #30
0
        /// <summary>
        /// Calls the corresponding voucher on click in Quick Launch menu
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn1_Click(object sender, EventArgs e)
        {
            this.SendToBack();
            Form       frmObj     = null;
            Form       open       = null;
            SettingsSP spSettings = new SettingsSP();

            try
            {
                string str = ((Button)sender).Text;
                btnFocus.Focus();
                switch (str)
                {
                case "Contra Voucher":
                    formMDI.MDIObj.ContraVoucherClick();
                    break;

                case "Payment Voucher":
                    formMDI.MDIObj.PaymentVoucherClick();
                    break;

                case "Receipt Voucher":
                    formMDI.MDIObj.ReceiptVoucherClick();
                    break;

                case "Journal Voucher":
                    formMDI.MDIObj.JournalVoucherClick();
                    break;

                case "Sales Invoice":
                    formMDI.MDIObj.SalesInvoiceClick();
                    break;

                case "Purchase Invoice":
                    formMDI.MDIObj.PurchaseInvoiceClick();
                    break;

                case "POS":
                    formMDI.MDIObj.POSClick();
                    break;

                case "PDC Payable":
                    formMDI.MDIObj.PDCPayableClick();
                    break;

                case "PDC Receivable":
                    formMDI.MDIObj.PDCReceivableClick();
                    break;

                case "PDC Clearance":
                    formMDI.MDIObj.PDCClearenceClick();
                    break;

                case "Bank Reconciliation":
                    frmObj = new frmBankReconciliation();
                    open   = Application.OpenForms["frmBankReconciliation"] as frmBankReconciliation;
                    break;

                case "Purchase Order":
                    formMDI.MDIObj.PurchaseOrderClick();
                    break;

                case "Material Reciept":
                    formMDI.MDIObj.MaterialReceiptClick();
                    break;

                case "Rejection Out":
                    formMDI.MDIObj.RejectionOutClick();
                    break;

                case "Purchase Return":
                    formMDI.MDIObj.PurchaseReturnClick();
                    break;

                case "Sales Quotation":
                    formMDI.MDIObj.SalesQuotationClick();
                    break;

                case "Sales Order":
                    formMDI.MDIObj.SalesOrderClick();
                    break;

                case "Delivery Note":
                    formMDI.MDIObj.DeliveryNoteClick();
                    break;

                case "Rejection In":
                    formMDI.MDIObj.RejectionInClick();
                    break;

                case "Sales Return":
                    formMDI.MDIObj.SalesReturnClick();
                    break;

                case "Physical Stock":
                    formMDI.MDIObj.PhysicalStockClick();
                    break;

                case "Service Voucher":
                    formMDI.MDIObj.ServiceVoucherClick();
                    break;

                case "Credit Note":
                    formMDI.MDIObj.CreditNoteClick();
                    break;

                case "Debit Note":
                    formMDI.MDIObj.DebitNoteClick();
                    break;

                case "Stock Journal":
                    //frmObj = new frmStockJournal();
                    //open = Application.OpenForms["frmStockJournal"] as frmStockJournal;
                    formMDI.MDIObj.StockJournalClick();
                    break;

                case "Bill Allocation":
                    frmObj = new frmBillallocation();
                    open   = Application.OpenForms["frmBillallocation"] as frmBillallocation;
                    break;

                case "Account Group":
                    frmObj = new frmAccountGroup();
                    open   = Application.OpenForms["frmAccountGroup"] as frmAccountGroup;
                    break;

                case "Account Ledger":
                    frmObj = new frmAccountLedger();
                    open   = Application.OpenForms["frmAccountLedger"] as frmAccountLedger;
                    break;

                case "Multiple Account Ledgers":
                    frmObj = new frmmultipleAccountLedger();
                    open   = Application.OpenForms["frmmultipleAccountLedger"] as frmmultipleAccountLedger;
                    break;

                case "Product Group":
                    frmObj = new frmProductGroup();
                    open   = Application.OpenForms["frmProductGroup"] as frmProductGroup;
                    break;

                case "Product Creation":
                    frmObj = new frmProductCreation();
                    open   = Application.OpenForms["frmProductCreation"] as frmProductCreation;
                    break;

                case "Multiple Product Creation":
                    frmObj = new frmMultipleProductCreation();
                    open   = Application.OpenForms["frmMultipleProductCreation"] as frmMultipleProductCreation;
                    break;

                case "Batch":
                    if (spSettings.SettingsStatusCheck("AllowBatch") == "Yes")
                    {
                        frmObj = new frmBatch();
                        open   = Application.OpenForms["frmBatch"] as frmBatch;
                    }
                    break;

                case "Brand":
                    frmObj = new frmBrand();
                    open   = Application.OpenForms["frmBrand"] as frmBrand;
                    break;

                case "Model Number":
                    if (spSettings.SettingsStatusCheck("AllowModelNo") == "Yes")
                    {
                        frmObj = new frmModalNo();
                        open   = Application.OpenForms["frmModalNo"] as frmModalNo;
                    }
                    break;

                case "Size":
                    if (spSettings.SettingsStatusCheck("AllowSize") == "Yes")
                    {
                        frmObj = new frmSize();
                        open   = Application.OpenForms["frmSize"] as frmSize;
                    }
                    break;

                case "Unit":
                    frmObj = new frmUnit();
                    open   = Application.OpenForms["frmUnit"] as frmUnit;
                    break;

                case "Godown":
                    if (spSettings.SettingsStatusCheck("AllowGodown") == "Yes")
                    {
                        frmObj = new frmGodown();
                        open   = Application.OpenForms["frmGodown"] as frmGodown;
                    }
                    break;

                case "Rack":
                    if (spSettings.SettingsStatusCheck("AllowRack") == "Yes")
                    {
                        frmObj = new frmRack();
                        open   = Application.OpenForms["frmRack"] as frmRack;
                    }
                    break;

                case "Pricing Level":
                    frmObj = new frmPricingLevel();
                    open   = Application.OpenForms["frmPricingLevel"] as frmPricingLevel;
                    break;

                case "Price List":
                    frmObj = new frmPriceList();
                    open   = Application.OpenForms["frmPriceList"] as frmPriceList;
                    break;

                case "Standard Rate":
                    frmObj = new frmStandardRate();
                    open   = Application.OpenForms["frmStandardRate"] as frmStandardRate;
                    break;

                case "Tax":
                    if (spSettings.SettingsStatusCheck("Tax") == "Yes")
                    {
                        frmObj = new frmTax();
                        open   = Application.OpenForms["frmTax"] as frmTax;
                    }
                    break;

                case "Currency":
                    if (spSettings.SettingsStatusCheck("MultiCurrency") == "Yes")
                    {
                        frmObj = new frmCurrency();
                        open   = Application.OpenForms["frmCurrency"] as frmCurrency;
                    }
                    break;

                case "Exchange Rate":
                    frmObj = new frmExchangeRate();
                    open   = Application.OpenForms["frmExchangeRate"] as frmExchangeRate;
                    break;

                case "Service Category":
                    frmObj = new frmServiceCategory();
                    open   = Application.OpenForms["frmServiceCategory"] as frmServiceCategory;
                    break;

                case "Services":
                    frmObj = new frmServices();
                    open   = Application.OpenForms["frmServices"] as frmServices;
                    break;

                case "Voucher Type":
                    frmObj = new frmVoucherType();
                    open   = Application.OpenForms["frmVoucherType"] as frmVoucherType;
                    break;

                case "Area":
                    frmObj = new frmArea();
                    open   = Application.OpenForms["frmArea"] as frmArea;
                    break;

                case "Route":
                    frmObj = new frmRoute();
                    open   = Application.OpenForms["frmRoute"] as frmRoute;
                    break;

                case "Counter":
                    frmObj = new frmCounter();
                    open   = Application.OpenForms["frmCounter"] as frmCounter;
                    break;

                case "Product Register":
                    frmObj = new frmProductRegister();
                    open   = Application.OpenForms["frmProductRegister"] as frmProductRegister;
                    break;

                case "Salesman":
                    frmObj = new frmSalesman();
                    open   = Application.OpenForms["frmSalesman"] as frmSalesman;
                    break;

                case "Contra Register":
                    frmObj = new frmContraRegister();
                    open   = Application.OpenForms["frmContraRegister"] as frmContraRegister;
                    break;

                case "Payment Register":
                    frmObj = new frmPaymentRegister();
                    open   = Application.OpenForms["frmPaymentRegister"] as frmPaymentRegister;
                    break;

                case "Receipt Register":
                    frmObj = new frmReceiptRegister();
                    open   = Application.OpenForms["frmReceiptRegister"] as frmReceiptRegister;
                    break;

                case "Journal Register":
                    frmObj = new frmJournalRegister();
                    open   = Application.OpenForms["frmJournalRegister"] as frmJournalRegister;
                    break;

                case "PDC Payable Register":
                    frmObj = new frmPDCPayableRegister();
                    open   = Application.OpenForms["frmPDCPayableRegister"] as frmPDCPayableRegister;
                    break;

                case "PDC Receivable Register":
                    frmObj = new frmPDCReceivableRegister();
                    open   = Application.OpenForms["frmPDCReceivableRegister"] as frmPDCReceivableRegister;
                    break;

                case "PDC Clearance Register":
                    frmObj = new frmPdcClearanceRegister();
                    open   = Application.OpenForms["frmPdcClearanceRegister"] as frmPdcClearanceRegister;
                    break;

                case "Purchase Order Register":
                    frmObj = new frmPurchaseOrderRegister();
                    open   = Application.OpenForms["frmPurchaseOrderRegister"] as frmPurchaseOrderRegister;
                    break;

                case "Material Receipt Register":
                    frmObj = new frmMaterialReceiptRegister();
                    open   = Application.OpenForms["frmMaterialReceiptRegister"] as frmMaterialReceiptRegister;
                    break;

                case "Rejection Out Register":
                    frmObj = new frmRejectionOutRegister();
                    open   = Application.OpenForms["frmRejectionOutRegister"] as frmRejectionOutRegister;
                    break;

                case "Purchase Invoice Register":
                    frmObj = new frmPurchaseInvoiceRegister();
                    open   = Application.OpenForms["frmPurchaseInvoiceRegister"] as frmPurchaseInvoiceRegister;
                    break;

                case "Purchase Return Register":
                    frmObj = new frmPurchaseReturnRegister();
                    open   = Application.OpenForms["frmPurchaseReturnRegister"] as frmPurchaseReturnRegister;
                    break;

                case "Sales Quotation Register":
                    frmObj = new frmSalesQuotationRegister();
                    open   = Application.OpenForms["frmSalesQuotationRegister"] as frmSalesQuotationRegister;
                    break;

                case "Sales Order Register":
                    frmObj = new frmSalesOrderRegister();
                    open   = Application.OpenForms["frmSalesOrderRegister"] as frmSalesOrderRegister;
                    break;

                case "Delivery Note Register":
                    frmObj = new frmDeliveryNoteRegister();
                    open   = Application.OpenForms["frmDeliveryNoteRegister"] as frmDeliveryNoteRegister;
                    break;

                case "Rejection In Register":
                    frmObj = new frmRejectionInRegister();
                    open   = Application.OpenForms["frmRejectionInRegister"] as frmRejectionInRegister;
                    break;

                case "Sales Invoice Register":
                    frmObj = new frmSalesInvoiceRegister();
                    open   = Application.OpenForms["frmSalesInvoiceRegister"] as frmSalesInvoiceRegister;
                    break;

                case "Sales Return Register":
                    frmObj = new frmSalesReturnRegister();
                    open   = Application.OpenForms["frmSalesReturnRegister"] as frmSalesReturnRegister;
                    break;

                case "Physical Stock Register":
                    frmObj = new frmPhysicalStockRegister();
                    open   = Application.OpenForms["frmPhysicalStockRegister"] as frmPhysicalStockRegister;
                    break;

                case "Service Voucher Register":
                    frmObj = new frmServiceVoucherRegister();
                    open   = Application.OpenForms["frmServiceVoucherRegister"] as frmServiceVoucherRegister;
                    break;

                case "Credit Note Register":
                    frmObj = new frmCreditNoteRegister();
                    open   = Application.OpenForms["frmCreditNoteRegister"] as frmCreditNoteRegister;
                    break;

                case "Debit Note Register":
                    frmObj = new frmDebitNoteRegister();
                    open   = Application.OpenForms["frmDebitNoteRegister"] as frmDebitNoteRegister;
                    break;

                case "Stock Journal Register":
                    frmObj = new frmStockJournalRegister();
                    open   = Application.OpenForms["frmStockJournalRegister"] as frmStockJournalRegister;
                    break;

                case "Designation":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmDesignation();
                        open   = Application.OpenForms["frmDesignation"] as frmDesignation;
                    }
                    break;

                case "Pay Head":
                {
                    frmObj = new frmPayHead();
                    open   = Application.OpenForms["frmPayHead"] as frmPayHead;
                }
                break;

                case "Salary Package Creation":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmSalaryPackageCreation();
                        open   = Application.OpenForms["frmSalaryPackageCreation"] as frmSalaryPackageCreation;
                    }
                    break;

                case "Salary Package Register":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmSalaryPackageRegister();
                        open   = Application.OpenForms["frmSalaryPackageRegister"] as frmSalaryPackageRegister;
                    }
                    break;

                case "Employee Creation":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmEmployeeCreation();
                        open   = Application.OpenForms["frmEmployeeCreation"] as frmEmployeeCreation;
                    }
                    break;

                case "Employee Register":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmEmployeeRegister();
                        open   = Application.OpenForms["frmEmployeeRegister"] as frmEmployeeRegister;
                    }
                    break;

                case "Holiday Settings":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmHolydaySettings();
                        open   = Application.OpenForms["frmHolydaySettings"] as frmHolydaySettings;
                    }
                    break;

                case "Monthly Salary Settings":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmMonthlySalarySettings();
                        open   = Application.OpenForms["frmMonthlySalarySettings"] as frmMonthlySalarySettings;
                    }
                    break;

                case "Attendance":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmAttendance();
                        open   = Application.OpenForms["frmAttendance"] as frmAttendance;
                    }
                    break;

                case "Advance Payment":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmAdvancePayment();
                        open   = Application.OpenForms["frmAdvancePayment"] as frmAdvancePayment;
                    }
                    break;

                case "Advance Register":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmAdvanceRegister();
                        open   = Application.OpenForms["frmAdvanceRegister"] as frmAdvanceRegister;
                    }
                    break;

                case "Bonus Deduction":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmBonusDeduction();
                        open   = Application.OpenForms["frmBonusDeduction"] as frmBonusDeduction;
                    }
                    break;

                case "Bonus Deduction Register":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmBonusDeductionRegister();
                        open   = Application.OpenForms["frmBonusDeductionRegister"] as frmBonusDeductionRegister;
                    }
                    break;

                case "Monthly Salary Voucher":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmMonthlySalaryVoucher();
                        open   = Application.OpenForms["frmMonthlySalaryVoucher"] as frmMonthlySalaryVoucher;
                    }
                    break;

                case "Monthly Salary Register":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmMonthlySalaryRegister();
                        open   = Application.OpenForms["frmMonthlySalaryRegister"] as frmMonthlySalaryRegister;
                    }
                    break;

                case "Daily Salary Voucher":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmDailySalaryVoucher();
                        open   = Application.OpenForms["frmDailySalaryVoucher"] as frmDailySalaryVoucher;
                    }
                    break;

                case "Daily Salary Register":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmDailySalaryRegister();
                        open   = Application.OpenForms["frmDailySalaryRegister"] as frmDailySalaryRegister;
                    }
                    break;

                case "Pay Slip":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmPaySlip();
                        open   = Application.OpenForms["frmPaySlip"] as frmPaySlip;
                    }
                    break;

                case "Budget":
                    if (spSettings.SettingsStatusCheck("Budget") == "Yes")
                    {
                        frmObj = new frmBudget();
                        open   = Application.OpenForms["frmBudget"] as frmBudget;
                    }
                    break;

                case "Budget Variance":
                    if (spSettings.SettingsStatusCheck("Budget") == "Yes")
                    {
                        frmObj = new frmBudgetVariance();
                        open   = Application.OpenForms["frmBudgetVariance"] as frmBudgetVariance;
                    }
                    break;

                case "Change Current Date":
                    frmObj = new frmChangeCurrentDate();
                    open   = Application.OpenForms["frmChangeCurrentDate"] as frmChangeCurrentDate;
                    break;

                case "Settings":
                    frmObj = new frmSettings();
                    open   = Application.OpenForms["frmSettings"] as frmSettings;
                    break;

                case "Role":
                    frmObj = new frmRole();
                    open   = Application.OpenForms["frmRole"] as frmRole;
                    break;

                case "Role Privilege Settings":
                    frmObj = new frmRolePrivilegeSettings();
                    open   = Application.OpenForms["frmRolePrivilegeSettings"] as frmRolePrivilegeSettings;
                    break;

                case "User Creation":
                    frmObj = new frmUserCreation();
                    open   = Application.OpenForms["frmUserCreation"] as frmUserCreation;
                    break;

                case "Change Password":
                    frmObj = new frmChangePassword();
                    open   = Application.OpenForms["frmChangePassword"] as frmChangePassword;
                    break;

                case "New Financial Year":
                    frmObj = new frmNewFinancialYear();
                    open   = Application.OpenForms["frmNewFinancialYear"] as frmNewFinancialYear;
                    break;

                case "Change Financial Year":
                    frmObj = new frmChangeFinancialYear();
                    open   = Application.OpenForms["frmChangeFinancialYear"] as frmChangeFinancialYear;
                    break;

                case "Barcode Settings":
                    frmObj = new frmBarcodeSettings();
                    open   = Application.OpenForms["frmBarcodeSettings"] as frmBarcodeSettings;
                    break;

                case "Barcode Printing":
                    frmObj = new frmBarcodePrinting();
                    open   = Application.OpenForms["frmBarcodePrinting"] as frmBarcodePrinting;
                    break;

                case "Suffix Prefix Settings":
                    frmObj = new frmSuffixPrefixSettings();
                    open   = Application.OpenForms["frmSuffixPrefixSettings"] as frmSuffixPrefixSettings;
                    break;

                case "Change Product Tax":
                    frmObj = new frmChangeProductTax();
                    open   = Application.OpenForms["frmChangeProductTax"] as frmChangeProductTax;
                    break;

                case "Product Search":
                    frmObj = new frmProductSearch();
                    open   = Application.OpenForms["frmProductSearch"] as frmProductSearch;
                    break;

                case "Voucher Search":
                    frmObj = new frmVoucherSearch();
                    open   = Application.OpenForms["frmVoucherSearch"] as frmVoucherSearch;
                    break;

                case "Voucher Wise Product Search":
                    frmObj = new frmVoucherWiseProductSearch();
                    open   = Application.OpenForms["frmVoucherWiseProductSearch"] as frmVoucherWiseProductSearch;
                    break;

                case "Personal Reminder":
                    frmObj = new frmPersonalReminder();
                    open   = Application.OpenForms["frmPersonalReminder"] as frmPersonalReminder;
                    break;

                case "Overdue Purchase Order":
                    frmObj = new frmOverduePurchaseOrder();
                    open   = Application.OpenForms["frmOverduePurchaseOrder"] as frmOverduePurchaseOrder;
                    break;

                case "Overdue Sales Order":
                    frmObj = new frmOverdueSalesOrder();
                    open   = Application.OpenForms["frmOverdueSalesOrder"] as frmOverdueSalesOrder;
                    break;

                case "Short Expiry":
                    frmObj = new frmShortExpiry();
                    open   = Application.OpenForms["frmShortExpiry"] as frmShortExpiry;
                    break;

                case "Stock":
                    frmObj = new frmStock();
                    open   = Application.OpenForms["frmStock"] as frmStock;
                    break;

                case "Trial Balance":
                    frmObj = new frmTrialBalance();
                    open   = Application.OpenForms["frmTrialBalance"] as frmTrialBalance;
                    break;

                case "Balance Sheet":
                    frmObj = new frmBalanceSheet();
                    open   = Application.OpenForms["frmBalanceSheet"] as frmBalanceSheet;
                    break;

                case "Profit and Loss":
                    frmObj = new frmProfitAndLoss();
                    open   = Application.OpenForms["frmProfitAndLoss"] as frmProfitAndLoss;
                    break;

                case "Cash Flow":
                    frmObj = new frmCashFlow();
                    open   = Application.OpenForms["frmCashFlow"] as frmCashFlow;
                    break;

                case "Fund Flow":
                    frmObj = new frmFundFlow();
                    open   = Application.OpenForms["frmFundFlow"] as frmFundFlow;
                    break;

                case "Chart of Account":
                    frmObj = new frmChartOfAccount();
                    open   = Application.OpenForms["frmChartOfAccount"] as frmChartOfAccount;
                    break;

                case "Contra Report":
                    frmObj = new frmContraReport();
                    open   = Application.OpenForms["frmContraReport"] as frmContraReport;
                    break;

                case "Payment Report":
                    frmObj = new frmPaymentReport();
                    open   = Application.OpenForms["frmPaymentReport"] as frmPaymentReport;
                    break;

                case "Receipt Report":
                    frmObj = new frmReceiptReport();
                    open   = Application.OpenForms["frmReceiptReport"] as frmReceiptReport;
                    break;

                case "Journal Report":
                    frmObj = new frmJournalReport();
                    open   = Application.OpenForms["frmJournalReport"] as frmJournalReport;
                    break;

                case "PDC Payable Report":
                    frmObj = new frmPDCPayableReport();
                    open   = Application.OpenForms["frmPDCPayableReport"] as frmPDCPayableReport;
                    break;

                case "PDC Receivable Report":
                    frmObj = new frmPDCRecievableReport();
                    open   = Application.OpenForms["frmPDCRecievableReport"] as frmPDCRecievableReport;
                    break;

                case "PDC Clearance Report":
                    frmObj = new frmPDCClearanceReport();
                    open   = Application.OpenForms["frmPDCClearanceReport"] as frmPDCClearanceReport;
                    break;

                case "Purchase Order Report":
                    frmObj = new frmPurchaseOrderReport();
                    open   = Application.OpenForms["frmPurchaseOrderReport"] as frmPurchaseOrderReport;
                    break;

                case "Material Receipt Report":
                    frmObj = new frmMaterialReceiptReport();
                    open   = Application.OpenForms["frmMaterialReceiptReport"] as frmMaterialReceiptReport;
                    break;

                case "Rejection Out Report":
                    frmObj = new frmRejectionOutReport();
                    open   = Application.OpenForms["frmRejectionOutReport"] as frmRejectionOutReport;
                    break;

                case "Purchase Invoice Report":
                    frmObj = new frmPurchaseReport();
                    open   = Application.OpenForms["frmPurchaseReport"] as frmPurchaseReport;
                    break;

                case "Purchase Return Report":
                    frmObj = new frmPurchaseReturnReport();
                    open   = Application.OpenForms["frmPurchaseReturnReport"] as frmPurchaseReturnReport;
                    break;

                case "Sales Quotation Report":
                    frmObj = new frmSalesQuotationReport();
                    open   = Application.OpenForms["frmSalesQuotationReport"] as frmSalesQuotationReport;
                    break;

                case "Sales Order Report":
                    frmObj = new frmSalesOrderReport();
                    open   = Application.OpenForms["frmSalesOrderReport"] as frmSalesOrderReport;
                    break;

                case "Delivery Note Report":
                    frmObj = new frmDeliveryNoteReport();
                    open   = Application.OpenForms["frmDeliveryNoteReport"] as frmDeliveryNoteReport;
                    break;

                case "Rejection In Report":
                    frmObj = new frmRejectionInReport();
                    open   = Application.OpenForms["frmRejectionInReport"] as frmRejectionInReport;
                    break;

                case "Sales Invoice Report":
                    frmObj = new frmSalesReport();
                    open   = Application.OpenForms["frmSalesReport"] as frmSalesReport;
                    break;

                case "Sales Return Report":
                    frmObj = new frmSalesReturnReport();
                    open   = Application.OpenForms["frmSalesReturnReport"] as frmSalesReturnReport;
                    break;

                case "Physical Stock Report":
                    frmObj = new frmPhysicalStockReport();
                    open   = Application.OpenForms["frmPhysicalStockReport"] as frmPhysicalStockReport;
                    break;

                case "Service Report":
                    frmObj = new frmServiceReport();
                    open   = Application.OpenForms["frmServiceReport"] as frmServiceReport;
                    break;

                case "Credit Note Report":
                    frmObj = new frmCreditNoteReport();
                    open   = Application.OpenForms["frmCreditNoteReport"] as frmCreditNoteReport;
                    break;

                case "Debit Note Report":
                    frmObj = new frmDebitNoteReport();
                    open   = Application.OpenForms["frmDebitNoteReport"] as frmDebitNoteReport;
                    break;

                case "Stock Journal Report":
                    frmObj = new frmStockJournelReport();
                    open   = Application.OpenForms["frmStockJournelReport"] as frmStockJournelReport;
                    break;

                case "Employee Report":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmEmployeeReport();
                        open   = Application.OpenForms["frmEmployeeReport"] as frmEmployeeReport;
                    }
                    break;

                case "Daily Attendance Report":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmDailyAttendanceReport();
                        open   = Application.OpenForms["frmDailyAttendanceReport"] as frmDailyAttendanceReport;
                    }
                    break;

                case "Monthly Attendance Report":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmMonthlyAttendanceReport();
                        open   = Application.OpenForms["frmMonthlyAttendanceReport"] as frmMonthlyAttendanceReport;
                    }
                    break;

                case "Daily Salary Report":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmDailySalaryReport();
                        open   = Application.OpenForms["frmDailySalaryReport"] as frmDailySalaryReport;
                    }
                    break;

                case "Monthly Salary Report":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmMonthlySalaryReport();
                        open   = Application.OpenForms["frmMonthlySalaryReport"] as frmMonthlySalaryReport;
                    }
                    break;

                case "Payhead Report":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmPayHeadReport();
                        open   = Application.OpenForms["frmPayHeadReport"] as frmPayHeadReport;
                    }
                    break;

                case "Salary Package Report":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmSalaryPackageReport();
                        open   = Application.OpenForms["frmSalaryPackageReport"] as frmSalaryPackageReport;
                    }
                    break;

                case "Advance Payment Report":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmAdvancePaymentReport();
                        open   = Application.OpenForms["frmAdvancePaymentReport"] as frmAdvancePaymentReport;
                    }
                    break;

                case "Bonus Deduction Report":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmBonusDeductionReport();
                        open   = Application.OpenForms["frmBonusDeductionReport"] as frmBonusDeductionReport;
                    }
                    break;

                case "Employee Address Book Report":
                    if (spSettings.SettingsStatusCheck("Payroll") == "Yes")
                    {
                        frmObj = new frmEmployeeAddressBook();
                        open   = Application.OpenForms["frmEmployeeAddressBook"] as frmEmployeeAddressBook;
                    }
                    break;

                case "Day Book":
                    frmObj = new frmDayBook();
                    open   = Application.OpenForms["frmDayBook"] as frmDayBook;
                    break;

                case "Cash/Bank Book":
                    frmObj = new frmCashBankBookReport();
                    open   = Application.OpenForms["frmCashBankBookReport"] as frmCashBankBookReport;
                    break;

                case "Account Groupwise Report":
                    frmObj = new frmAccountGroupwiseReport();
                    open   = Application.OpenForms["frmAccountGroupwiseReport"] as frmAccountGroupwiseReport;
                    break;

                case "Account Ledger Report":
                    frmObj = new frmAccountLedgerReport();
                    open   = Application.OpenForms["frmAccountLedgerReport"] as frmAccountLedgerReport;
                    break;

                case "Outstanding Report":
                    frmObj = new frmOutstandingReport();
                    open   = Application.OpenForms["frmOutstandingReport"] as frmOutstandingReport;
                    break;

                case "Ageing Report":
                    frmObj = new frmAgeingReport();
                    open   = Application.OpenForms["frmAgeingReport"] as frmAgeingReport;
                    break;

                case "Party's Address Book":
                    frmObj = new frmPartyAddressBook();
                    open   = Application.OpenForms["frmPartyAddressBook"] as frmPartyAddressBook;
                    break;

                case "Stock Report":
                    frmObj = new frmStockReport();
                    open   = Application.OpenForms["frmStockReport"] as frmStockReport;
                    break;

                case "Short Expiry Report":
                    frmObj = new frmShortExpiryReport();
                    open   = Application.OpenForms["frmShortExpiryReport"] as frmShortExpiryReport;
                    break;

                case "Product Statistics":
                    frmObj = new frmProductStatistics();
                    open   = Application.OpenForms["frmProductStatistics"] as frmProductStatistics;
                    break;

                case "Price List Report":
                    frmObj = new frmPriceListReport();
                    open   = Application.OpenForms["frmPriceListReport"] as frmPriceListReport;
                    break;

                case "Tax Report":
                    frmObj = new frmTaxReport();
                    open   = Application.OpenForms["frmTaxReport"] as frmTaxReport;
                    break;

                case "VAT Report":
                    frmObj = new frmVatReturnReport();
                    open   = Application.OpenForms["frmVatReturnReport"] as frmVatReturnReport;
                    break;

                case "Cheque Report":
                    frmObj = new frmChequeReport();
                    open   = Application.OpenForms["frmChequeReport"] as frmChequeReport;
                    break;

                case "Free Sale Report":
                    frmObj = new frmFreeSaleReport();
                    open   = Application.OpenForms["frmFreeSaleReport"] as frmFreeSaleReport;
                    break;

                case "Product Vs Batch Report":
                    frmObj = new frmProductVsBatchReport();
                    open   = Application.OpenForms["frmProductVsBatchReport"] as frmProductVsBatchReport;
                    break;

                case "Customer":
                    frmObj = new frmCustomer();
                    open   = Application.OpenForms["frmCustomer"] as frmCustomer;
                    break;

                case "Supplier":
                    frmObj = new frmSupplier();
                    open   = Application.OpenForms["frmSupplier"] as frmSupplier;
                    break;
                }
                if (frmObj != null)
                {
                    if (open == null)
                    {
                        frmObj.MdiParent = formMDI.MDIObj;
                        frmObj.Show();
                    }
                    else
                    {
                        open.Activate();
                        if (open.WindowState == FormWindowState.Minimized)
                        {
                            open.WindowState = FormWindowState.Normal;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("QL:4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }