Ejemplo n.º 1
0
 protected void RadPanelBarHRMMenu_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
 {
     if (e.Item.Text == "Employment Details")
     {
         Response.Redirect("EmployeeDetails.aspx");
     }
 }
 protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
 {
     try
     {
         if (e.Item.Value == "Advisor")
         {
             Session[SessionContents.CurrentUserRole] = "Admin";
             Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('IFAAdminMainDashboard','login');", true);
         }
         else if (e.Item.Value == "RM")
         {
             Session[SessionContents.CurrentUserRole] = "RM";
             if (Session["CurrentrmVo"] != null)
             {
                 Session.Remove("CurrentrmVo");
             }
             Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('RMDashBoard','login');", true);
         }
         else if (e.Item.Value == "Branch Manager")
         {
             Session[SessionContents.CurrentUserRole] = "BM";
             Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('BMDashBoard','login');", true);
         }
     }
     catch (Exception ex)
     {
         bool value = false;
     }
 }
        protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
        {
            string strNodeValue = null;

            try
            {
                if (e.Item.Value == "IFF")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('IFF','none');", true);
                }
                else if (e.Item.Value == "IFFAdd")
                {
                    Session["IFFAdd"] = "Add";
                    Session.Remove("advisorVo");
                    Session.Remove("IDs");
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('IFFAdd','none');", true);
                }
                else if (e.Item.Value == "MessageBroadcast")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('SuperAdminMessageBroadcast','login')", true);
                }

                else if (e.Item.Value == "LoanScheme")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrolCustomer('LoanSchemeView', 'none')", true);
                }
                else if (e.Item.Value == "AddLoanScheme")
                {
                    Session.Remove("LoanSchemeId");
                    Session.Remove("LoanSchemeViewStatus");
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('LoanScheme', 'none')", true);
                }
                else if (e.Item.Value == "Configuration")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('SuperAdminConfiguration', 'none')", true);
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "RMCustomerIndividualLeftPane.ascx.cs:SuperAdminTreeView_SelectedNodeChanged()");

                object[] objects = new object[1];

                objects[0]   = strNodeValue;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
        /* For BM Left Treeview */

        protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
        {
            if (e.Item.Value == "SwitchRole")
            {
                roleList = userBo.GetUserRoles(userVo.UserId);
                count    = roleList.Count;
                if (count == 3)
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMBMDashBoard','login','" + UserName + "','" + sourcepath + "','" + branchLogoSourcePath + "');", true);
                }
                if (count == 2)
                {
                    if (roleList.Contains("RM") && roleList.Contains("BM"))
                    {
                        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('BMRMDashBoard','login','" + UserName + "','" + sourcepath + "','" + branchLogoSourcePath + "');", true);
                    }
                    else if (roleList.Contains("BM") && roleList.Contains("Admin"))
                    {
                        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorBMDashBoard','login','" + UserName + "','" + sourcepath + "');", true);
                    }
                }
                if (count == 1 && userVo.UserType == "Branch Man")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('BMDashBoard','login','" + UserName + "','" + sourcepath + "','" + branchLogoSourcePath + "');", true);
                }
            }
            else if (e.Item.Value == "Dashboard")
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('BMDashBoard','login','" + UserName + "','" + sourcepath + "','" + branchLogoSourcePath + "');", true);
            }
            //else if (BMLeftTree.SelectedNode.Value == "View Branch Details")
            //{
            //    Session["FromAdvisorView"] = "FromBMView";
            //    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewBranchDetails','login');", true);
            //}
            else if (e.Item.Value == "Staff")
            {
                Session[SessionContents.CurrentUserRole] = "BM";
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewRM','login');", true);
            }
            else if (e.Item.Value == "Customer")
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('BMCustomer','login');", true);
            }
            else if (e.Item.Value == "MFMIS")
            {
                Session["UserType"] = "bm";
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMAMCwiseMIS','login');", true);
            }
            else if (e.Item.Value == "EQMIS")
            {
                Session["UserType"] = "bm";
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserEQMIS','login');", true);
            }
        }
 protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
 {
     if (e.Item.Value == "Advisor")
     {
         Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('IFAAdminMainDashboard','login');", true);
     }
     else if (e.Item.Value == "Branch Manager")
     {
         Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('BMDashBoard','login');", true);
     }
 }
        // protected void Page_PreRender(object sender, EventArgs e)
        //{
        //    if (Page.Request.Params.Get("__EVENTTARGET") != null && (Page.Request.Params.Get("__EVENTTARGET")).Contains("TreeView1"))
        //    {
        //        SetNode();
        //    }
        //}
        // public void SetNode()
        // {
        //     string strNodeValue = "";
        //     try
        //     {
        //         if (TreeView1.SelectedNode.Value == "Home")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMDashBoard','none');", true);

        //         }
        //         else if (TreeView1.SelectedNode.Value == "Group Dashboard")
        //         {
        //             Session["IsDashboard"] = "true";
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AdvisorRMCustGroupDashboard','none');", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Profile Dashboard")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMCustomerIndividualDashboard', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Customer Dashboard")
        //         {
        //             if (customerVo.Type == "IND")
        //             {
        //                 Session["IsDashboard"] = "CustDashboard";
        //                 ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AdvisorRMCustIndiDashboard','none');", true);
        //             }
        //             else if (customerVo.Type == "NIND")
        //             {
        //                 ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AdvisorRMCustIndiDashboard','none');", true);
        //             }

        //         }
        //         else if (TreeView1.SelectedNode.Value == "Liabilities Dashboard")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('LiabilityView','none');", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Liability")
        //         {
        //             Session["menu"] = null;
        //             Session.Remove("personalVo");
        //             Session.Remove("propertyVo");
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('LiabilitiesMaintenanceForm','none');", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Portfolio Dashboard")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioDashboard', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Alerts")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMAlertNotifications','none');", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Equity")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewEquityPortfolios', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "View Equity Transaction")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EquityTransactionsView','none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Equity Transaction")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EquityManualSingleTransaction','none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Equity Account")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountAdd', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "View Equity Account")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountView', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "MF")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewMutualFundPortfolio', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "View MF Folio")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerMFFolioView', 'none')", true);

        //         }
        //         else if (TreeView1.SelectedNode.Value == "View MF Transaction")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('TransactionsView', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add MF Transaction")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('MFManualSingleTran', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add MF Folio")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerMFAccountAdd','?action=');", true);
        //             // ScriptManager.RegisterClientScriptBlock(this.Page,this.GetType(), "leftpane", "loadcontrol('CustomerMFAccountAdd', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Insurance")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewInsuranceDetails', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Insurance")
        //         {
        //             Session.Remove("table");
        //             Session.Remove("insuranceVo");
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=IN')", true);
        //         }
        //         //else if (TreeView1.SelectedNode.Value == "General Insurance")
        //         //{
        //         //    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGeneralInsuranceDetails', 'none')", true);
        //         //}
        //         //else if (TreeView1.SelectedNode.Value == "Add General Insurance")
        //         //{
        //         //    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioGeneralInsuranceEntry', '?action=IN')", true);
        //         //}
        //         else if (TreeView1.SelectedNode.Value == "Fixed Income")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioFixedIncomeView', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Fixed Income")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=FI')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Govt Savings")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGovtSavings', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Govt Savings")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=GS')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Property")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioProperty', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Property")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=PR')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Pension And Gratuities")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PensionPortfolio', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Pension and Gratuities")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=PG')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Personal Assets")
        //         {

        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioPersonal', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Personal Assets")
        //         {
        //             Session.Remove("personalVo");
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioPersonalEntry', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Gold Assets")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGoldPortfolio', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Gold Assets")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioGoldEntry', '?action=GoldEntry')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Collectibles")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewCollectiblesPortfolio', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Collectibles")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioCollectiblesEntry', '?action=Col')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Cash And Savings")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioCashSavingsView', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Add Cash and Savings")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=CS')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Register Systematic Schemes")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioSystematicEntry', '?action=entry')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "View Systematic Schemes")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioSystematicView', 'none')", true);
        //         }
        //         else if (TreeView1.SelectedNode.Value == "Reports")
        //         {
        //             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('FinancialPlanningReports','login')", true);

        //         }
        //         // Code to Expand/Collapse the Tree View Nodes based on selections
        //         if (TreeView1.SelectedNode.Parent == null)
        //         {
        //             foreach (TreeNode node in TreeView1.Nodes)
        //             {
        //                 if (node.Value != TreeView1.SelectedNode.Value)
        //                     node.Collapse();
        //                 else
        //                     node.Expand();
        //             }
        //         }
        //         else
        //         {
        //             if (TreeView1.SelectedNode.Parent.Parent != null)
        //             {
        //                 string parentNode = TreeView1.SelectedNode.Parent.Parent.Value;
        //                 foreach (TreeNode node in TreeView1.Nodes)
        //                 {
        //                     if (node.Value != parentNode)
        //                         node.Collapse();
        //                 }
        //             }
        //             else
        //             {
        //                 if (TreeView1.SelectedNode.Parent == null)
        //                 {
        //                     foreach (TreeNode node in TreeView1.Nodes)
        //                     {
        //                         if (node.Value != TreeView1.SelectedNode.Value)
        //                             node.Collapse();
        //                         else
        //                             node.Expand();
        //                     }
        //                 }
        //                 else
        //                 {
        //                     strNodeValue = TreeView1.SelectedNode.Parent.Value;
        //                     string val = TreeView1.SelectedNode.Value;
        //                     foreach (TreeNode node in TreeView1.Nodes)
        //                     {

        //                         if (node.Value != strNodeValue)
        //                             node.Collapse();
        //                         else
        //                         {
        //                             foreach (TreeNode child in node.ChildNodes)
        //                             {
        //                                 if (child.Value != val)
        //                                     child.Collapse();
        //                                 else
        //                                     child.Expand();
        //                             }
        //                         }

        //                     }
        //                 }
        //             }
        //         }

        //     }
        //     catch (BaseApplicationException Ex)
        //     {
        //         throw Ex;
        //     }
        //     catch (Exception Ex)
        //     {
        //         BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex);
        //         NameValueCollection FunctionInfo = new NameValueCollection();
        //         FunctionInfo.Add("Method", "PortfolioLeftPane.ascx:TreeView1_SelectedNodeChanged()");
        //         object[] objects = new object[1];
        //         objects[0] = strNodeValue;

        //         FunctionInfo = exBase.AddObject(FunctionInfo, objects);
        //         exBase.AdditionalInformation = FunctionInfo;
        //         ExceptionManager.Publish(exBase);
        //         throw exBase;

        //     }

        // }
        //protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
        //{
        //}

        protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
        {
            string strNodeValue = "";

            try
            {
                if (e.Item.Value == "Home")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMDashBoard','none');", true);
                }
                else if (e.Item.Text == "Group Dashboard")
                {
                    Session["IsDashboard"] = "true";
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AdvisorRMCustGroupDashboard','none');", true);
                }
                else if (e.Item.Value == "Profile Dashboard")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMCustomerIndividualDashboard', 'none')", true);
                }
                else if (e.Item.Value == "Customer Dashboard")
                {
                    if (customerVo.Type == "IND")
                    {
                        Session["IsDashboard"] = "CustDashboard";
                        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AdvisorRMCustIndiDashboard','none');", true);
                    }
                    else if (customerVo.Type == "NIND")
                    {
                        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AdvisorRMCustIndiDashboard','none');", true);
                    }
                }
                else if (e.Item.Value == "Liabilities Dashboard")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('LiabilityView','none');", true);
                }
                else if (e.Item.Value == "Add Liability")
                {
                    Session["menu"] = null;
                    Session.Remove("personalVo");
                    Session.Remove("propertyVo");
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('LiabilitiesMaintenanceForm','none');", true);
                }
                else if (e.Item.Value == "Portfolio Dashboard")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioDashboard', 'none')", true);
                }
                else if (e.Item.Value == "Alerts")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMAlertNotifications','none');", true);
                }
                else if (e.Item.Value == "Equity")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewEquityPortfolios', 'none')", true);
                }
                else if (e.Item.Value == "View Equity Transaction")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EquityTransactionsView','none')", true);
                }
                else if (e.Item.Value == "Add Equity Transaction")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EquityManualSingleTransaction','none')", true);
                }
                else if (e.Item.Value == "Add Equity Account")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountAdd', 'none')", true);
                }
                else if (e.Item.Value == "View Equity Account")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountView', 'none')", true);
                }
                else if (e.Item.Value == "MF")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewMutualFundPortfolio', 'none')", true);
                }
                else if (e.Item.Value == "View MF Folio")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerMFFolioView', 'none')", true);
                }
                else if (e.Item.Value == "View MF Transaction")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('TransactionsView', 'none')", true);
                }
                else if (e.Item.Value == "Add MF Transaction")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('MFManualSingleTran', 'none')", true);
                }
                else if (e.Item.Value == "Add MF Folio")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerMFAccountAdd','?action=');", true);
                    // ScriptManager.RegisterClientScriptBlock(this.Page,this.GetType(), "leftpane", "loadcontrol('CustomerMFAccountAdd', 'none')", true);
                }
                else if (e.Item.Value == "Insurance")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewInsuranceDetails', 'none')", true);
                }
                else if (e.Item.Value == "Add Insurance")
                {
                    Session.Remove("table");
                    Session.Remove("insuranceVo");
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=IN')", true);
                }
                //else if (e.Item.Value == "General Insurance")
                //{
                //    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGeneralInsuranceDetails', 'none')", true);
                //}
                //else if (e.Item.Value == "Add General Insurance")
                //{
                //    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioGeneralInsuranceEntry', '?action=IN')", true);
                //}
                else if (e.Item.Value == "Fixed Income")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioFixedIncomeView', 'none')", true);
                }
                else if (e.Item.Value == "Add Fixed Income")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=FI')", true);
                }
                else if (e.Item.Value == "Govt Savings")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGovtSavings', 'none')", true);
                }
                else if (e.Item.Value == "Add Govt Savings")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=GS')", true);
                }
                else if (e.Item.Value == "Property")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioProperty', 'none')", true);
                }
                else if (e.Item.Value == "Add Property")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=PR')", true);
                }
                else if (e.Item.Value == "Pension And Gratuities")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PensionPortfolio', 'none')", true);
                }
                else if (e.Item.Value == "Add Pension and Gratuities")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=PG')", true);
                }
                else if (e.Item.Value == "Personal Assets")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioPersonal', 'none')", true);
                }
                else if (e.Item.Value == "Add Personal Assets")
                {
                    Session.Remove("personalVo");
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioPersonalEntry', 'none')", true);
                }
                else if (e.Item.Value == "Gold Assets")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGoldPortfolio', 'none')", true);
                }
                else if (e.Item.Value == "Add Gold Assets")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioGoldEntry', '?action=GoldEntry')", true);
                }
                else if (e.Item.Value == "Collectibles")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewCollectiblesPortfolio', 'none')", true);
                }
                else if (e.Item.Value == "Add Collectibles")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioCollectiblesEntry', '?action=Col')", true);
                }
                else if (e.Item.Value == "Cash And Savings")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioCashSavingsView', 'none')", true);
                }
                else if (e.Item.Value == "Add Cash and Savings")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=CS')", true);
                }
                else if (e.Item.Value == "Register Systematic Schemes")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioSystematicEntry', '?action=entry')", true);
                }
                else if (e.Item.Value == "View Systematic Schemes")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioSystematicView', 'none')", true);
                }
                else if (e.Item.Value == "Reports")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('FinancialPlanningReports','login')", true);
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "PortfolioLeftPane.ascx:TreeView1_SelectedNodeChanged()");
                object[] objects = new object[1];
                objects[0] = strNodeValue;

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
        //protected void Page_PreRender(object sender, EventArgs e)
        //{
        //    if (Page.Request.Params.Get("__EVENTTARGET") != null && (Page.Request.Params.Get("__EVENTTARGET")).Contains("TreeView1"))
        //    {
        //        SetNode();
        //    }
        //}
        //public void SetNode()
        //{
        //    string strNodeValue = null;
        //    try
        //    {
        //        if (TreeView1.SelectedNode.Value.ToString() == "Switch Roles")
        //        {
        //            Session.Remove("UserType");
        //            Session[SessionContents.CurrentUserRole] = null;
        //            count = roleList.Count;
        //            if (count == 3)
        //            {
        //                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdvisorRMBMDashBoard','none');", true);
        //                //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('IFAAdminDashboard','login','" + UserName + "','" + sourcePath + "');", true);
        //            }
        //            if (count == 2)
        //            {
        //                if (roleList.Contains("RM") && roleList.Contains("BM"))
        //                {
        //                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('BMRMDashBoard','login','" + UserName + "','" + sourcepath + "','" + branchLogoSourcePath + "');", true);
        //                }
        //                else if (roleList.Contains("RM") && roleList.Contains("Admin"))
        //                {
        //                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMDashBoard','login','" + UserName + "','" + sourcepath + "');", true);
        //                }

        //            }
        //            //   Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('AdvisorRMBMDashBoard','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Dashboard")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('RMDashBoard','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Profile")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewRMDetails','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Customers")
        //        {
        //            Session["Customer"] = "Customer";
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('RMCustomer','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Add Customer")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerType','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Customer Group Accounts")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewCustomerFamily','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Add Group Account")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('GroupAccountSetup','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Customer Portfolio")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerPortfolio','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Add Portfolio")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerPortfolioSetup','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Customer Alerts")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('RMAlertDashBoard','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Notifications")
        //        {
        //            Session["UserType"] = "rm";
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('AdviserCustomerSMSAlerts','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "LoanMIS")
        //        {
        //            Session["UserType"] = "rm";
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserLoanMIS','login');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Loan Proposal")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('LoanTrackingGrid','login');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "Add Loan Proposal")
        //        {
        //            Session["LoanProcessAction"] = "add";
        //            Session[SessionContents.LoanProcessTracking] = null;
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('LoanProcessTracking','login');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "MFReports")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('MFReports','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "EquityReports")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('EquityReports','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "MultiAssetReports")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('PortfolioReports','none');", true);
        //        }
        //        //else if (TreeView1.SelectedNode.Value.ToString() == "MFMIS")
        //        //{
        //        //    Session["UserType"] = "rm";
        //        //    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
        //        //}
        //        else if (TreeView1.SelectedNode.Value.ToString() == "EView Transactions")
        //        {
        //            Session["UserType"] = "rm";
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMEQMultipleTransactionsView','login');", true);
        //            //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "EAdd Transactions")
        //        {
        //            Session["UserType"] = "rm";
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMMultipleEqTransactionsEntry','login');", true);
        //            //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "EMIS")
        //        {
        //            Session["UserType"] = "rm";
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserEQMIS','login');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "MView Transactions")
        //        {

        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMMultipleTransactionView','login');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "MMIS")
        //        {
        //            Session["UserType"] = "rm";
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMAMCwiseMIS','login');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "MAdd Transactions")
        //        {
        //            Session["UserType"] = "adviser";
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('UnderConstruction','login');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "ProspectList")
        //        {
        //            Session.Remove(SessionContents.FPS_ProspectList_CustomerId);
        //            Session.Remove(SessionContents.FPS_AddProspectListActionStatus);
        //            Session.Remove(SessionContents.FPS_CustomerPospect_ActionStatus);
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ProspectList','login');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value.ToString() == "AddProspect")
        //        {
        //            Session.Remove(SessionContents.FPS_ProspectList_CustomerId);
        //            Session.Remove(SessionContents.FPS_ProspectList_CustomerId);
        //            Session.Remove(SessionContents.FPS_AddProspectListActionStatus);
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AddProspectList','login');", true);
        //        }
        //        // Code to Expand/Collapse the Tree View Nodes based on selections
        //        if (TreeView1.SelectedNode.Parent == null)
        //        {
        //            foreach (TreeNode node in TreeView1.Nodes)
        //            {
        //                if (node.Value != TreeView1.SelectedNode.Value)
        //                    node.Collapse();
        //                else
        //                    node.Expand();
        //            }
        //        }
        //        else
        //        {
        //            if (TreeView1.SelectedNode.Parent.Parent != null)
        //            {
        //                string parentNode = TreeView1.SelectedNode.Parent.Parent.Value;
        //                foreach (TreeNode node in TreeView1.Nodes)
        //                {
        //                    if (node.Value != parentNode)
        //                        node.Collapse();
        //                }
        //            }
        //            else
        //            {
        //                if (TreeView1.SelectedNode.Parent == null)
        //                {
        //                    foreach (TreeNode node in TreeView1.Nodes)
        //                    {
        //                        if (node.Value != TreeView1.SelectedNode.Value)
        //                            node.Collapse();
        //                        else
        //                            node.Expand();
        //                    }
        //                }
        //                else
        //                {
        //                    strNodeValue = TreeView1.SelectedNode.Parent.Value;
        //                    string val = TreeView1.SelectedNode.Value;
        //                    foreach (TreeNode node in TreeView1.Nodes)
        //                    {

        //                        if (node.Value != strNodeValue)
        //                            node.Collapse();
        //                        else
        //                        {
        //                            foreach (TreeNode child in node.ChildNodes)
        //                            {
        //                                if (child.Value != val)
        //                                    child.Collapse();
        //                                else
        //                                    child.Expand();
        //                            }
        //                        }

        //                    }
        //                }
        //            }
        //        }
        //    }
        //    catch (BaseApplicationException Ex)
        //    {
        //        throw Ex;
        //    }
        //    catch (Exception Ex)
        //    {
        //        BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex);
        //        NameValueCollection FunctionInfo = new NameValueCollection();

        //        FunctionInfo.Add("Method", "RMLeftPane.ascx.cs:TreeView1_SelectedNodeChanged()");

        //        object[] objects = new object[1];
        //        objects[0] = strNodeValue;

        //        FunctionInfo = exBase.AddObject(FunctionInfo, objects);
        //        exBase.AdditionalInformation = FunctionInfo;
        //        ExceptionManager.Publish(exBase);
        //        throw exBase;
        //    }
        //}
        //protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
        //{

        //}

        //protected void RadPanelBar2_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
        //{

        //}

        protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
        {
            string strNodeValue = null;

            try
            {
                if (e.Item.Value == "Switch Roles")
                {
                    Session.Remove("UserType");
                    Session[SessionContents.CurrentUserRole] = null;
                    count = roleList.Count;
                    if (count == 3)
                    {
                        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdvisorRMBMDashBoard','none');", true);
                        //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('IFAAdminDashboard','login','" + UserName + "','" + sourcePath + "');", true);
                    }
                    if (count == 2)
                    {
                        if (roleList.Contains("RM") && roleList.Contains("BM"))
                        {
                            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('BMRMDashBoard','login','" + UserName + "','" + sourcepath + "','" + branchLogoSourcePath + "');", true);
                        }
                        else if (roleList.Contains("RM") && roleList.Contains("Admin"))
                        {
                            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMDashBoard','login','" + UserName + "','" + sourcepath + "');", true);
                        }
                    }
                    //   Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('AdvisorRMBMDashBoard','none');", true);
                }
                else if (e.Item.Value == "Dashboard")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('RMDashBoard','none');", true);
                }
                else if (e.Item.Value == "Profile")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewRMDetails','none');", true);
                }
                else if (e.Item.Value == "Customers")
                {
                    Session["Customer"] = "Customer";
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('RMCustomer','none');", true);
                }
                else if (e.Item.Value == "Add Customer")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerType','none');", true);
                }
                else if (e.Item.Value == "Customer Group Accounts")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewCustomerFamily','none');", true);
                }
                else if (e.Item.Value == "Add Group Account")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('GroupAccountSetup','none');", true);
                }
                else if (e.Item.Value == "Customer Portfolio")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerPortfolio','none');", true);
                }
                else if (e.Item.Value == "Add Portfolio")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerPortfolioSetup','none');", true);
                }
                else if (e.Item.Value == "Customer Alerts")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('RMAlertDashBoard','none');", true);
                }
                else if (e.Item.Value == "Notifications")
                {
                    Session["UserType"] = "rm";
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('AdviserCustomerSMSAlerts','none');", true);
                }
                else if (e.Item.Value == "LoanMIS")
                {
                    Session["UserType"] = "rm";
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserLoanMIS','login');", true);
                }
                else if (e.Item.Value == "Loan Proposal")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('LoanTrackingGrid','login');", true);
                }
                else if (e.Item.Value == "Add Loan Proposal")
                {
                    Session["LoanProcessAction"] = "add";
                    Session[SessionContents.LoanProcessTracking] = null;
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('LoanProcessTracking','login');", true);
                }
                else if (e.Item.Value == "MFReports")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('MFReports','none');", true);
                }
                else if (e.Item.Value == "EquityReports")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('EquityReports','none');", true);
                }
                else if (e.Item.Value == "MultiAssetReports")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('PortfolioReports','none');", true);
                }
                //else if (TreeView1.SelectedNode.Value.ToString() == "MFMIS")
                //{
                //    Session["UserType"] = "rm";
                //    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
                //}
                else if (e.Item.Value == "EView Transactions")
                {
                    Session["UserType"] = "rm";
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMEQMultipleTransactionsView','login');", true);
                    //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
                }
                else if (e.Item.Value == "EAdd Transactions")
                {
                    Session["UserType"] = "rm";
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMMultipleEqTransactionsEntry','login');", true);
                    //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
                }
                else if (e.Item.Value == "EMIS")
                {
                    Session["UserType"] = "rm";
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserEQMIS','login');", true);
                }
                else if (e.Item.Value == "MView Transactions")
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMMultipleTransactionView','login');", true);
                }
                else if (e.Item.Value == "MMIS")
                {
                    Session["UserType"] = "rm";
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMAMCwiseMIS','login');", true);
                }
                else if (e.Item.Value == "MAdd Transactions")
                {
                    Session["UserType"] = "adviser";
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('UnderConstruction','login');", true);
                }
                else if (e.Item.Value == "ProspectList")
                {
                    Session.Remove(SessionContents.FPS_ProspectList_CustomerId);
                    Session.Remove(SessionContents.FPS_AddProspectListActionStatus);
                    Session.Remove(SessionContents.FPS_CustomerPospect_ActionStatus);
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ProspectList','login');", true);
                }
                else if (e.Item.Value == "AddProspect")
                {
                    Session.Remove(SessionContents.FPS_ProspectList_CustomerId);
                    Session.Remove(SessionContents.FPS_ProspectList_CustomerId);
                    Session.Remove(SessionContents.FPS_AddProspectListActionStatus);
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AddProspectList','login');", true);
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "RMLeftPane.ascx.cs:TreeView1_SelectedNodeChanged()");

                object[] objects = new object[1];
                objects[0] = strNodeValue;

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
Ejemplo n.º 8
0
        //public void SetNode()
        //{
        //    string strNodeValue = null;
        //    if (TreeView1.SelectedNode.Value == "Switch Roles")
        //    {
        //        logoPath = Session[SessionContents.LogoPath].ToString();
        //        Session[SessionContents.CurrentUserRole] = null;
        //        roleList = userBo.GetUserRoles(userVo.UserId);
        //        count = roleList.Count;
        //        if (count == 3)
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMBMDashBoard','login','" + userVo.FirstName + userVo.LastName + "','" + logoPath + "');", true);
        //            //ScriptManager.RegisterClientScriptBlock(this.Page,this.GetType(), "pageloadscript", "loginloadcontrol('IFAAdminDashboard','login','" + UserName + "','" + sourcePath + "');", true);
        //        }
        //        else if (count == 2)
        //        {
        //            if (roleList.Contains("RM") && roleList.Contains("Admin"))
        //            {
        //                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMDashBoard','login','" + userVo.FirstName + userVo.LastName + "','" + logoPath + "');", true);
        //            }
        //            else if (roleList.Contains("BM") && roleList.Contains("Admin"))
        //            {
        //                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorBMDashBoard','login','" + userVo.FirstName + userVo.LastName + "','" + logoPath + "');", true);

        //            }
        //        }
        //        // ScriptManager.RegisterClientScriptBlock(this.Page,this.GetType(), "pageloadscript", "loadcontrol('AdvisorRMBMDashBoard','none');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value == "Advisor Home")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('IFAAdminMainDashboard','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value == "Profile")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdvisorProfile','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value == "Edit Profile")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('EditAdvisorProfile','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value == "Edit User Details")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('EditUserDetails','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value == "Branch")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ViewBranches','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value == "Add Branch")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AddBranch','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value == "LOB")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ViewLOB','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Add LOB")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AddLOB','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Staff")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ViewRM','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Valuation")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('DailyValuation','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Add Staff")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AddRM','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Add Branch Association")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMBranchAssociation','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "RM Details")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMUserDetails','login');", true);
        //    }

        //    else if (TreeView1.SelectedNode.Value.ToString() == "Customer Details")
        //    {
        //        //Session["Customer"] = "Customer";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMCustomerUserDetails','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Customer")
        //    {
        //        Session["Customer"] = "Customer";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserCustomer','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Customer Accounts")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdvisorCustomerAccounts','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Association")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('CuCustomerAssociationSetup','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "View Branch Association")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ViewBranchAssociation','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Uploads")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('CustomerUpload','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Process Log")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ViewUploadProcessLog','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Rejected Records")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RejectedMFTransactionStaging','login');", true);
        //    }

        //    else if (TreeView1.SelectedNode.Value.ToString() == "Reject Folios")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RejectedFoliosUploads','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Rejected Transactions")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RejectedTransactions','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "LoanMIS")
        //    {
        //        Session["UserType"] = "adviser";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserLoanMIS','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "SetupAssociateCategory")
        //    {
        //        Session["UserType"] = "adviser";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserAssociateCategorySetup','login');", true);

        //    }

        //    else if (TreeView1.SelectedNode.Value.ToString() == "AdviserLoanCommsnStrucWithLoanPartner")
        //    {
        //        Session["UserType"] = "adviser";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserLoanCommsnStrucWithLoanPartner','login');", true);

        //    }

        //    else if (TreeView1.SelectedNode.Value.ToString() == "AdviserLoanCommsnStrucWithLoanPartner")
        //    {
        //        Session["UserType"] = "adviser";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserLoanCommsnStrucWithLoanPartner','login');", true);

        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "AdviserStaffSMTP")
        //    {
        //        Session["UserType"] = "adviser";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserStaffSMTP','login');", true);

        //    }

        //    else if (TreeView1.SelectedNode.Value.ToString() == "Schemes")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('LoanSchemeView','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Add Schemes")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('LoanScheme','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "Set Theme")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('SetTheme','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "LeadManagement")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('LeadManagement','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "LeadManagementAdd")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('LeadManagementAdd','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "MFReports")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('MFReports','login');", true);

        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "EquityReports")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('EquityReports','none');", true);
        //    }

        //    else if (TreeView1.SelectedNode.Value.ToString() == "CustomerSMSAlerts")
        //    {
        //        Session["UserType"] = "Adviser";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserCustomerSMSAlerts','none');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "SendSMS")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserCustomerManualSMS','none');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "CustomerMFSystematicTransactionReport")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('CustomerMFSystematicTransactionReport','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "MFReversal")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ReverseTransactionExceptionHandling','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "MFMIS")
        //    {
        //        Session["UserType"] = "rm";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "EView Transactions")
        //    {
        //        Session["UserType"] = "rm";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMEQMultipleTransactionsView','login');", true);
        //        //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "EAdd Transactions")
        //    {
        //        Session["UserType"] = "rm";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMMultipleEqTransactionsEntry','login');", true);
        //        //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "EMIS")
        //    {
        //        Session["UserType"] = "rm";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserEQMIS','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "MView Transactions")
        //    {

        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMMultipleTransactionView','none');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "MMIS")
        //    {
        //        Session["UserType"] = "adviser";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMAMCwiseMIS','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "CommissionMIS")
        //    {
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdvisorMISCommission','login');", true);
        //    }
        //    else if (TreeView1.SelectedNode.Value.ToString() == "MAddTransactions")
        //    {
        //        Session["UserType"] = "adviser";
        //        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('UnderConstruction','login');", true);
        //    }
        //    if (TreeView1.SelectedNode.Parent == null)
        //    {
        //        foreach (TreeNode node in TreeView1.Nodes)
        //        {
        //            if (node.Value != TreeView1.SelectedNode.Value)
        //                node.Collapse();
        //            else
        //                node.Expand();
        //        }
        //    }
        //    else
        //    {
        //        if (TreeView1.SelectedNode.Parent.Parent != null)
        //        {
        //            string parentNode = TreeView1.SelectedNode.Parent.Parent.Value;
        //            foreach (TreeNode node in TreeView1.Nodes)
        //            {
        //                if (node.Value != parentNode)
        //                    node.Collapse();
        //            }
        //        }
        //        else
        //        {
        //            if (TreeView1.SelectedNode.Parent == null)
        //            {
        //                foreach (TreeNode node in TreeView1.Nodes)
        //                {
        //                    if (node.Value != TreeView1.SelectedNode.Value)
        //                        node.Collapse();
        //                    else
        //                        node.Expand();
        //                }
        //            }
        //            else
        //            {
        //                strNodeValue = TreeView1.SelectedNode.Parent.Value;
        //                string val = TreeView1.SelectedNode.Value;
        //                foreach (TreeNode node in TreeView1.Nodes)
        //                {

        //                    if (node.Value != strNodeValue)
        //                        node.Collapse();
        //                    else
        //                    {
        //                        foreach (TreeNode child in node.ChildNodes)
        //                        {
        //                            if (child.Value != val)
        //                                child.Collapse();
        //                            else
        //                                child.Expand();
        //                        }
        //                    }

        //                }
        //            }
        //        }
        //    }
        //}
        //protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
        //{

        //    //if (TreeView1.SelectedNode.Parent == null)
        //    //{
        //    //    foreach (TreeNode node in TreeView1.Nodes)
        //    //    {
        //    //        if (node.Value != TreeView1.SelectedNode.Value)
        //    //            node.Collapse();
        //    //        else
        //    //            node.Expand();
        //    //    }
        //    //}
        //    //else
        //    //{
        //    //    string strNodeValue = TreeView1.SelectedNode.Parent.Value;

        //    //    foreach (TreeNode node in TreeView1.Nodes)
        //    //    {
        //    //        if (node.Value != strNodeValue)
        //    //            node.Collapse();
        //    //    }

        //    //}
        //}

        protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
        {
            if (e.Item.Value == "Switch Roles")
            {
                logoPath = Session[SessionContents.LogoPath].ToString();
                Session[SessionContents.CurrentUserRole] = null;
                roleList = userBo.GetUserRoles(userVo.UserId);
                count    = roleList.Count;
                if (count == 3)
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMBMDashBoard','login','" + userVo.FirstName + userVo.LastName + "','" + logoPath + "');", true);
                    //ScriptManager.RegisterClientScriptBlock(this.Page,this.GetType(), "pageloadscript", "loginloadcontrol('IFAAdminDashboard','login','" + UserName + "','" + sourcePath + "');", true);
                }
                else if (count == 2)
                {
                    if (roleList.Contains("RM") && roleList.Contains("Admin"))
                    {
                        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMDashBoard','login','" + userVo.FirstName + userVo.LastName + "','" + logoPath + "');", true);
                    }
                    else if (roleList.Contains("BM") && roleList.Contains("Admin"))
                    {
                        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorBMDashBoard','login','" + userVo.FirstName + userVo.LastName + "','" + logoPath + "');", true);
                    }
                }
                // ScriptManager.RegisterClientScriptBlock(this.Page,this.GetType(), "pageloadscript", "loadcontrol('AdvisorRMBMDashBoard','none');", true);
            }
            else if (e.Item.Value == "Advisor Home")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('IFAAdminMainDashboard','login');", true);
            }
            else if (e.Item.Value == "Profile")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdvisorProfile','login');", true);
            }
            else if (e.Item.Value == "Edit Profile")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('EditAdvisorProfile','login');", true);
            }
            else if (e.Item.Value == "Edit User Details")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('EditUserDetails','login');", true);
            }
            else if (e.Item.Value == "Branch")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ViewBranches','login');", true);
            }
            else if (e.Item.Value == "Add Branch")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AddBranch','login');", true);
            }
            else if (e.Item.Value == "LOB")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ViewLOB','login');", true);
            }
            //else if (e.Item.Value == "Add LOB")
            //{
            //    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AddLOB','login');", true);
            //}
            else if (e.Item.Value == "Staff")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ViewRM','login');", true);
            }
            else if (e.Item.Value == "Valuation")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('DailyValuation','login');", true);
            }
            else if (e.Item.Value == "Add Staff")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AddRM','login');", true);
            }
            else if (e.Item.Value == "Add Branch Association")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMBranchAssociation','login');", true);
            }
            else if (e.Item.Value == "RM Details")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMUserDetails','login');", true);
            }

            else if (e.Item.Value == "Customer Details")
            {
                //Session["Customer"] = "Customer";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMCustomerUserDetails','login');", true);
            }
            else if (e.Item.Value == "Customer")
            {
                Session["Customer"] = "Customer";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserCustomer','login');", true);
            }
            else if (e.Item.Value == "Customer Accounts")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdvisorCustomerAccounts','login');", true);
            }
            else if (e.Item.Value == "Association")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('CuCustomerAssociationSetup','login');", true);
            }
            else if (e.Item.Value == "View Branch Association")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ViewBranchAssociation','login');", true);
            }
            else if (e.Item.Value == "Uploads")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('CustomerUpload','login');", true);
            }
            else if (e.Item.Value == "Upload History")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ViewUploadProcessLog','login');", true);
            }
            else if (e.Item.Value == "View Trans Rejects")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RejectedMFTransactionStaging','login');", true);
            }

            else if (e.Item.Value == "View Rejected Folio")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RejectedFoliosUploads','login');", true);
            }
            else if (e.Item.Value == "Rejected Transactions")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RejectedTransactions','login');", true);
            }
            else if (e.Item.Value == "LoanMIS")
            {
                Session["UserType"] = "adviser";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserLoanMIS','login');", true);
            }
            else if (e.Item.Value == "Setup Associate Category")
            {
                Session["UserType"] = "adviser";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserAssociateCategorySetup','login');", true);
            }

            else if (e.Item.Value == "Loan Partner Commission")
            {
                Session["UserType"] = "adviser";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserLoanCommsnStrucWithLoanPartner','login');", true);
            }

            else if (e.Item.Value == "Setup Advisor Staff SMTP")
            {
                Session["UserType"] = "adviser";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserStaffSMTP','login');", true);
            }

            //else if (e.Item.Value == "Schemes")
            //{
            //    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('LoanSchemeView','login');", true);
            //}
            //else if (e.Item.Value == "Add Schemes")
            //{
            //    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('LoanScheme','login');", true);
            //}
            //else if (e.Item.Value == "Set Theme")
            //{
            //    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('SetTheme','login');", true);
            //}
            else if (e.Item.Value == "LeadManagement")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('LeadManagement','login');", true);
            }
            else if (e.Item.Value == "LeadManagementAdd")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('LeadManagementAdd','login');", true);
            }
            else if (e.Item.Value == "MF Reports")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('MFReports','login');", true);
            }
            else if (e.Item.Value == "Equity Reports")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('EquityReports','none');", true);
            }

            else if (e.Item.Value == "Alerts SMS")
            {
                Session["UserType"] = "Adviser";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserCustomerSMSAlerts','none');", true);
            }
            else if (e.Item.Value == "Customized SMS")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserCustomerManualSMS','none');", true);
            }
            else if (e.Item.Value == "Systematic Recon")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('CustomerMFSystematicTransactionReport','login');", true);
            }
            else if (e.Item.Value == "Reversal Trxn Handling")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ReverseTransactionExceptionHandling','login');", true);
            }
            else if (e.Item.Value == "MFMIS")
            {
                Session["UserType"] = "rm";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
            }
            else if (e.Item.Value == "EView Transactions")
            {
                Session["UserType"] = "rm";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMEQMultipleTransactionsView','login');", true);
                //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
            }
            else if (e.Item.Value == "EAdd Transactions")
            {
                Session["UserType"] = "rm";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMMultipleEqTransactionsEntry','login');", true);
                //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true);
            }
            else if (e.Item.Value == "EMIS")
            {
                Session["UserType"] = "rm";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserEQMIS','login');", true);
            }
            else if (e.Item.Value == "MView Transactions")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMMultipleTransactionView','none');", true);
            }
            else if (e.Item.Value == "MMIS")
            {
                Session["UserType"] = "adviser";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('RMAMCwiseMIS','login');", true);
            }
            else if (e.Item.Value == "Commission MIS")
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdvisorMISCommission','login');", true);
            }
            else if (e.Item.Value == "MAdd Transactions")
            {
                Session["UserType"] = "adviser";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('UnderConstruction','login');", true);
            }
        }
Ejemplo n.º 9
0
        protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
        {
            string strNodeValue = null;

            try
            {
                if (e.Item.Value == "IFADashBoard")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('IFF','none');", true);
                }
                else if (e.Item.Value == "IFF")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('IFADashBoard','none');", true);
                }
                else if (e.Item.Value == "IFFAdd")
                {
                    Session["IFFAdd"] = "Add";
                    Session.Remove("advisorVo");
                    Session.Remove("IDs");
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('IFFAdd','none');", true);
                }
                else if (e.Item.Value == "IFFUserManagement")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('IFFUserManagement','login')", true);
                }
                else if (e.Item.Value == "MessageBroadcast")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('SuperAdminMessageBroadcast','login')", true);
                }
                else if (e.Item.Value == "SchemeMapping")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AddSchemeMapping','login')", true);
                }
                else if (e.Item.Value == "Reports")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('MFReports','login')", true);
                }

                else if (e.Item.Value == "LoanScheme")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrolCustomer('LoanSchemeView', 'none')", true);
                }
                else if (e.Item.Value == "AddLoanScheme")
                {
                    Session.Remove("LoanSchemeId");
                    Session.Remove("LoanSchemeViewStatus");
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('LoanScheme', 'none')", true);
                }
                else if (e.Item.Value == "Configuration")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('SuperAdminConfiguration', 'none')", true);
                }
                else if (e.Item.Value == "CustomerList")
                {
                    Session["Customer"] = "Customer";
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AdviserCustomer','login');", true);
                }
                else if (e.Item.Value == "Valuation_Monitor")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('DailyValuationMonitor', 'none')", true);
                }
                else if (e.Item.Value == "Manual_Valuation")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ManualValuation', 'none')", true);
                }
                else if (e.Item.Value == "Gold_Price_Monito")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PriceListMonitor', 'none')", true);
                }
                else if (e.Item.Value == "GoalFunding_Sync")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('SuperAdminGoalSIPFundingSync', 'none')", true);
                }
                else if (e.Item.Value == "IssueTracker")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewIssuseDetails', 'none')", true);
                }
                else if (e.Item.Value == "AddNewIssue")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AddIssue', 'none')", true);
                }
                else if (e.Item.Value == "MsgCompose")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('MessageCompose', 'none')", true);
                }
                else if (e.Item.Value == "MsgInbox")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('MessageInbox', 'none')", true);
                }
                else if (e.Item.Value == "MsgOutbox")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('MessageOutbox', 'none')", true);
                }

                else if (e.Item.Value == "Uploads")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerUpload', 'none')", true);
                }
                else if (e.Item.Value == "Uploads_History")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewUploadProcessLog', 'none')", true);
                }
                else if (e.Item.Value == "View_Profile_Exceptions")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RejectedWERPProfile', 'none')", true);
                }
                else if (e.Item.Value == "View_Transactions_Exceptions")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RejectedMFTransactionStaging', 'none')", true);
                }
                else if (e.Item.Value == "View_MFFolio_Exceptions")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RejectedMFFolio', 'none')", true);
                }
                else if (e.Item.Value == "View_EQ_TRADE_Account")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RejectedTradeAccountStagingSA', 'none')", true);
                }

                else if (e.Item.Value == "View_EQ_Transaction")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RejectedEquityTransactionStagingSA', 'none')", true);
                }

                else if (e.Item.Value == "View_Systematic_Transaction")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RejectedSystematicTransactionStaging', 'none')", true);
                }
                else if (e.Item.Value == "View_Trail_Commission_Exceptions")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('TrailCommisionTransactionRejects', 'none')", true);
                }

                else if (e.Item.Value == "MFNP_Tranx_Compare")
                {
                    Session["UserType"] = "SuperAdmin";
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('MFNPAndTransactionCompare', 'none')", true);
                }
                else if (e.Item.Value == "MIS_Reconciliation")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('MutualFundMIS', 'none')", true);
                }
                else if (e.Item.Value == "Upload_FolioTranx_Reconcilation")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('UploadFolioTrxnReconcilation', 'none')", true);
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "RMCustomerIndividualLeftPane.ascx.cs:SuperAdminTreeView_SelectedNodeChanged()");

                object[] objects = new object[1];

                objects[0]   = strNodeValue;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
        //protected void Page_PreRender(object sender, EventArgs e)
        //{
        //    if (Page.Request.Params.Get("__EVENTTARGET") != null && (Page.Request.Params.Get("__EVENTTARGET")).Contains("TreeView1"))
        //    {
        //        SetNode();
        //    }
        //}
        //public void SetNode()
        //{
        //    string strNodeValue = null;
        //    try
        //    {

        //        if (TreeView1.SelectedNode.Value == "RM Home")
        //        {
        //            if (Session[SessionContents.CurrentUserRole].ToString() == "BM")
        //            {
        //                 ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('BMDashBoard','none');", true);
        //            }
        //            else if(Session[SessionContents.CurrentUserRole].ToString() == "RM")
        //            {
        //                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMDashBoard','none');", true);
        //            }
        //            else if (Session[SessionContents.CurrentUserRole].ToString() == "Admin")
        //            {
        //                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('IFAAdminMainDashboard','none');", true);
        //            }
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Group Dashboard")
        //        {
        //            Session["IsDashboard"] = "true";
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AdvisorRMCustGroupDashboard','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Customer Dashboard")
        //        {
        //            Session["IsDashboard"] = "CustDashboard";
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AdvisorRMCustIndiDashboard','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Portfolio Dashboard")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioDashboard','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Equity")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewEquityPortfolios', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "View Equity Transaction")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EquityTransactionsView','none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Equity Transaction")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EquityManualSingleTransaction','none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Equity Account")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountAdd', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "View Equity Account")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountView', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "MF")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewMutualFundPortfolio', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "View MF Folio")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerMFFolioView', 'none')", true);

        //        }
        //        else if (TreeView1.SelectedNode.Value == "View MF Transaction")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('TransactionsView', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add MF Transaction")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('MFManualSingleTran', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add MF Folio")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerMFAccountAdd','?action=');", true);
        //            // ScriptManager.RegisterClientScriptBlock(this.Page,this.GetType(), "leftpane", "loadcontrol('CustomerMFAccountAdd', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Fixed Income")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioFixedIncomeView', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Fixed Income")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=FI')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Govt Savings")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGovtSavings', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Govt Savings")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=GS')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Property")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioProperty', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Property")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=PR')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Pension And Gratuities")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PensionPortfolio', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Pension and Gratuities")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=PG')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Personal Assets")
        //        {

        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioPersonal', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Personal Assets")
        //        {
        //            Session.Remove("personalVo");
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioPersonalEntry', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Gold Assets")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGoldPortfolio', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Gold Assets")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioGoldEntry', '?action=GoldEntry')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Collectibles")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewCollectiblesPortfolio', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Collectibles")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioCollectiblesEntry', '?action=Col')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Cash And Savings")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioCashSavingsView', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Cash and Savings")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=CS')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Register Systematic Schemes")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioSystematicEntry', '?action=entry')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "View Systematic Schemes")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioSystematicView', 'none')", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Profile Dashboard")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMCustomerIndividualDashboard','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Alerts")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMAlertNotifications','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "View Notifications")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMAlertNotifications','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "MF Alerts")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerMFAlert','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "FI Alerts")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerFIAlerts','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Insurance Alerts")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerInsuranceAlerts','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Equity Alerts")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAlerts','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "View Profile")
        //        {
        //            if (customerVo.Type.ToUpper().ToString() == "IND" || customerVo.Type == null)
        //            {
        //                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewCustomerIndividualProfile','none');", true);
        //            }
        //            else
        //            {
        //                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewNonIndividualProfile','none');", true);
        //            }
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Edit Profile")
        //        {
        //            if (customerVo.Type.ToUpper().ToString() == "IND" || customerVo.Type == null)
        //            {

        //                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EditCustomerIndividualProfile','none');", true);
        //            }
        //            else
        //            {
        //                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EditCustomerNonIndividualProfile','none');", true);
        //            }
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Proof")
        //        {

        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewCustomerProofs','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Proof")
        //        {
        //            Session["FlagProof"] = 1;
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerProofsAdd','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Bank Details")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewBankDetails','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Bank Details")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AddBankDetails','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Demat Account Details")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('DematAccountDetails','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Demat Account")
        //        {
        //            Session["DematDetailsView"] = "Add";
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AddDematAccountDetails','none');", true);
        //        }

        //        else if (TreeView1.SelectedNode.Value == "Add Liability")
        //        {
        //            Session["menu"] = null;
        //            Session.Remove("personalVo");
        //            Session.Remove("propertyVo");
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('LiabilitiesMaintenanceForm','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Liabilities Dashboard")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('LiabilityView','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Income Details")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerIncome','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Expense Details")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerExpense','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Advisor Notes")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAdvisorsNote','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "General Insurance")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGeneralInsuranceDetails','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add General Insurance")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioGeneralInsuranceAccountAdd','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Add Life Insurance")
        //        {
        //            Session.Remove("table");
        //            Session.Remove("insuranceVo");
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=IN')", true);
        //            //ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioInsuranceEntry','none');", true);
        //        }
        //        else if (TreeView1.SelectedNode.Value == "Life Insurance")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewInsuranceDetails','none');", true);
        //        }
        //        if (TreeView1.SelectedNode.Value == "RiskProfileAssetAllocation")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('FinancialPlanning','login')", true);

        //        }
        //        else if (TreeView1.SelectedNode.Value == "GoalProfiling")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AddCustomerFinancialPlanningGoalSetup','login')", true);

        //        }
        //        else if (TreeView1.SelectedNode.Value == "Reports")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('FinancialPlanningReports','login')", true);

        //        }
        //        else if (TreeView1.SelectedNode.Value == "FinanceProfile")
        //        {
        //            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerProspect','login')", true);
        //        }
        //        // Code to Expand/Collapse the Tree View Nodes based on selections
        //        if (TreeView1.SelectedNode.Parent == null)
        //        {
        //            foreach (TreeNode node in TreeView1.Nodes)
        //            {
        //                if (node.Value != TreeView1.SelectedNode.Value)
        //                    node.Collapse();
        //                else
        //                    node.Expand();
        //            }
        //        }
        //        else
        //        {
        //            if (TreeView1.SelectedNode.Parent.Parent != null)
        //            {
        //                string parentNode = TreeView1.SelectedNode.Parent.Parent.Value;
        //                foreach (TreeNode node in TreeView1.Nodes)
        //                {
        //                    if (node.Value != parentNode)
        //                        node.Collapse();
        //                }
        //            }
        //            else
        //            {
        //                if (TreeView1.SelectedNode.Parent == null)
        //                {
        //                    foreach (TreeNode node in TreeView1.Nodes)
        //                    {
        //                        if (node.Value != TreeView1.SelectedNode.Value)
        //                            node.Collapse();
        //                        else
        //                            node.Expand();
        //                    }
        //                }
        //                else
        //                {
        //                    strNodeValue = TreeView1.SelectedNode.Parent.Value;
        //                    string val = TreeView1.SelectedNode.Value;
        //                    foreach (TreeNode node in TreeView1.Nodes)
        //                    {

        //                        if (node.Value != strNodeValue)
        //                            node.Collapse();
        //                        else
        //                        {
        //                            foreach (TreeNode child in node.ChildNodes)
        //                            {
        //                                if (child.Value != val)
        //                                    child.Collapse();
        //                                else
        //                                    child.Expand();
        //                            }
        //                        }

        //                    }
        //                }
        //            }
        //        }

        //    }
        //    catch (BaseApplicationException Ex)
        //    {
        //        throw Ex;
        //    }
        //    catch (Exception Ex)
        //    {

        //        BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex);
        //        NameValueCollection FunctionInfo = new NameValueCollection();

        //        FunctionInfo.Add("Method", "RMCustomerIndividualLeftPane.ascx.cs:TreeView1_SelectedNodeChanged()");

        //        object[] objects = new object[1];

        //        objects[0] = strNodeValue;
        //        FunctionInfo = exBase.AddObject(FunctionInfo, objects);
        //        exBase.AdditionalInformation = FunctionInfo;
        //        ExceptionManager.Publish(exBase);
        //        throw exBase;
        //    }
        //}
        //protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
        //{


        //}

        protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
        {
            string strNodeValue = null;

            try
            {
                if (e.Item.Value == "Rm Home")
                {
                    if (Session[SessionContents.CurrentUserRole].ToString() == "BM")
                    {
                        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('BMDashBoard','none');", true);
                    }
                    else if (Session[SessionContents.CurrentUserRole].ToString() == "RM")
                    {
                        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMDashBoard','none');", true);
                    }
                    else if (Session[SessionContents.CurrentUserRole].ToString() == "Admin")
                    {
                        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('IFAAdminMainDashboard','none');", true);
                    }
                }
                else if (e.Item.Value == "Group Dashboard")
                {
                    Session["IsDashboard"] = "true";
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AdvisorRMCustGroupDashboard','none');", true);
                }
                else if (e.Item.Value == "Customer Dashboard")
                {
                    Session["IsDashboard"] = "CustDashboard";
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AdvisorRMCustIndiDashboard','none');", true);
                }
                else if (e.Item.Value == "Portfolio Dashboard")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioDashboard','none');", true);
                }
                else if (e.Item.Value == "Equity")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewEquityPortfolios', 'none')", true);
                }
                else if (e.Item.Value == "View Equity Transaction")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EquityTransactionsView','none')", true);
                }
                else if (e.Item.Value == "Add Equity Transaction")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EquityManualSingleTransaction','none')", true);
                }
                else if (e.Item.Value == "Add Equity Account")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountAdd', 'none')", true);
                }
                else if (e.Item.Value == "View Equity Account")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountView', 'none')", true);
                }
                else if (e.Item.Value == "MF")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewMutualFundPortfolio', 'none')", true);
                }
                else if (e.Item.Value == "View MF Folio")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerMFFolioView', 'none')", true);
                }
                else if (e.Item.Value == "View MF Transaction")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('TransactionsView', 'none')", true);
                }
                else if (e.Item.Value == "Add MF Transaction")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('MFManualSingleTran', 'none')", true);
                }
                else if (e.Item.Value == "Add MF Folio")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerMFAccountAdd','action=');", true);
                    // ScriptManager.RegisterClientScriptBlock(this.Page,this.GetType(), "leftpane", "loadcontrol('CustomerMFAccountAdd', 'none')", true);
                }
                else if (e.Item.Value == "Fixed Income")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioFixedIncomeView', 'none')", true);
                }
                else if (e.Item.Value == "Add Fixed Income")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=FI')", true);
                }
                else if (e.Item.Value == "Govt Savings")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGovtSavings', 'none')", true);
                }
                else if (e.Item.Value == "Add Govt Savings")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=GS')", true);
                }
                else if (e.Item.Value == "Property")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioProperty', 'none')", true);
                }
                else if (e.Item.Value == "Add Property")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=PR')", true);
                }
                else if (e.Item.Value == "Pension And Gratuities")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PensionPortfolio', 'none')", true);
                }
                else if (e.Item.Value == "Add Pension and Gratuities")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=PG')", true);
                }
                else if (e.Item.Value == "Personal Assets")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioPersonal', 'none')", true);
                }
                else if (e.Item.Value == "Add Personal Assets")
                {
                    Session.Remove("personalVo");
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioPersonalEntry', 'none')", true);
                }
                else if (e.Item.Value == "Gold Assets")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGoldPortfolio', 'none')", true);
                }
                else if (e.Item.Value == "Add Gold Assets")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioGoldEntry', '?action=GoldEntry')", true);
                }
                else if (e.Item.Value == "Collectibles")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewCollectiblesPortfolio', 'none')", true);
                }
                else if (e.Item.Value == "Add Collectibles")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioCollectiblesEntry', '?action=Col')", true);
                }
                else if (e.Item.Value == "Cash And Savings")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioCashSavingsView', 'none')", true);
                }
                else if (e.Item.Value == "Add Cash and Savings")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=CS')", true);
                }
                else if (e.Item.Value == "Register Systematic Schemes")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioSystematicEntry', 'action=entry')", true);
                }
                else if (e.Item.Value == "View Systematic Schemes")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioSystematicView', 'none')", true);
                }
                else if (e.Item.Value == "Profile Dashboard")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMCustomerIndividualDashboard','none');", true);
                }
                else if (e.Item.Value == "Alerts")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMAlertNotifications','none');", true);
                }
                else if (e.Item.Value == "View Notifications")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('RMAlertNotifications','none');", true);
                }
                else if (e.Item.Value == "MF Alerts")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerMFAlert','none');", true);
                }
                else if (e.Item.Value == "FI Alerts")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerFIAlerts','none');", true);
                }
                else if (e.Item.Value == "Insurance Alerts")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerInsuranceAlerts','none');", true);
                }
                else if (e.Item.Value == "Equity Alerts")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAlerts','none');", true);
                }
                else if (e.Item.Value == "View Profile")
                {
                    if (customerVo.Type.ToUpper().ToString() == "IND" || customerVo.Type == null)
                    {
                        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewCustomerIndividualProfile','none');", true);
                    }
                    else
                    {
                        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewNonIndividualProfile','none');", true);
                    }
                }
                else if (e.Item.Value == "Edit Profile")
                {
                    if (customerVo.Type.ToUpper().ToString() == "IND" || customerVo.Type == null)
                    {
                        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EditCustomerIndividualProfile','none');", true);
                    }
                    else
                    {
                        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('EditCustomerNonIndividualProfile','none');", true);
                    }
                }
                else if (e.Item.Value == "Proof")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewCustomerProofs','none');", true);
                }
                else if (e.Item.Value == "Add Proof")
                {
                    Session["FlagProof"] = 1;
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerProofsAdd','none');", true);
                }
                else if (e.Item.Value == "Bank Details")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewBankDetails','none');", true);
                }
                else if (e.Item.Value == "Add Bank Details")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AddBankDetails','none');", true);
                }
                else if (e.Item.Value == "Demat Account Details")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('DematAccountDetails','none');", true);
                }
                else if (e.Item.Value == "Add Demat Account")
                {
                    Session["DematDetailsView"] = "Add";
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AddDematAccountDetails','none');", true);
                }

                else if (e.Item.Value == "Add Liability")
                {
                    Session["menu"] = null;
                    Session.Remove("personalVo");
                    Session.Remove("propertyVo");
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('LiabilitiesMaintenanceForm','none');", true);
                }
                else if (e.Item.Value == "Liabilities Dashboard")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('LiabilityView','none');", true);
                }
                else if (e.Item.Value == "Income Details")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerIncome','none');", true);
                }
                else if (e.Item.Value == "Expense Details")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerExpense','none');", true);
                }
                else if (e.Item.Value == "Advisor Notes")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAdvisorsNote','none');", true);
                }
                else if (e.Item.Value == "General Insurance")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGeneralInsuranceDetails','none');", true);
                }
                else if (e.Item.Value == "Add General Insurance")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioGeneralInsuranceAccountAdd','none');", true);
                }
                else if (e.Item.Value == "Add Life Insurance")
                {
                    Session.Remove("table");
                    Session.Remove("insuranceVo");
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd', '?action=IN')", true);
                    //ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('PortfolioInsuranceEntry','none');", true);
                }
                else if (e.Item.Value == "Life Insurance")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewInsuranceDetails','none');", true);
                }
                if (e.Item.Value == "RiskProfileAssetAllocation")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('FinancialPlanning','login')", true);
                }
                else if (e.Item.Value == "GoalProfiling")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('AddCustomerFinancialPlanningGoalSetup','login')", true);
                }
                else if (e.Item.Value == "Reports")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('FinancialPlanningReports','login')", true);
                }
                else if (e.Item.Value == "FinanceProfile")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerProspect','login')", true);
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "RMCustomerIndividualLeftPane.ascx.cs:TreeView1_SelectedNodeChanged()");

                object[] objects = new object[1];

                objects[0]   = strNodeValue;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }