コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                SessionBo.CheckSession();
                userVo              = (UserVo)Session[SessionContents.UserVo];
                customerVo          = (CustomerVo)Session[SessionContents.CustomerVo];
                rmVo                = (RMVo)Session[SessionContents.RmVo];
                userId              = userVo.UserId;
                customerId          = customerVo.CustomerId;
                customerPortfolioVo = portfolioBo.GetCustomerDefaultPortfolio(customerId);
                portfolioId         = customerPortfolioVo.PortfolioId;
                Session[SessionContents.PortfolioId] = portfolioId;
                //lblMessage.Visible = false;
                //trlblerrormsg.Visible = false;
                lblMaturityMsg.Visible      = false;
                lblLifeInsurance.Visible    = false;
                lblGeneralInsurance.Visible = false;
                BindCustomerAssetMaturityDates();
                BindAssetInvestments();
                BindAssetCurrentValChart();
                BindCustInsuranceDetails();
                BindCustomerAlerts();
                // Show unread messages
                ShowUnreadMessageAlert();
            }

            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }

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

                FunctionInfo.Add("Method", "AdvisorRMCustIndiDashboard.ascx:Page_Load()");


                object[] objects = new object[10];

                objects[0]   = customerVo;
                objects[1]   = userVo;
                objects[2]   = customerMemberVo;
                objects[3]   = rmVo;
                objects[4]   = customerFamilyVo;
                objects[5]   = customerFamilyList;
                objects[6]   = customerPortfolioVo;
                objects[7]   = userId;
                objects[8]   = customerId;
                objects[9]   = portfolioId;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
コード例 #2
0
        protected void ddlActionForProspect_OnSelectedIndexChanged(object sender, EventArgs e)
        {
            int                 userId              = 0;
            UserBo              userBo              = new UserBo();
            bool                isGrpHead           = false;
            CustomerVo          customerVo          = new CustomerVo();
            CustomerPortfolioVo customerPortfolioVo = new CustomerPortfolioVo();
            PortfolioBo         portfolioBo         = new PortfolioBo();
            CustomerBo          customerBo          = new CustomerBo();
            int                 ParentId;

            if (Session[SessionContents.PortfolioId] != null)
            {
                Session.Remove(SessionContents.PortfolioId);
            }
            LinkButton lnkAction = (LinkButton)sender;
            //RadComboBox ddlAction = (RadComboBox)sender;
            GridDataItem item = (GridDataItem)lnkAction.NamingContainer;

            ParentId = int.Parse(gvLeadList.MasterTableView.DataKeyValues[item.ItemIndex]["C_CustomerId"].ToString());

            Session["ParentIdForDelete"] = ParentId;
            customerVo            = customerBo.GetCustomer(ParentId);
            Session["CustomerVo"] = customerVo;
            isGrpHead             = customerBo.CheckCustomerGroupHead(ParentId);

            //to set portfolio Id and its details
            customerPortfolioVo = portfolioBo.GetCustomerDefaultPortfolio(ParentId);
            //Session[SessionContents.PortfolioId] = customerPortfolioVo.PortfolioId;
            Session["customerPortfolioVo"] = customerPortfolioVo;

            Session["IsDashboard"] = "false";
            customerPortfolioVo    = portfolioBo.GetCustomerDefaultPortfolio(ParentId);
            if (customerVo.IsProspect == 0)
            {
                //Session[SessionContents.PortfolioId] = customerPortfolioVo.PortfolioId;
                //Session["customerPortfolioVo"] = customerPortfolioVo;
                //ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "RMCustomerIndividualDashboard", "loadcontrol('RMCustomerIndividualDashboard','login');", true);
            }
            else
            {
                isGrpHead = customerBo.CheckCustomerGroupHead(ParentId);
                if (isGrpHead == false)
                {
                    ParentId = customerBo.GetCustomerGroupHead(ParentId);
                }
                else
                {
                    ParentId = customerVo.CustomerId;
                }
                Session[SessionContents.FPS_ProspectList_CustomerId]     = ParentId;
                Session[SessionContents.FPS_AddProspectListActionStatus] = "View";
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AddProspectList','login');", true);
                //Session[SessionContents.FPS_TreeView_Status] = "FinanceProfile";
            }
        }
        protected void ddlTradeAccountNos_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlTradeAccountNos.SelectedValue != "-1")
            {
                CustomerTransactionBo customerTransactionBo = new CustomerTransactionBo();
                CustomerAccountsVo    customerAccountsVo    = new CustomerAccountsVo();
                CustomerPortfolioVo   customerPortfolioVo   = new CustomerPortfolioVo();
                PortfolioBo           portfolioBo           = new PortfolioBo();
                CustomerVo            customerVo            = customerBo.GetCustomer(Convert.ToInt32(txtParentCustomerId.Value));

                customerPortfolioVo = portfolioBo.GetCustomerDefaultPortfolio(customerVo.CustomerId);
                customerAccountsVo  = customerTransactionBo.GetCustomerEQAccountDetails(int.Parse(ddlTradeAccountNos.SelectedValue.ToString()), customerPortfolioVo.PortfolioId);
                if (rdoDelivery.Checked)
                {
                    hidBrokerRate.Value = customerAccountsVo.BrokerageDeliveryPercentage.ToString();
                }
                else
                {
                    hidBrokerRate.Value = customerAccountsVo.BrokerageSpeculativePercentage.ToString();
                }
                hidOtherCharges.Value = customerAccountsVo.OtherCharges.ToString();
            }
            else
            {
                hidBrokerRate.Value   = "0";
                hidOtherCharges.Value = "0";
            }
        }
コード例 #4
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            PortfolioBo portfolioBo = new PortfolioBo();

            String statusMsg                = string.Empty;
            int    totalFoliosMoved         = 0;
            CustomerPortfolioVo portfolioVo = new CustomerPortfolioVo();

            if (txtCustomerId.Value != string.Empty)
            {
                portfolioVo = portfolioBo.GetCustomerDefaultPortfolio(Convert.ToInt32(txtCustomerId.Value));
                if (portfolioVo.PortfolioId < 1)
                {
                    lblMessage.Text    = "No default Portfolio found for the selected customer.";
                    lblMessage.Visible = true;
                    return;
                }
            }
            else
            {
                lblMessage.Text    = "Please select a customer.";
                lblMessage.Visible = true;
                return;
            }


            foreach (GridViewRow dr in gvMFFolio.Rows)
            {
                CheckBox checkBox = (CheckBox)dr.FindControl("chkBox");
                if (checkBox.Checked)
                {
                    int  MFAccountId = Convert.ToInt32(gvMFFolio.DataKeys[dr.RowIndex].Values[0]);
                    bool isUpdated   = PortfolioBo.TransferFolio(MFAccountId, portfolioVo.PortfolioId);
                    if (isUpdated)
                    {
                        totalFoliosMoved++;
                    }
                    else
                    {
                        statusMsg += "<br/>Error occurred while moving folio with mutual fund accountId " + MFAccountId + ".<br/>";
                    }
                }
            }
            if (totalFoliosMoved > 0)
            {
                statusMsg += "<b style='color:Green'>Total Folios moved = " + totalFoliosMoved + "</b>";
            }
            //lblMessage.Text = statusMsg;
            //lblMessage.Visible = true;
            lblTransferMsg.Text = statusMsg;
            divMessage.Attributes.Add("class", "yellow-box");
            BindFolioGridView();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                SessionBo.CheckSession();
                userVo     = (UserVo)Session["userVo"];
                customerVo = (CustomerVo)Session["customerVo"];//SessionContents.CustomerVo;

                if (Session[SessionContents.PortfolioId] != null)
                {
                    portfolioId = Int32.Parse(Session[SessionContents.PortfolioId].ToString());
                }
                else
                {
                    customerPortfolioVo = portfolioBo.GetCustomerDefaultPortfolio(customerVo.CustomerId);
                    Session[SessionContents.PortfolioId] = customerPortfolioVo.PortfolioId;
                    portfolioId = customerPortfolioVo.PortfolioId;
                }

                if (!IsPostBack)
                {
                    ErrorMessage.Visible = false;
                    BindPortfolioDropDown();
                    LoadGridview(portfolioId);
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "ViewInsuranceDetails.ascx:Page_Load()");
                object[] objects = new object[3];
                objects[0]   = userVo;
                objects[1]   = customerVo;
                objects[2]   = portfolioId;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
        protected void btnAddTradeAccount_Click(object sender, EventArgs e)
        {
            CustomerPortfolioVo customerPortfolioVo = new CustomerPortfolioVo();
            PortfolioBo         portfolioBo         = new PortfolioBo();
            CustomerVo          customerVo          = customerBo.GetCustomer(Convert.ToInt32(txtParentCustomerId.Value));

            customerPortfolioVo = portfolioBo.GetCustomerDefaultPortfolio(customerVo.CustomerId);
            Session[SessionContents.PortfolioId] = customerPortfolioVo.PortfolioId;
            Session["CustomerVo"] = customerVo;

            SaveCurrentPageState();


            string queryString = "?prevPage=MultipleEqEntry";

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('CustomerEQAccountAdd','" + queryString + "');", true);



            //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('CustomerEQAccountAdd','none')", true);

            //ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountAdd','none');", true);
        }
コード例 #7
0
        private bool ValidateUserLogin(string userAccountId, string isWerp)
        {
            string                    strOnlineAdviser          = "0";
            bool                      isValidUser               = false;
            UserBo                    userBo                    = new UserBo();
            AssociatesVO              associatesVo              = new AssociatesVO();
            AdvisorBranchVo           advisorBranchVo           = new AdvisorBranchVo();
            AssociatesUserHeirarchyVo associatesUserHeirarchyVo = new AssociatesUserHeirarchyVo();
            AdvisorBo                 advisorBo                 = new AdvisorBo();
            BoDematAccount            boDematAccount            = new BoDematAccount();
            AssociatesBo              associatesBo              = new AssociatesBo();
            AdvisorStaffBo            advisorStaffBo            = new AdvisorStaffBo();
            CustomerBo                customerBo                = new CustomerBo();
            AdvisorBranchBo           advisorBranchBo           = new AdvisorBranchBo();
            PortfolioBo               portfolioBo               = new PortfolioBo();
            CustomerPortfolioVo       customerPortfolioVo       = new CustomerPortfolioVo();

            strOnlineAdviser = ConfigurationSettings.AppSettings["ONLINE_ADVISER"].ToString();
            if (string.IsNullOrEmpty(isWerp))
            {
                userVo = userBo.GetUserAccountDetails(userAccountId, Convert.ToInt32(strOnlineAdviser));
            }
            else
            {
                advisorVo = (AdvisorVo)Session["advisorVo"];
                userVo    = userBo.GetUserAccountDetails(userAccountId, advisorVo.advisorId);
            }

            if (!string.IsNullOrEmpty(isWerp))
            {
                if (userVo != null)
                {
                    customerVo  = customerBo.GetCustomerInfo(userVo.UserId);
                    isValidUser = true;
                }
                Session["CustomerVo"] = customerVo;
            }
            else if (userVo != null)
            {
                isValidUser = true;
                List <string> roleList = new List <string>();
                string        branchLogoSourcePath;
                string        sourcePath;
                string        potentialHomePage = string.Empty;

                roleList = userBo.GetUserRoles(userVo.UserId);

                if (userVo.UserType == "Customer")
                {
                    customerVo = customerBo.GetCustomerInfo(userVo.UserId);
                    advisorVo  = advisorBo.GetAdvisor(advisorBranchBo.GetBranch(customerVo.BranchId).AdviserId);
                    if (customerVo.IsProspect == 0)
                    {
                        customerPortfolioVo = portfolioBo.GetCustomerDefaultPortfolio(customerVo.CustomerId);
                        Session[SessionContents.PortfolioId] = customerPortfolioVo.PortfolioId;
                    }
                    rmVo = advisorStaffBo.GetAdvisorStaffDetails(customerVo.RmId);

                    Session[SessionContents.LogoPath]        = advisorVo.LogoPath;
                    Session[SessionContents.CurrentUserRole] = "Customer";
                    Session[SessionContents.UserTopRole]     = "Customer";

                    branchLogoSourcePath = "Images/" + userBo.GetRMBranchLogo(rmVo.RMId);
                    sourcePath           = "Images/" + userBo.GetRMLogo(rmVo.RMId);
                    Session[SessionContents.LogoPath]       = sourcePath;
                    Session[SessionContents.BranchLogoPath] = branchLogoSourcePath;
                    Session["CustomerVo"]     = customerVo;
                    Session["DematAccountVo"] = boDematAccount.GetCustomerActiveDematAccount(customerVo.CustomerId);
                    UserBo.AddLoginTrack(userVo.LoginId, string.Empty, true, HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"], HttpContext.Current.Request.UserAgent, userVo.UserId);
                }

                Session["UserVo"]    = userVo;
                Session["advisorVo"] = advisorVo;
                Session["rmVo"]      = rmVo;
                SetAdviserPreference();

                //Session["Theme"] = advisorVo.theme;
                //Session["refreshTheme"] = true;

                Session[SessionContents.LogoPath] = advisorVo.LogoPath;
            }
            return(isValidUser);
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                SessionBo.CheckSession();
                customerVo = (CustomerVo)Session["CustomerVo"];
                rmVo       = (RMVo)Session["RmVo"];
                userVo     = (UserVo)Session["userVo"];
                if (userVo.UserType == "Advisor")
                {
                    adviserVo = (AdvisorVo)Session["advisorVo"];
                    adviserId = adviserVo.advisorId;
                }
                else if (userVo.UserType == "RM")
                {
                    adviserId = int.Parse(Session["adviserId"].ToString());
                }
                adviserId = ((AdvisorVo)Session["advisorVo"]).advisorId;

                GetLatestValuationDate();
                if (!IsPostBack)
                {
                    if (Session[SessionContents.PortfolioId] != null)
                    {
                        portfolioId = int.Parse(Session[SessionContents.PortfolioId].ToString());
                    }
                    else
                    {
                        customerPortfolioVo = portfolioBo.GetCustomerDefaultPortfolio(customerVo.CustomerId);
                        Session[SessionContents.PortfolioId] = customerPortfolioVo.PortfolioId;
                        portfolioId = customerPortfolioVo.PortfolioId;
                    }

                    BindPortfolioDropDown();
                    LoadChartsAndGrids();
                }
                else
                {
                    portfolioId = int.Parse(Session[SessionContents.PortfolioId].ToString());
                    BindPortfolioDropDown();
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }

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

                FunctionInfo.Add("Method", "PortfolioDashboard.ascx:Page_Load()");
                object[] objects = new object[6];
                objects[0]   = customerVo;
                objects[1]   = userVo;
                objects[2]   = rmVo;
                objects[3]   = adviserVo;
                objects[4]   = customerPortfolioVo;
                objects[5]   = adviserId;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
コード例 #9
0
        //protected void gvCustomerPortfolio_RowDataBound(object sender, GridViewRowEventArgs e)
        //{
        //    customerPortfolioList = portfolioBo.GetCustomerPortfolios(customerVo.CustomerId);

        //    DataTable dt = new DataTable();
        //    dt.Columns.Add("PortfolioId");
        //    dt.Columns.Add("lblPortfolioName");

        //    DataRowView drv = e.Row.DataItem as DataRowView;


        //    if (e.Row.RowType == DataControlRowType.DataRow)
        //    {

        //        DropDownList ddlType;

        //        ddlType = e.Row.FindControl("ddlType") as DropDownList;

        //        RadioButton rbtn;
        //        rbtn = e.Row.FindControl("rbtnPortfolio") as RadioButton;
        //        if (ddlType != null)
        //        {

        //            ddlType.DataSource = BindPortfolioType(path);
        //            ddlType.DataTextField = "PortfolioType";
        //            ddlType.DataValueField = "PortfolioTypeCode";
        //            ddlType.DataBind();
        //            customerPortfolioVo = new CustomerPortfolioVo();
        //            customerPortfolioVo = customerPortfolioList[gvCustomerPortfolio.Rows.Count];
        //            /*Bind the Selected Value to the Drop Down*/

        //            ddlType.SelectedValue = customerPortfolioVo.PortfolioTypeCode.ToString();

        //            if (customerPortfolioVo.IsMainPortfolio == 1)
        //            {



        //                rbtn.Checked = true;

        //            }
        //            else
        //            {
        //                rbtn.Checked = false;
        //            }
        //        }
        //    }
        //    if (e.Row.RowType == DataControlRowType.Footer)
        //    {
        //        DropDownList ddlAddType;

        //        ddlAddType = e.Row.FindControl("ddlAddType") as DropDownList;
        //        if (ddlAddType != null)
        //        {
        //            ddlAddType.DataSource = BindPortfolioType(path);
        //            ddlAddType.DataTextField = "PortfolioType";
        //            ddlAddType.DataValueField = "PortfolioTypeCode";
        //            ddlAddType.DataBind();
        //            ddlAddType.Items.Insert(0, "Select the Portfolio Type");
        //        }

        //    }
        //}

        //protected void gvCustomerPortfolio_SelectedIndexChanged(object sender, EventArgs e)
        //{
        //    int index = int.Parse(gvCustomerPortfolio.SelectedRow.RowIndex.ToString());
        //    int portfolioId = int.Parse(gvCustomerPortfolio.DataKeys[index].Value.ToString());
        //    Session[SessionContents.PortfolioId] = portfolioId;
        //    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('PortfolioDashboard','none');", true);
        //}

        protected void btnAddPortfolio_Click(object sender, EventArgs e)
        {
            string newPortfolioName = string.Empty;
            string newPMSIdentifier = string.Empty;
            string newPortfolioType = "RGL";
            int    IsMainPortfolio;

            CustomerPortfolioBo customerPortfolioBo    = new CustomerPortfolioBo();
            CustomerPortfolioVo newCustomerPortfolioVo = new CustomerPortfolioVo();



            GridViewRow footerRow = gvCustomerPortfolio.FooterRow;

            DropDownList ddl = (DropDownList)footerRow.FindControl("ddlAddType");

            if (footerRow.Enabled)
            {
                if (((TextBox)footerRow.FindControl("txtPortfolioName")).Text.Trim() != "")
                {
                    newPortfolioName = ((TextBox)footerRow.FindControl("txtPortfolioName")).Text;
                }
                if (((RadioButton)footerRow.FindControl("rbtnAddMainPortfolio")).Checked)
                {
                    IsMainPortfolio = 1;
                    foreach (GridViewRow oldrow in gvCustomerPortfolio.Rows)
                    {
                        ((RadioButton)oldrow.FindControl("rbtnPortfolio")).Checked = false;
                    }
                }
                else
                {
                    IsMainPortfolio = 0;
                }
                if (((DropDownList)footerRow.FindControl("ddlAddType")).SelectedItem.Value.Trim().ToString() != "")
                {
                    if (ddl.SelectedIndex != 0)
                    {
                        newPortfolioType = ddl.SelectedItem.Value.ToString();
                    }
                }
                if (((TextBox)footerRow.FindControl("txtPMSIdentifier")).Text.Trim() != "")
                {
                    if (newPortfolioType == "PMS")
                    {
                        newPMSIdentifier = ((TextBox)footerRow.FindControl("txtPMSIdentifier")).Text;
                    }
                }

                if (newPMSIdentifier == "" && newPortfolioName == "" && ddl.SelectedIndex == 0)
                {
                }
                else
                {
                    newCustomerPortfolioVo.CustomerId        = customerVo.CustomerId;
                    newCustomerPortfolioVo.IsMainPortfolio   = IsMainPortfolio;
                    newCustomerPortfolioVo.PMSIdentifier     = newPMSIdentifier;
                    newCustomerPortfolioVo.PortfolioName     = newPortfolioName;
                    newCustomerPortfolioVo.PortfolioTypeCode = newPortfolioType;


                    portfolioBo.CreateCustomerPortfolio(newCustomerPortfolioVo, userVo.UserId);

                    newPMSIdentifier = string.Empty;
                    newPortfolioName = string.Empty;
                }
            }



            foreach (GridViewRow dr in gvCustomerPortfolio.Rows)
            {
                if (((Label)dr.FindControl("lblPortfolioName")).Text.Trim() != "")
                {
                    newPortfolioName = ((Label)dr.FindControl("lblPortfolioName")).Text;
                }
                if (((RadioButton)dr.FindControl("rbtnPortfolio")).Checked)
                {
                    IsMainPortfolio = 1;
                }
                else
                {
                    IsMainPortfolio = 0;
                }
                if (((DropDownList)dr.FindControl("ddlType")).SelectedItem.Value.Trim().ToString() != "")
                {
                    DropDownList ddlType = (DropDownList)dr.FindControl("ddlType");

                    newPortfolioType = ddlType.SelectedItem.Value.ToString();
                }
                if (((Label)dr.FindControl("lblPMSIdentifier")).Text.Trim() != "")
                {
                    if (newPortfolioType == "PMS")
                    {
                        newPMSIdentifier = ((Label)dr.FindControl("lblPMSIdentifier")).Text;
                    }
                }
                else
                {
                    newPMSIdentifier = string.Empty;
                }

                newCustomerPortfolioVo.CustomerId        = customerVo.CustomerId;
                newCustomerPortfolioVo.IsMainPortfolio   = IsMainPortfolio;
                newCustomerPortfolioVo.PMSIdentifier     = newPMSIdentifier;
                newCustomerPortfolioVo.PortfolioName     = newPortfolioName;
                newCustomerPortfolioVo.PortfolioTypeCode = newPortfolioType;
                if (((Label)dr.FindControl("PortfolioId")).Text.Trim() != "")
                {
                    newCustomerPortfolioVo.PortfolioId = int.Parse(((Label)dr.FindControl("PortfolioId")).Text);
                }

                portfolioBo.UpdateCustomerPortfolio(newCustomerPortfolioVo, userVo.UserId);
                newPortfolioName = string.Empty;
                newPMSIdentifier = string.Empty;
            }

            customerPortfolioVo = portfolioBo.GetCustomerDefaultPortfolio(customerVo.CustomerId);
            Session[SessionContents.PortfolioId] = customerPortfolioVo.PortfolioId;
            // BindGrid

            BindGridView();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString());
            OnlineUserSessionBo.CheckSession();
            userVo     = (UserVo)Session["userVo"];
            rmVo       = (RMVo)Session["rmVo"];
            adviserVo  = (AdvisorVo)Session["advisorVo"];
            customerVo = (CustomerVo)Session["CustomerVo"];
            custPortVo = (CustomerPortfolioVo)Session["CustomerPortfolioVo"];
            if (custPortVo == null)
            {
                custPortVo = portfolioBo.GetCustomerDefaultPortfolio(customerVo.CustomerId);
            }
            divValidationError.Visible = false;
            if (System.Web.HttpContext.Current.Session["BackOfficeUserId"] != null)
            {
                BackOfficeUserId = Convert.ToInt32(Session["BackOfficeUserId"]);
            }
            else
            {
                BackOfficeUserId = 0;
            }
            if (!IsPostBack)
            {
                clientMFAccessCode = boOnlineOrder.GetClientMFAccessStatus(customerVo.CustomerId);
                if (clientMFAccessCode == "FA")
                {
                    AmcBind();
                    BindCategory();
                    ShowAvailableLimits();
                    //lnkOfferDoc.Visible = false;
                    //lnkFactSheet.Visible = false;
                    //lnkExitLoad.Visible = false;
                    if (Request.QueryString["strAction"] != null && Request.QueryString["orderId"] != null && Request.QueryString["customerId"] != null)
                    {
                        strAction         = Request.QueryString["strAction"].ToString();
                        orderIdForEdit    = Convert.ToInt32(Request.QueryString["orderId"].ToString());
                        customerIdforEdit = Convert.ToInt32(Request.QueryString["customerId"].ToString());
                    }
                    else if (Request.QueryString["accountId"] != null && Request.QueryString["SchemeCode"] != null)
                    {
                        int    accountId      = 0;
                        int    schemeCode     = 0;
                        int    amcCode        = 0;
                        string category       = string.Empty;
                        int    isSIPAvaliable = 0;
                        accountId  = int.Parse(Request.QueryString["accountId"].ToString());
                        schemeCode = int.Parse(Request.QueryString["SchemeCode"].ToString());
                        commonLookupBo.GetSchemeAMCCategory(schemeCode, out amcCode, out category, out isSIPAvaliable, 1);
                        OnDrillDownBindControlValue(amcCode, category, accountId, schemeCode);
                        DataViewOnEdit();
                    }

                    btnSubmit.Text = "Submit";

                    if (strAction == "Edit")
                    {
                        BindSipDetailsForEdit();
                        DataViewOnEdit();
                        btnSubmit.Text         = "Modify";
                        onlineMFOrderVo.Action = "Edit";
                    }
                }
                else
                {
                    ShowMessage(boOnlineOrder.GetOnlineOrderUserMessage(clientMFAccessCode), 'I');
                    FreezeControls();
                    divControlContainer.Visible     = false;
                    divClientAccountBalance.Visible = false;
                }
            }
        }