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 Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); UserType = Session["UserType"].ToString().Trim(); if (!string.IsNullOrEmpty(Session["advisorVo"].ToString())) { advisorVo = (AdvisorVo)Session["advisorVo"]; } if (!string.IsNullOrEmpty(Session[SessionContents.RmVo].ToString())) { rmVo = (RMVo)Session[SessionContents.RmVo]; } //if (Session["UserType"] != null) //{ // if (Session["UserType"].ToString() == "Customer") // strFromCustomerDashBoard = true; //} if (UserType == "Customer")//&& strFromCustomerDashBoard == true { if (!string.IsNullOrEmpty(Session["CustomerVo"].ToString())) { customerVo = (CustomerVo)Session["CustomerVo"]; } isGrpHead = customerBo.CheckCustomerGroupHead(customerVo.CustomerId); if (isGrpHead == false) { trCustomerType.Visible = false; } else { trCustomerType.Visible = true; } CustomerLogin = true; hndCustomerLogin.Value = "true"; Session["hndCustomerLogin"] = hndCustomerLogin.Value; trAdminRmButton.Visible = true; trAdminCustomer.Visible = false; lblReportStep.Text = customerVo.FirstName + " " + customerVo.MiddleName + " " + customerVo.LastName; trGroupCustomerDetails.Visible = true; } else { hndCustomerLogin.Value = "false"; Session["hndCustomerLogin"] = hndCustomerLogin.Value; trAdminRmButton.Visible = true; } if (!IsPostBack) { advisorId = advisorVo.advisorId; AddCustomReports(); if (CustomerLogin == true) { trAdminCustomer.Visible = false; //trStepGrHead.Visible = false; hdnCustomerId1.Value = customerVo.CustomerId.ToString(); IndivisulCustomerLogin(); ShowFolios(); } else { trAdminCustomer.Visible = true; trStepGrHead.Visible = true; //This for Customer Search AutoCompelete TextBox Dynamic Assign Service Method. if (Session[SessionContents.CurrentUserRole].ToString() == "RM") { txtParentCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); txtParentCustomer_autoCompleteExtender.ServiceMethod = "GetMemberCustomerName"; } else if (Session[SessionContents.CurrentUserRole].ToString() == "Admin" || Session[SessionContents.CurrentUserRole].ToString() == "Ops") { txtParentCustomer_autoCompleteExtender.ContextKey = advisorVo.advisorId.ToString(); txtParentCustomer_autoCompleteExtender.ServiceMethod = "GetAdviserCustomerName"; } } txtAsOnDate.Text = DateTime.Now.ToShortDateString(); txtFromDate.Text = DateTime.Now.ToShortDateString();; txtToDate.Text = DateTime.Now.ToShortDateString();; } }
protected void Page_Load(object sender, EventArgs e) { bool isGrpHead = false; try { SessionBo.CheckSession(); customerVo = (CustomerVo)Session["CustomerVo"]; if (customerVo != null) { Session[SessionContents.FPS_ProspectList_CustomerId] = customerVo.CustomerId; } if (!IsPostBack) { //customerVo = (CustomerVo)Session["CustomerVo"]; //customerVo = (CustomerVo)Session["CustomerVo"]; if (customerVo.FirstName != null && customerVo.MiddleName != null && customerVo.LastName != null) { string First = customerVo.FirstName.ToString(); string Middle = customerVo.MiddleName.ToString(); string Last = customerVo.LastName.ToString(); isGrpHead = customerBo.CheckCustomerGroupHead(customerVo.CustomerId); if (isGrpHead == true) { //TreeView1.Nodes.AddAt(1, new TreeNode("Group Dashboard")); RadPanelBar1.Items.Insert(1, new Telerik.Web.UI.RadPanelItem("Group Dashboard")); } if (Middle != "") { lblNameValue.Text = customerVo.FirstName.ToString() + " " + customerVo.MiddleName.ToString() + " " + customerVo.LastName.ToString(); } else { lblNameValue.Text = customerVo.FirstName.ToString() + " " + customerVo.LastName.ToString(); } lblEmailIdValue.Text = customerVo.Email.ToString(); } //TreeView1.CollapseAll(); RadPanelBar1.CollapseAllItems(); //TreeView1.FindNode("Portfolio Dashboard").Expand(); RadPanelBar1.FindItemByValue("Portfolio Dashboard").Expanded = true; } if (customerVo.UserType == "IND") { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadtopmenu('CustomerIndividualLeftPane');", true); } else { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadtopmenu('CustomerNonIndividualLeftPane');", 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:Page_Load()"); object[] objects = new object[1]; objects[0] = customerVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void Page_Load(object sender, EventArgs e) { //if (!IsPostBack) //{ // customerVo = (CustomerVo)Session[SessionContents.CustomerVo]; // string First = customerVo.FirstName.ToString(); // string Middle = customerVo.MiddleName.ToString(); // string Last = customerVo.LastName.ToString(); // if (Middle != "") // { // lblNameValue.Text = customerVo.FirstName.ToString() + " " + customerVo.MiddleName.ToString() + " " + customerVo.LastName.ToString(); // } // else // { // lblNameValue.Text = customerVo.FirstName.ToString() + " " + customerVo.LastName.ToString(); // } // lblEmailIdValue.Text = customerVo.Email.ToString(); //} SessionBo.CheckSession(); customerVo = (CustomerVo)Session[SessionContents.CustomerVo]; if (customerVo != null) { Session[SessionContents.FPS_ProspectList_CustomerId] = customerVo.CustomerId; } if (!IsPostBack) { isGrpHead = customerBo.CheckCustomerGroupHead(customerVo.CustomerId); if (isGrpHead == true) { TreeView1.Nodes.AddAt(0, new TreeNode("Group Home")); Session["IsDashboard"] = "true"; } else { Session["IsDashboard"] = "CustDashboard"; } string IsDashboard = string.Empty; if (Session["IsDashboard"] != null) { IsDashboard = Session["IsDashboard"].ToString(); } if (IsDashboard == "true") { TreeView1.CollapseAll(); if (customerVo.RelationShip == "SELF") { TreeView1.FindNode("Group Home").Selected = true; } else { TreeView1.FindNode("Customer Dashboard").Selected = true; } Session["IsDashboard"] = "false"; } else if (IsDashboard == "CustDashboard") { TreeView1.CollapseAll(); TreeView1.FindNode("Customer Dashboard").Selected = true; } else { TreeView1.CollapseAll(); TreeView1.FindNode("Profile Dashboard").Expand(); TreeView1.FindNode("Profile Dashboard").Selected = true; } } ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadtopmenu('CustomerIndividualLeftPane');", true); }
protected void btnSignIn_Click(object sender, EventArgs e) { UserVo userVo = new UserVo(); UserBo userBo = new UserBo(); AdvisorStaffBo advisorStaffBo = new AdvisorStaffBo(); AdvisorBranchBo advisorBranchBo = new AdvisorBranchBo(); AdvisorBranchVo advisorBranchVo = new AdvisorBranchVo(); RMVo rmVo = new RMVo(); AdvisorBo advisorBo = new AdvisorBo(); AdvisorVo advisorVo = new AdvisorVo(); CustomerBo customerBo = new CustomerBo(); CustomerVo customerVo = new CustomerVo(); List <string> roleList = new List <string>(); string sourcePath = ""; string branchLogoSourcePath = ""; int count; bool isGrpHead = false; if (!CheckSuperAdmin()) { if (txtLoginId.Text == "" || txtPassword.Text == "") { lblIllegal.Visible = true; lblIllegal.Text = "Username and Password does not match"; } else { if (userBo.ValidateUser(txtLoginId.Text, txtPassword.Text)) // Validating the User Using the Username and Password { Session["id"] = ""; lblIllegal.Visible = true; userVo = userBo.GetUser(txtLoginId.Text); Session["UserVo"] = userVo; AddLoginTrack(txtLoginId.Text, txtPassword.Text, true, userVo.UserId); if (userVo.theme != null) { Session["Theme"] = userVo.theme.ToString(); Session["refreshTheme"] = true; } else { Session["Theme"] = "Purple"; Session["refreshTheme"] = true; } if (userVo.IsTempPassword == 0) { string UserName = userVo.FirstName + " " + userVo.LastName; if (userVo.UserType == "Advisor") { Session[SessionContents.CurrentUserRole] = "Admin"; Session["advisorVo"] = advisorBo.GetAdvisorUser(userVo.UserId); Session["rmVo"] = advisorStaffBo.GetAdvisorStaff(userVo.UserId); advisorVo = (AdvisorVo)Session["advisorVo"]; rmVo = (RMVo)Session["rmVo"]; Session["adviserId"] = advisorBo.GetRMAdviserId(rmVo.RMId); if (advisorVo.LogoPath == null || advisorVo.LogoPath == "") { advisorVo.LogoPath = "spacer.png"; } else { sourcePath = "Images/" + advisorVo.LogoPath.ToString(); if (!System.IO.File.Exists(Server.MapPath(sourcePath))) { sourcePath = ""; } } Session[SessionContents.LogoPath] = sourcePath; roleList = userBo.GetUserRoles(userVo.UserId); count = roleList.Count; if (count == 3) { advisorBranchVo = advisorBranchBo.GetBranch(advisorBranchBo.GetBranchId(rmVo.RMId)); Session["advisorBranchVo"] = advisorBranchVo; branchLogoSourcePath = "Images/" + userBo.GetRMBranchLogo(rmVo.RMId); Session[SessionContents.BranchLogoPath] = branchLogoSourcePath; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMBMDashBoard','login','" + UserName + "','" + sourcePath + "');", true); //login user role Type Session["S_CurrentUserRole"] = "Admin"; } if (count == 2) { if (roleList.Contains("RM") && roleList.Contains("BM")) { advisorBranchVo = advisorBranchBo.GetBranch(advisorBranchBo.GetBranchId(rmVo.RMId)); Session["advisorBranchVo"] = advisorBranchVo; //login user role Type Session["S_CurrentUserRole"] = "RM"; branchLogoSourcePath = "Images/" + userBo.GetRMBranchLogo(rmVo.RMId); Session[SessionContents.BranchLogoPath] = branchLogoSourcePath; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('BMRMDashBoard','login','" + UserName + "','" + sourcePath + "','" + branchLogoSourcePath + "');", true); } else if (roleList.Contains("RM") && roleList.Contains("Admin")) { advisorBranchVo = advisorBranchBo.GetBranch(advisorBranchBo.GetBranchId(rmVo.RMId)); Session["advisorBranchVo"] = advisorBranchVo; //login user role Type Session["S_CurrentUserRole"] = "Admin"; branchLogoSourcePath = "Images/" + userBo.GetRMBranchLogo(rmVo.RMId); Session[SessionContents.BranchLogoPath] = branchLogoSourcePath; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMDashBoard','login','" + UserName + "','" + sourcePath + "');", true); } else if (roleList.Contains("BM") && roleList.Contains("Admin")) { advisorBranchVo = advisorBranchBo.GetBranch(advisorBranchBo.GetBranchId(rmVo.RMId)); Session["advisorBranchVo"] = advisorBranchVo; branchLogoSourcePath = "Images/" + userBo.GetRMBranchLogo(rmVo.RMId); Session[SessionContents.BranchLogoPath] = branchLogoSourcePath; //login user role Type Session["S_CurrentUserRole"] = "Admin"; } } if (count == 1) { if (roleList.Contains("RM")) { Session["adviserId"] = advisorBo.GetRMAdviserId(rmVo.RMId); //Session["advisorVo"]=advisorBo.GetAdvisor( branchLogoSourcePath = "Images/" + userBo.GetRMBranchLogo(rmVo.RMId); sourcePath = "Images/" + userBo.GetRMLogo(rmVo.RMId); Session[SessionContents.LogoPath] = sourcePath; Session[SessionContents.BranchLogoPath] = branchLogoSourcePath; //login user role Type Issue Reported by Ajay on July 1 2010 Session["S_CurrentUserRole"] = "RM"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('RMDashBoard','login','" + UserName + "','" + sourcePath + "','" + branchLogoSourcePath + "');", true); } else if (roleList.Contains("BM")) { advisorBranchVo = advisorBranchBo.GetBranch(advisorBranchBo.GetBranchId(rmVo.RMId)); Session["advisorBranchVo"] = advisorBranchVo; branchLogoSourcePath = "Images/" + userBo.GetRMBranchLogo(rmVo.RMId); Session[SessionContents.BranchLogoPath] = branchLogoSourcePath; //login user role Type Issue Reported by Ajay on July 1 2010 Session["S_CurrentUserRole"] = "BM"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('BMDashBoard','login','" + UserName + "','" + sourcePath + "','" + branchLogoSourcePath + "');", true); } else { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorDashBoard','login','" + UserName + "','" + sourcePath + "');", true); } } GetLatestValuationDate(); } else if (userVo.UserType == "Customer") { customerVo = customerBo.GetCustomerInfo(userVo.UserId); //Session["advisorVo"] = advisorBo.GetAdvisorUser(userVo.UserId); Session["CustomerVo"] = customerVo; customerVo = (CustomerVo)Session["CustomerVo"]; advisorVo = advisorBo.GetAdvisor(advisorBranchBo.GetBranch(customerVo.BranchId).AdviserId); rmVo = advisorStaffBo.GetAdvisorStaffDetails(customerVo.RmId); Session["rmVo"] = rmVo; Session["advisorVo"] = advisorVo; //if(customerVo!=null){ sourcePath = "Images/" + userBo.GetCustomerLogo(customerVo.CustomerId); Session[SessionContents.LogoPath] = sourcePath; Session["S_CurrentUserRole"] = "Customer"; GetLatestValuationDate(); Session["IsDashboard"] = "true"; isGrpHead = customerBo.CheckCustomerGroupHead(customerVo.CustomerId); if (isGrpHead == true) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMCustGroupDashboard','login','" + UserName + "','" + sourcePath + "');", true); } else { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMCustIndiDashboard','login','" + UserName + "','" + sourcePath + "');", true); } } else if (userVo.UserType == "Admin") { Session["refreshTheme"] = false; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('AdminUpload','login','" + UserName + "','');", true); } } else { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('ChangeTempPassword','none');", true); } } else { lblIllegal.Visible = true; lblIllegal.Text = "Username and Password does not match"; AddLoginTrack(txtLoginId.Text, txtPassword.Text, false, 0); } } } }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); string First = null; string Middle = null; string Last = null; bool isGrpHead = false; try { if (!IsPostBack) { customerVo = (CustomerVo)Session[SessionContents.CustomerVo]; First = customerVo.FirstName.ToString(); Middle = customerVo.MiddleName.ToString(); Last = customerVo.LastName.ToString(); isGrpHead = customerBo.CheckCustomerGroupHead(customerVo.CustomerId); if (isGrpHead == true) { TreeView1.Nodes.AddAt(1, new TreeNode("Group Dashboard")); } if (Middle != "") { lblNameValue.Text = customerVo.FirstName.ToString() + " " + customerVo.MiddleName.ToString() + " " + customerVo.LastName.ToString(); } else { lblNameValue.Text = customerVo.FirstName.ToString() + " " + customerVo.LastName.ToString(); } TreeView1.CollapseAll(); TreeView1.FindNode("Alert Dashboard").Expand(); TreeView1.FindNode("Alert Dashboard").ChildNodes[0].Selected = true; lblEmailIdValue.Text = customerVo.Email.ToString(); } } 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:Page_Load()"); object[] objects = new object[4]; objects[0] = customerVo; objects[1] = First; objects[2] = Middle; objects[3] = Last; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session["UserVo"]; if (Request.Form["ctrl_EquityReports$btnView"] != "View Report") { path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); if (!string.IsNullOrEmpty(Session[SessionContents.RmVo].ToString())) { rmVo = (RMVo)Session[SessionContents.RmVo]; } if (Session["UserType"] != null) { if (Session["UserType"].ToString() == "Customer") { strFromCustomerDashBoard = true; } } if (Session["UserType"].ToString().Trim() == "Customer" && strFromCustomerDashBoard == true) { if (!string.IsNullOrEmpty(Session["CustomerVo"].ToString())) { customerVo = (CustomerVo)Session["CustomerVo"]; } isGrpHead = customerBo.CheckCustomerGroupHead(customerVo.CustomerId); if (isGrpHead == false) { TabPanel1.Visible = false; TabPanel2.Visible = true; if (!IsPostBack) { HdnIsGroupHeadReport.Value = "1"; } } else { TabPanel1.Visible = true; TabPanel2.Visible = true; if (!IsPostBack) { HdnIsGroupHeadReport.Value = "0"; } } CustomerLogin = true; hndCustomerLogin.Value = "true"; Session["hndCustomerLogin"] = hndCustomerLogin.Value; trCustomerButton.Visible = true; trAdminRmButton.Visible = false; } else { hndCustomerLogin.Value = "false"; Session["hndCustomerLogin"] = hndCustomerLogin.Value; trCustomerButton.Visible = false; trAdminRmButton.Visible = true; } BindPeriodDropDown(); if (!string.IsNullOrEmpty(Session["advisorVo"].ToString())) { advisorVo = (AdvisorVo)Session["advisorVo"]; } if (!IsPostBack) { txtFromDate.Text = DateTime.Now.AddMonths(-1).ToString("dd-MM-yyyy"); txtToDate.Text = DateTime.Now.ToString("dd-MM-yyyy"); CustomerTransactionBo customerTransactionBo = new CustomerTransactionBo(); DataSet ds = customerTransactionBo.GetLastTradeDate(); if (ds.Tables != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0 && ds.Tables[0].Rows[0]["WTD_Date"] != null) { txtAsOnDate.Text = Convert.ToDateTime(ds.Tables[0].Rows[0]["WTD_Date"]).ToShortDateString(); } txtFromDate.Text = DateTime.Now.AddMonths(-1).ToString("dd-MM-yyyy"); txtToDate.Text = DateTime.Now.ToString("dd-MM-yyyy"); if (CustomerLogin == true) { trCustomerGrHead.Visible = true; trAdminCustomer.Visible = false; trAdminIndiCustomer.Visible = false; trCustomerInd.Visible = true; trStepIndi.Visible = false; trStepGrHead.Visible = false; hdnCustomerId1.Value = customerVo.CustomerId.ToString(); ShowGroupCustomers(); IndivisulCustomerLogin(); } else { trCustomerGrHead.Visible = false; trAdminCustomer.Visible = true; trAdminIndiCustomer.Visible = true; trCustomerInd.Visible = false; trStepIndi.Visible = true; trStepGrHead.Visible = true; if (Session[SessionContents.CurrentUserRole].ToString() == "RM") { txtCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); txtParentCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); txtCustomer_autoCompleteExtender.ServiceMethod = "GetMemberCustomerName"; txtParentCustomer_autoCompleteExtender.ServiceMethod = "GetParentCustomerName"; } else if (Session[SessionContents.CurrentUserRole].ToString() == "Admin" || Session[SessionContents.CurrentUserRole].ToString() == "Ops") { txtCustomer_autoCompleteExtender.ContextKey = advisorVo.advisorId.ToString(); txtParentCustomer_autoCompleteExtender.ContextKey = advisorVo.advisorId.ToString(); txtCustomer_autoCompleteExtender.ServiceMethod = "GetAdviserCustomerName"; txtParentCustomer_autoCompleteExtender.ServiceMethod = "GetAdviserGroupCustomerName"; } } } if (IsPostBack && !string.IsNullOrEmpty(Request.Form["ctrl_EquityReports$hidTabIndex"])) { activeTabIndex = Convert.ToInt32(Request.Form["ctrl_EquityReports$hidTabIndex"]); } } }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session["UserVo"]; //ddlReportSubType.Attributes.Add("onchange", "ChangeDates()"); rdoGroup.Attributes.Add("onClick", "javascript:ChangeCustomerSelectionTextBox(value);"); rdoIndividual.Attributes.Add("onClick", "javascript:ChangeCustomerSelectionTextBox(value);"); rdoCustomerGroup.Attributes.Add("onClick", "javascript:ChangeGroupOrSelf(value);"); rdoCustomerIndivisual.Attributes.Add("onClick", "javascript:ChangeGroupOrSelf(value);"); if (!string.IsNullOrEmpty(Session["advisorVo"].ToString())) { advisorVo = (AdvisorVo)Session["advisorVo"]; } // cvAsOnDate.ValueToCompare = DateTime.Now.ToShortDateString(); if (Request.Form["ctrl_MFReports$tabViewAndEmailReports$tabpnlViewReports$btnViewReport"] != "View Report" && Request.Form["ctrl_MFReports$tabViewAndEmailReports$tabpnlEmailReports$btnEmailReport"] != "Email Report") { path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); if (!string.IsNullOrEmpty(Session[SessionContents.RmVo].ToString())) { rmVo = (RMVo)Session[SessionContents.RmVo]; } if (Session["UserType"] != null) { if (Session["UserType"].ToString() == "Customer") { strFromCustomerDashBoard = true; } } if (userVo.UserType == "Customer" || strFromCustomerDashBoard == true) { if (!string.IsNullOrEmpty(Session["CustomerVo"].ToString())) { customerVo = (CustomerVo)Session["CustomerVo"]; } CustomerLogin = true; hndCustomerLogin.Value = "true"; Session["hndCustomerLogin"] = hndCustomerLogin.Value; tabpnlEmailReports.Visible = false; } else { hndCustomerLogin.Value = "false"; Session["hndCustomerLogin"] = hndCustomerLogin.Value; } BindPeriodDropDown(); //if (CustomerLogin == false) //{ // txtCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); // txtParentCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); //} if (!IsPostBack) { ddlMFTransactionTypeBind(); if (CustomerLogin == true) { trCustomerName.Visible = true; trIndCustomer.Visible = false; trGroupCustomer.Visible = false; IndivisulCustomerLogin(); trAdvisorRadioList.Visible = false; trCustomerRadioList.Visible = true; trAdminRM.Visible = false; trCustomer.Visible = true; isGrpHead = customerBo.CheckCustomerGroupHead(customerVo.CustomerId); if (isGrpHead == false) { trCustomerRadioList.Visible = false; rdoCustomerIndivisual.Checked = true; divGroupCustomers.Visible = false; hndSelfOrGroup.Value = "self"; ShowFolios(); } else { rdoCustomerGroup.Checked = true; hndSelfOrGroup.Value = ""; } } else { trCustomerName.Visible = false; trIndCustomer.Visible = true; trGroupCustomer.Visible = true; trAdvisorRadioList.Visible = true; trCustomerRadioList.Visible = false; trAdminRM.Visible = true; trCustomer.Visible = false; } //tabpnlEmailReports.Visible = false; if (CustomerLogin == false) { //This for Customer Search AutoCompelete TextBox Dynamic Assign Service Method. //if (Session[SessionContents.CurrentUserRole].ToString() == "RM") //{ // txtCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); // txtParentCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); // txtCustomer_autoCompleteExtender.ServiceMethod = "GetMemberCustomerName"; // txtParentCustomer_autoCompleteExtender.ServiceMethod = "GetParentCustomerName"; //} //else if (Session[SessionContents.CurrentUserRole].ToString() == "Admin") //{ // txtCustomer_autoCompleteExtender.ContextKey = advisorVo.advisorId.ToString(); // txtParentCustomer_autoCompleteExtender.ContextKey = advisorVo.advisorId.ToString(); // txtCustomer_autoCompleteExtender.ServiceMethod = "GetAdviserCustomerName"; // txtParentCustomer_autoCompleteExtender.ServiceMethod = "GetAdviserGroupCustomerName"; //} //ListBox horizontal Scorling enabled false LBCustomer.HorizontalScrollEnabled = false; LBSelectCustomer.HorizontalScrollEnabled = false; CustomerBo customerBo = new CustomerBo(); DataTable dtGroupCustomerList = new DataTable(); //dtGroupCustomerList = customerBo.GetParentCustomerName("BULKMAIL", int.Parse(rmVo.RMId.ToString())); if (Session[SessionContents.CurrentUserRole].ToString() == "RM") { tabpnlEmailReports.Visible = true; dtGroupCustomerList = customerBo.GetParentCustomerName("BULKMAIL", int.Parse(rmVo.RMId.ToString())); } else if (Session[SessionContents.CurrentUserRole].ToString() == "Admin") { tabpnlEmailReports.Visible = true; dtGroupCustomerList = customerBo.GetAdviserGroupCustomerName("BULKMAIL", int.Parse(advisorVo.advisorId.ToString())); } else if (Session[SessionContents.CurrentUserRole].ToString() == "BM") { tabpnlEmailReports.Visible = false; } LBCustomer.DataSource = dtGroupCustomerList; LBCustomer.DataTextField = "C_FirstName"; LBCustomer.DataValueField = "C_CustomerId"; LBCustomer.DataBind(); } CustomerTransactionBo customerTransactionBo = new CustomerTransactionBo(); DataSet ds = customerTransactionBo.GetLastTradeDate(); if (ds.Tables != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0 && ds.Tables[0].Rows[0]["WTD_Date"] != null) { txtAsOnDate.Text = Convert.ToDateTime(ds.Tables[0].Rows[0]["WTD_Date"]).ToShortDateString(); txtFromDate.Text = Convert.ToDateTime(ds.Tables[0].Rows[0]["WTD_Date"]).ToShortDateString(); txtToDate.Text = Convert.ToDateTime(ds.Tables[0].Rows[0]["WTD_Date"]).ToShortDateString(); txtEmailAsOnDate.Text = Convert.ToDateTime(ds.Tables[0].Rows[0]["WTD_Date"]).ToShortDateString(); txtEmailFromDate.Text = Convert.ToDateTime(ds.Tables[0].Rows[0]["WTD_Date"]).ToShortDateString(); txtEmailToDate.Text = Convert.ToDateTime(ds.Tables[0].Rows[0]["WTD_Date"]).ToShortDateString(); } //Transaction Subreport search invissible intitialy.. //trTranFilter1.Visible = false; //trTranFilter2.Visible = false; tabViewAndEmailReports.ActiveTabIndex = 0; //ShowFolios(); } if (CustomerLogin == false) { if (Session[SessionContents.CurrentUserRole].ToString() == "RM") { hidBMLogin.Value = "False"; txtCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); txtParentCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); txtCustomer_autoCompleteExtender.ServiceMethod = "GetMemberCustomerName"; txtParentCustomer_autoCompleteExtender.ServiceMethod = "GetParentCustomerName"; } else if (Session[SessionContents.CurrentUserRole].ToString() == "Admin") { hidBMLogin.Value = "False"; txtCustomer_autoCompleteExtender.ContextKey = advisorVo.advisorId.ToString(); txtParentCustomer_autoCompleteExtender.ContextKey = advisorVo.advisorId.ToString(); txtCustomer_autoCompleteExtender.ServiceMethod = "GetAdviserCustomerName"; txtParentCustomer_autoCompleteExtender.ServiceMethod = "GetAdviserGroupCustomerName"; } else if (Session[SessionContents.CurrentUserRole].ToString() == "BM") { hidBMLogin.Value = "true"; txtCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); txtParentCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); txtCustomer_autoCompleteExtender.ServiceMethod = "GetBMIndividualCustomerNames"; txtParentCustomer_autoCompleteExtender.ServiceMethod = "GetBMParentCustomerNames"; } } if (IsPostBack && !string.IsNullOrEmpty(Request.Form["ctrl_MFReports$hidTabIndex"])) { activeTabIndex = Convert.ToInt32(Request.Form["ctrl_MFReports$hidTabIndex"]); tabViewAndEmailReports.ActiveTabIndex = activeTabIndex; } } }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); string First = null; string Middle = null; string Last = null; userVo = (UserVo)Session["userVo"]; bool isGrpHead = false; try { customerVo = (CustomerVo)Session[SessionContents.CustomerVo]; if (customerVo != null) { Session[SessionContents.FPS_ProspectList_CustomerId] = customerVo.CustomerId; } if (!IsPostBack) { First = customerVo.FirstName.ToString(); Middle = customerVo.MiddleName.ToString(); Last = customerVo.LastName.ToString(); if (Session[SessionContents.CurrentUserRole].ToString() == "RM") { hdnUserRole.Value = "RM"; } else if (Session[SessionContents.CurrentUserRole].ToString() == "BM") { hdnUserRole.Value = "BM"; } else if (Session[SessionContents.CurrentUserRole].ToString() == "Adviser") { hdnUserRole.Value = "Adviser"; } if (Middle != "") { lblNameValue.Text = customerVo.FirstName.ToString() + " " + customerVo.MiddleName.ToString() + " " + customerVo.LastName.ToString(); } else { lblNameValue.Text = customerVo.FirstName.ToString() + " " + customerVo.LastName.ToString(); } lblEmailIdValue.Text = customerVo.Email.ToString(); isGrpHead = customerBo.CheckCustomerGroupHead(customerVo.CustomerId); if (isGrpHead == true) { //TreeView1.Nodes.AddAt(1, new TreeNode("Group Dashboard")); RadPanelBar1.Items.Insert(1, new Telerik.Web.UI.RadPanelItem("Group Dashboard")); RadPanelBar1.Items.FindItemByText("Group Dashboard").Value = "Group Dashboard"; } string IsDashboard = string.Empty; if (Session["IsDashboard"] != null) { IsDashboard = Session["IsDashboard"].ToString(); } if (IsDashboard == "true") { //TreeView1.CollapseAll(); RadPanelBar1.CollapseAllItems(); if (isGrpHead == true) { //TreeView1.FindNode("Group Dashboard").Selected = true; RadPanelBar1.FindItemByText("Group Dashboard").Selected = true; } else { //TreeView1.FindNode("Customer Dashboard").Selected = true; RadPanelBar1.FindItemByValue("Customer Dashboard").Selected = true; } Session["IsDashboard"] = "false"; } else if (IsDashboard == "CustDashboard") { //TreeView1.CollapseAll(); //TreeView1.FindNode("Customer Dashboard").Selected = true; RadPanelBar1.FindItemByValue("Customer Dashboard").Selected = true; Session["IsDashboard"] = "false"; } else if (Session[SessionContents.FPS_TreeView_Status] != null) { if (Session[SessionContents.FPS_TreeView_Status].ToString() == "FinanceProfile") { //TreeView1.CollapseAll(); //TreeView1.FindNode("Financial Planning").Expand(); RadPanelBar1.FindItemByValue("Financial Planning").Expanded = true; //TreeView1.FindNode("FinanceProfile").Selected = true; //TreeNode tn = new TreeNode("Finance Profile", "FinanceProfile"); RadPanelBar1.FindItemByValue("FinanceProfile").Selected = true; //TreeView1.SelectedNode.Text = "Finance Profile"; } } else { //TreeView1.CollapseAll(); // TreeView1.FindNode("Profile Dashboard").Expand(); // TreeView1.FindNode("Profile Dashboard").Selected = true; } } ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "topMenu", "loadtopmenu('CustomerIndividualLeftPane');", 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:Page_Load()"); object[] objects = new object[4]; objects[0] = customerVo; objects[1] = First; objects[2] = Middle; objects[3] = Last; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }