protected void btnMode_OnClick(object sender, EventArgs e) { customerVo = (CustomerVo)Session["CustomerVo"]; if (customerVo.IsDematAccepted && customerVo.IsDematInvestor && ddlMode.SelectedValue == "Demat") { Session["ExchangeMode"] = "Demat"; Session["MFSchemePlan"] = null; } else if (!customerVo.IsDematAccepted && ddlMode.SelectedValue == "Demat") { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "ShowModal();", true); return; } else if (ddlMode.SelectedValue == "Online") { Session["ExchangeMode"] = "Online"; Session["MFSchemePlan"] = null; } else if (customerVo.IsDematAccepted && !customerVo.IsDematInvestor && ddlMode.SelectedValue == "Demat") { ddlMode.SelectedValue = "Online"; Page.ClientScript.RegisterStartupScript(this.GetType(), "alertwq", "alert('We have taken your request for registration of your client code for BSE StAR MF segment. The same will be activated shortly.');", true); return; } TimeSpan now = DateTime.Now.TimeOfDay; if (Session["ExchangeMode"] != null && Session["ExchangeMode"].ToString() == "Demat") { CommonLookupBo boCommon = new CommonLookupBo(); if (!boCommon.CheckForBusinessDate(DateTime.Now)) { ScriptManager.RegisterStartupScript(this, typeof(Page), "LoadBottomPanelFromBlocking", "LoadTransactPanel('MFOnlineSchemeManager');", true); return; } //if (!(now >= TimeSpan.Parse(ConfigurationSettings.AppSettings["BSETradeOpTime"]) && now <= TimeSpan.Parse(ConfigurationSettings.AppSettings["BSETradeEnTime"]))) //{ // ScriptManager.RegisterStartupScript(this, typeof(Page), "LoadBottomPanelFromBlocking", "LoadTransactPanel('MFOnlineSchemeManager');", true); //} //else //{ // ScriptManager.RegisterStartupScript(this, typeof(Page), "LoadBottomPanelFromBlocking", "LoadTransactPanel('MFOrderPurchaseTransType');", true); //} } else if (Session["ExchangeMode"] != null && Session["ExchangeMode"].ToString() == "Online") { int TOcpmaretime = int.Parse(DateTime.Now.ToShortTimeString().Split(':')[0]); if (TOcpmaretime >= int.Parse(ConfigurationSettings.AppSettings["START_TIME"]) && TOcpmaretime < int.Parse(ConfigurationSettings.AppSettings["END_TIME"])) { ScriptManager.RegisterStartupScript(this, typeof(Page), "LoadBottomPanelFromBlocking", "LoadTransactPanel('MFOnlineSchemeManager');", true); } else { ScriptManager.RegisterStartupScript(this, typeof(Page), "LoadBottomPanelFromBlocking", "LoadTransactPanel('MFOrderPurchaseTransType');", true); } } }
private void CheckForBusinessDate() { bool isBusinessDate = boCommon.CheckForBusinessDate(DateTime.Now); if (!isBusinessDate) { btnIssueExtract.Enabled = false; btnIssueExtract.ToolTip = "Today is not a valid business date"; } }
private void CheckForBusinessDate() { bool isBusinessDate = boCommon.CheckForBusinessDate(DateTime.Now); if (!isBusinessDate) { btnExtractData.Enabled = false; btnCreateFiles.Enabled = false; btnExtractData.ToolTip = "Today is not a valid business date"; btnCreateFiles.ToolTip = "Today is not a valid business date"; } }
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; rwTermsCondition.VisibleOnPageLoad = false; TimeSpan now = DateTime.Now.TimeOfDay; if (System.Web.HttpContext.Current.Session["BackOfficeUserId"] != null) { BackOfficeUserId = Convert.ToInt32(Session["BackOfficeUserId"]); } else { BackOfficeUserId = 0; } if (Session["ExchangeMode"] != null && Session["ExchangeMode"].ToString() == "Demat") { CommonLookupBo boCommon = new CommonLookupBo(); if (!boCommon.CheckForBusinessDate(DateTime.Now)) { ScriptManager.RegisterStartupScript(this, typeof(Page), "LoadBottomPanelFromBlocking", "LoadTransactPanel('MFOnlineSchemeManager');", true); return; } if (!(now >= TimeSpan.Parse(ConfigurationSettings.AppSettings["BSETradeOpTime"]) && now <= TimeSpan.Parse(ConfigurationSettings.AppSettings["BSETradeEnTime"]))) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscriptvwewv", "LoadTransactPanel('MFOnlineSchemeManager')", true); return; } } int TOcpmaretime = int.Parse(DateTime.Now.ToShortTimeString().Split(':')[0]); if (TOcpmaretime >= int.Parse(ConfigurationSettings.AppSettings["START_TIME"]) && TOcpmaretime < int.Parse(ConfigurationSettings.AppSettings["END_TIME"])) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscriptvwewv", "LoadTransactPanel('MFOnlineSchemeManager')", true); return; } if (Session["ExchangeMode"] != null) { exchangeType = Session["ExchangeMode"].ToString(); } else { exchangeType = "Online"; } if (!IsPostBack) { clientMFAccessCode = onlineMforderBo.GetClientMFAccessStatus(customerVo.CustomerId); if (clientMFAccessCode == "FA" || clientMFAccessCode == "PA") { AmcBind(); //CategoryBind(); BindNomineeAndJointHolders(); dtgetfolioNo = commonLookupBo.GetFolioNumberForSIP(0, customerVo.CustomerId, exchangeType == "Online" ? 0 : 1); lnkOfferDoc.Visible = false; lnkFactSheet.Visible = false; lnkExitLoad.Visible = false; //txtRedeemTypeValue.Visible = false; //lblOption.Visible = false; //lblDividendType.Visible = false; trDividendOption.Visible = false; trRedeemType.Visible = true; 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; if (Request.QueryString["accountId"] != null) { schemeCode = int.Parse(Session["MFSchemePlan"].ToString()); accountId = int.Parse(Request.QueryString["accountId"].ToString()); //commonLookupBo.GetSchemeAMCCategory(schemeCode, out amcCode, out category); commonLookupBo.GetSchemeAMCSchemeCategory(int.Parse(Session["MFSchemePlan"].ToString()), out amcCode, out category, out categoryname, out amcName, out schemeName, out IsSIPAvaliable, out IspurchaseAvaliable, out IsRedeemAvaliable, exchangeType == "Online" ? 1 : 0); if (IsRedeemAvaliable != 1) { ShowMessage("Redeem is not available", 'I'); return; } lblAmc.Text = amcName; lblCategory.Text = categoryname; lblScheme.Text = schemeName; dtgetfolioNo = commonLookupBo.GetFolioNumberForSIP(amcCode, customerVo.CustomerId, exchangeType == "Online" ? 0 : 1); SetSelectedDisplay(accountId, int.Parse(Session["MFSchemePlan"].ToString()), amcCode, category); } else { commonLookupBo.GetSchemeAMCSchemeCategory(int.Parse(Session["MFSchemePlan"].ToString()), out amcCode, out category, out categoryname, out amcName, out schemeName, out IsSIPAvaliable, out IspurchaseAvaliable, out IsRedeemAvaliable, exchangeType == "Online" ? 1 : 0); if (IsRedeemAvaliable != 1) { ShowMessage("Redeem is not available", 'I'); return; } lblAmc.Text = amcName; lblCategory.Text = categoryname; lblScheme.Text = schemeName; SetSelectedDisplay(0, int.Parse(Session["MFSchemePlan"].ToString()), amcCode, category); } } } else { ShowMessage(onlineMforderBo.GetOnlineOrderUserMessage(clientMFAccessCode), 'F'); PurchaseOrderControlsEnable(false); divControlContainer.Visible = false; divClientAccountBalance.Visible = false; } } }
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"]; Session["OrderId"] = OrderId; if (System.Web.HttpContext.Current.Session["BackOfficeUserId"] != null) { BackOfficeUserId = Convert.ToInt32(Session["BackOfficeUserId"]); } else { BackOfficeUserId = 0; } RadInformation.VisibleOnPageLoad = false; TimeSpan now = DateTime.Now.TimeOfDay; if (Session["ExchangeMode"] != null && Session["ExchangeMode"].ToString() == "Demat") { CommonLookupBo boCommon = new CommonLookupBo(); if (!boCommon.CheckForBusinessDate(DateTime.Now)) { ScriptManager.RegisterStartupScript(this, typeof(Page), "LoadBottomPanelFromBlocking", "LoadTransactPanel('MFOnlineSchemeManager');", true); return; } if (!(now >= TimeSpan.Parse(ConfigurationSettings.AppSettings["BSETradeOpTime"]) && now <= TimeSpan.Parse(ConfigurationSettings.AppSettings["BSETradeEnTime"]))) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscriptvwewv", "LoadTransactPanel('MFOnlineSchemeManager')", true); return; } } int TOcpmaretime = int.Parse(DateTime.Now.ToShortTimeString().Split(':')[0]); if (TOcpmaretime >= int.Parse(ConfigurationSettings.AppSettings["START_TIME"]) && TOcpmaretime < int.Parse(ConfigurationSettings.AppSettings["END_TIME"])) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscriptvwewv", "LoadTransactPanel('MFOnlineSchemeManager')", true); return; } if (Session["ExchangeMode"] != null) { exchangeType = Session["ExchangeMode"].ToString(); } else { exchangeType = "Online"; } if (!IsPostBack) { BindKYCDetailDDl(); clientMFAccessCode = onlineMforderBo.GetClientMFAccessStatus(customerVo.CustomerId); if (clientMFAccessCode == "FA") { ShowAvailableLimits(); lblOption.Visible = false; lblDividendType.Visible = false; 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; if (Request.QueryString["accountId"] != null) { schemeCode = int.Parse(Session["MFSchemePlan"].ToString()); accountId = int.Parse(Request.QueryString["accountId"].ToString()); commonLookupBo.GetSchemeAMCSchemeCategory(int.Parse(Session["MFSchemePlan"].ToString()), out amcCode, out category, out categoryname, out amcName, out schemeName, out IsSIPAvaliable, out IspurchaseAvaliable, out IsRedeemAvaliable, exchangeType == "Online" ? 1 : 0); lblNavDisplay.Text = ""; lblMintxt.Text = ""; lblMulti.Text = ""; lbltime.Text = ""; lblSchemeRatingAsOn.Text = ""; if (IspurchaseAvaliable != 1) { ShowMessage("Purchase is not available", 'I'); return; } lblAmc.Text = amcName; lblCategory.Text = categoryname; lblScheme.Text = schemeName; BindFolioNumber(int.Parse(Session["MFSchemePlan"].ToString())); ddlFolio.SelectedValue = accountId.ToString(); tdFolio.Visible = true; DataSet ds = onlineMforderBo.GetCustomerSchemeFolioHoldings(customerVo.CustomerId, int.Parse(Session["MFSchemePlan"].ToString()), out schemeDividendOption, exchangeType == "Online" ? 1 : 0, accountId); GetControlDetails(ds); SetControlDetails(); } else { //if (exchangeType == "Online") // tdFolio.Visible = true; //else //{ DataSet ds; ds = onlineMforderBo.GetControlDetails(int.Parse(Session["MFSchemePlan"].ToString()), null, exchangeType == "Online" ? 1 : 0); lblUnitsheldDisplay.Visible = false; GetControlDetails(ds); //} scheme = int.Parse(Session["MFSchemePlan"].ToString()); lblNavDisplay.Text = ""; lblMintxt.Text = ""; lblMulti.Text = ""; lbltime.Text = ""; lblSchemeRatingAsOn.Text = ""; //commonLookupBo.GetSchemeAMCCategory(38122, out amcCode, out category); commonLookupBo.GetSchemeAMCSchemeCategory(int.Parse(Session["MFSchemePlan"].ToString()), out amcCode, out category, out categoryname, out amcName, out schemeName, out IsSIPAvaliable, out IspurchaseAvaliable, out IsRedeemAvaliable, exchangeType == "Online" ? 1 : 0); if (IspurchaseAvaliable != 1) { ShowMessage("Purchase is not available", 'I'); return; } BindFolioNumber(int.Parse(Session["MFSchemePlan"].ToString())); lblAmc.Text = amcName; lblScheme.Text = schemeName; lblCategory.Text = categoryname; DataSet dst = onlineMforderBo.GetControlDetails(int.Parse(Session["MFSchemePlan"].ToString()), null, exchangeType == "Online" ? 1 : 0); lblUnitsheldDisplay.Visible = false; GetControlDetails(dst); SetControlDetails(); } } } else { ShowMessage(onlineMforderBo.GetOnlineOrderUserMessage(clientMFAccessCode), 'I'); PurchaseOrderControlsEnable(false); divControlContainer.Visible = false; } } }
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"]; Session["OrderId"] = OrderId; RadInformation.VisibleOnPageLoad = false; TimeSpan now = DateTime.Now.TimeOfDay; if (System.Web.HttpContext.Current.Session["BackOfficeUserId"] != null) { BackOfficeUserId = Convert.ToInt32(Session["BackOfficeUserId"]); } else { BackOfficeUserId = 0; } if (Session["ExchangeMode"] != null && Session["ExchangeMode"].ToString() == "Demat") { CommonLookupBo boCommon = new CommonLookupBo(); if (!boCommon.CheckForBusinessDate(DateTime.Now)) { ScriptManager.RegisterStartupScript(this, typeof(Page), "LoadBottomPanelFromBlocking", "LoadTransactPanel('MFOnlineSchemeManager');", true); return; } if (!(now >= TimeSpan.Parse(ConfigurationSettings.AppSettings["BSETradeOpTime"]) && now <= TimeSpan.Parse(ConfigurationSettings.AppSettings["BSETradeEnTime"]))) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscriptvwewv", "LoadTransactPanel('MFOnlineSchemeManager')", true); return; } } int TOcpmaretime = int.Parse(DateTime.Now.ToShortTimeString().Split(':')[0]); if (TOcpmaretime >= int.Parse(ConfigurationSettings.AppSettings["START_TIME"]) && TOcpmaretime < int.Parse(ConfigurationSettings.AppSettings["END_TIME"])) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscriptvwewv", "LoadTransactPanel('MFOnlineSchemeManager')", true); return; } if (Session["ExchangeMode"] != null) { exchangeType = Session["ExchangeMode"].ToString(); } else { exchangeType = "Online"; } if (!IsPostBack) { clientMFAccessCode = onlineMforderBo.GetClientMFAccessStatus(customerVo.CustomerId); if (clientMFAccessCode == "FA") { ShowAvailableLimits(); BindNFOSchemeList(); BindNomineeAndJointHolders(); lblOption.Visible = false; lblDividendType.Visible = false; if (Session["MFSchemePlan"] != null) { ddlScheme.SelectedValue = Session["MFSchemePlan"].ToString(); if (ddlScheme.SelectedValue != "") { lblScheme.Text = ddlScheme.SelectedItem.Text; } GetControlDetails(int.Parse(Session["MFSchemePlan"].ToString()), null); SetControlDetails(); } } else { ShowMessage(onlineMforderBo.GetOnlineOrderUserMessage(clientMFAccessCode), 'I'); PurchaseOrderControlsEnable(false); divControlContainer.Visible = false; divClientAccountBalance.Visible = false; } } }