public void LoadAdvisorFolioGrid(int CurrentPage)
        {
            List <CustomerAccountsVo>   customerMFAccountsList = new List <CustomerAccountsVo>();
            Dictionary <string, string> genDictAMC             = new Dictionary <string, string>();

            try
            {
                advisorVo = (AdvisorVo)Session["advisorVo"];
                string path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString());
                int    count;

                customerMFAccountsList = customerAccountBo.GetAdviserMFAccountList(advisorVo.advisorId, mypager.CurrentPage, hdnSort.Value, out count, hdnNameFilter.Value, hdnAMCFilter.Value, out genDictAMC);
                if (count > 0)
                {
                    lblTotalRows.Text = hdnRecordCount.Value = count.ToString();
                    tblPager.Visible  = true;
                }
                if (customerMFAccountsList != null)
                {
                    lblMsg.Visible = false;
                    DataTable dtCustomerMFAccounts = new DataTable();
                    //dtProperty.Columns.Add("SI.No");
                    dtCustomerMFAccounts.Columns.Add("MFAccountId");
                    dtCustomerMFAccounts.Columns.Add("CustomerId");
                    dtCustomerMFAccounts.Columns.Add("PortfolioId");
                    dtCustomerMFAccounts.Columns.Add("Customer Name");
                    dtCustomerMFAccounts.Columns.Add("AMC Name");
                    dtCustomerMFAccounts.Columns.Add("Folio Number");

                    DataRow drCustomerMFAccounts;
                    for (int i = 0; i < customerMFAccountsList.Count; i++)
                    {
                        drCustomerMFAccounts = dtCustomerMFAccounts.NewRow();
                        customerMFAccountsVo = new CustomerAccountsVo();
                        customerMFAccountsVo = customerMFAccountsList[i];
                        //drProperty[0] = (i + 1).ToString();
                        drCustomerMFAccounts[0] = customerMFAccountsVo.AccountId.ToString();
                        drCustomerMFAccounts[1] = customerMFAccountsVo.CustomerId.ToString();
                        drCustomerMFAccounts[2] = customerMFAccountsVo.PortfolioId.ToString();
                        drCustomerMFAccounts[3] = customerMFAccountsVo.CustomerName.ToString();
                        drCustomerMFAccounts[4] = customerMFAccountsVo.AMCName.ToString();
                        drCustomerMFAccounts[5] = customerMFAccountsVo.AccountNum.ToString();

                        dtCustomerMFAccounts.Rows.Add(drCustomerMFAccounts);
                    }
                    gvrMFAccounts.DataSource = dtCustomerMFAccounts;
                    gvrMFAccounts.DataBind();

                    if (genDictAMC.Count > 0)
                    {
                        DropDownList ddlAMC = GetAMCDDL();
                        if (ddlAMC != null)
                        {
                            ddlAMC.DataSource     = genDictAMC;
                            ddlAMC.DataTextField  = "Key";
                            ddlAMC.DataValueField = "Value";
                            ddlAMC.DataBind();
                            ddlAMC.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select AMC", "Select AMC"));
                        }
                        if (hdnAMCFilter.Value != "")
                        {
                            ddlAMC.SelectedValue = hdnAMCFilter.Value.ToString();
                        }
                    }

                    TextBox txtName = GetCustNameTextBox();
                    if (txtName != null)
                    {
                        if (hdnNameFilter.Value != "")
                        {
                            txtName.Text = hdnNameFilter.Value.ToString();
                        }
                    }

                    this.GetPageCount();
                }
                else
                {
                    lblMsg.Visible           = true;
                    gvrMFAccounts.DataSource = null;
                    gvrMFAccounts.DataBind();
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "AdvisorCustomerAccounts.ascx:LoadAdvisorFolioGrid()");
                object[] objects = new object[1];
                objects[0]   = customerMFAccountsVo;
                objects[1]   = customerMFAccountsList;
                FunctionInfo = exBase.AddObject(FunctionInfo, null);/*, objects*/
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }