Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     OnlineUserSessionBo.CheckSession();
     customerVo = (CustomerVo)Session["CustomerVo"];
     if (Session["ExchangeMode"] != null)
     {
         exchangeType = Session["ExchangeMode"].ToString();
     }
     else
     {
         exchangeType = "Online";
     }
     if (!IsPostBack)
     {
         BindAMC();
         if (Request.QueryString["schemeCode"] != null)
         {
             Session["MFSchemePlan"] = Request.QueryString["schemeCode"];
             int    amcCode        = 0;
             string category       = string.Empty;
             int    isSIPAvaliable = 0;
             BindCategory();
             commonLookupBo.GetSchemeAMCCategory(int.Parse(Request.QueryString["schemeCode"].ToString()), out amcCode, out category, out isSIPAvaliable, exchangeType == "Online" ? 1 : 0);
             int schemecode = int.Parse(Request.QueryString["schemeCode"].ToString());
             ddlAMC.SelectedValue      = amcCode.ToString();
             ddlCategory.SelectedValue = category;
             BindScheme();
             ddlScheme.SelectedValue = Request.QueryString["schemeCode"];
             GetAmcSchemeDetails();
             BindschemedetailsNAV();
             hidCurrentScheme.Value = ddlScheme.SelectedValue;
             ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscriptv2ewv", "LoadTransactPanelFromMainPage('MFOrderPurchaseTransType','" + Request.QueryString["schemeCode"].ToString() + "')", true);
         }
     }
 }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString());
            OnlineUserSessionBo.CheckSession();
            customerVo = (CustomerVo)Session["customerVo"];
            userVo     = (UserVo)Session["userVo"];
            RadInformation.VisibleOnPageLoad = false;
            int TOcpmaretime = int.Parse(DateTime.Now.ToShortTimeString().Split(':')[0]);

            if (TOcpmaretime >= int.Parse(ConfigurationSettings.AppSettings["START_TIME"]) && TOcpmaretime < int.Parse(ConfigurationSettings.AppSettings["END_TIME"]))
            {
                if (Session["PageDefaultSetting"] != null)
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscriptvvvv", "LoadBottomPanelControl('MFOnlineSchemeManager')", true);
                    return;
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscriptvvvv", "loadcontrol('MFOnlineSchemeManager')", true);
                    return;
                }
            }
            if (!IsPostBack)
            {
                clientMFAccessCode = onlineMforderBo.GetClientMFAccessStatus(customerVo.CustomerId);
                if (clientMFAccessCode == "FA")
                {
                    ShowAvailableLimits();
                    AmcBind();
                    CategoryBind();

                    if ((Request.QueryString["accountId"] != null && Request.QueryString["SchemeCode"] != null) || Session["MFSchemePlan"] != null)
                    {
                        int    accountId      = 0;
                        int    schemeCode     = 0;
                        int    amcCode        = 0;
                        string category       = string.Empty;
                        int    isSIPAvaliable = 0;
                        if (Request.QueryString["accountId"] != null)
                        {
                            schemeCode = int.Parse(Request.QueryString["SchemeCode"].ToString());
                            accountId  = int.Parse(Request.QueryString["accountId"].ToString());
                            commonLookupBo.GetSchemeAMCCategory(schemeCode, out amcCode, out category, out isSIPAvaliable, exchangeType == "Online" ? 1 : 0);
                            SetSelectedDisplay(accountId, schemeCode, amcCode, category);
                            SetControlVisisbility();
                        }
                        else
                        {
                            commonLookupBo.GetSchemeAMCCategory(int.Parse(Session["MFSchemePlan"].ToString()), out amcCode, out category, out isSIPAvaliable, exchangeType == "Online" ? 1 : 0);
                            SetSelectedDisplay(0, int.Parse(Session["MFSchemePlan"].ToString()), amcCode, category);
                            //amcCode = int.Parse(Request.QueryString["Amc"].ToString());
                            //ddlAmc.SelectedValue = amcCode.ToString();
                            //ddlCategory.SelectedValue = Request.QueryString["category"].ToString();
                            //SchemeBind(int.Parse(ddlAmc.SelectedValue), null, customerVo.CustomerId);
                            //ddlScheme.SelectedValue = schemeCode.ToString();
                            //SetControlDetails(schemeCode);
                            //if (ddlFolio.SelectedValue != "")
                            //{
                            //    SetSelectedDisplay(int.Parse(ddlFolio.SelectedValue), schemeCode, amcCode, ddlCategory.SelectedValue);
                            //    BindNomineeAndJointHolders();
                            //}
                        }
                    }
                }
                else
                {
                    ShowMessage(onlineMforderBo.GetOnlineOrderUserMessage(clientMFAccessCode), 'I');
                    divControlContainer.Visible     = false;
                    divClientAccountBalance.Visible = false;
                }
            }
        }
        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;
                }
            }
        }