/// <summary> /// Used to get host configuration general details /// </summary> /// <param name="userId"></param> /// <returns></returns> public GeneralConfigurationVo GetHostGeneralConfiguration(string xmlPath, int hostId) { GeneralConfigurationVo generalConfigurationVo = new GeneralConfigurationVo(); DataSet dsGeneralConfiguration = new DataSet(); try { dsGeneralConfiguration = generalConfigurationDao.GetHostGeneralConfiguration(xmlPath); DataView dvHostDetails = new DataView(dsGeneralConfiguration.Tables["WERPHostConfiguration"], "HAC_HostId=" + hostId.ToString(), "HAC_HostId", DataViewRowState.CurrentRows); DataTable dtHostDetails = dvHostDetails.ToTable("Host"); if (dtHostDetails != null && dtHostDetails.Rows.Count == 1) { generalConfigurationVo.HostLogoPlacement = dtHostDetails.Rows[0]["HAC_HostLogoPlacement"].ToString(); generalConfigurationVo.HostLogo = dtHostDetails.Rows[0]["HAC_HostLogo"].ToString(); generalConfigurationVo.AdviserLogoPlacement = dtHostDetails.Rows[0]["HAC_AdviserLogoPlacement"].ToString(); generalConfigurationVo.DefaultTheme = dtHostDetails.Rows[0]["HAC_DefaultTheme"].ToString(); generalConfigurationVo.ContactPersonName = dtHostDetails.Rows[0]["HAC_ContactPersonName"].ToString(); generalConfigurationVo.ContactPersonTelephoneNumber = Int64.Parse(dtHostDetails.Rows[0]["HAC_TelephoneNumber"].ToString()); generalConfigurationVo.LoginPageContent = dtHostDetails.Rows[0]["HAC_LoginPageContent"].ToString(); generalConfigurationVo.ApplicationName = dtHostDetails.Rows[0]["HAC_ApplicationName"].ToString(); generalConfigurationVo.Email = dtHostDetails.Rows[0]["HAC_Email"].ToString(); } } catch (Exception ex) { } return(generalConfigurationVo); }
protected void Page_PreInit(object sender, EventArgs e) { GeneralConfigurationVo generalconfigurationvo = new GeneralConfigurationVo(); GeneralConfigurationBo generalvonfigurationbo = new GeneralConfigurationBo(); if (!IsPostBack) { generalconfigurationvo = generalvonfigurationbo.GetHostGeneralConfiguration(0); Session[SessionContents.SAC_HostGeneralDetails] = generalconfigurationvo; if (Session[SessionContents.SAC_HostGeneralDetails] != null) { generalconfigurationvo = (GeneralConfigurationVo)Session[SessionContents.SAC_HostGeneralDetails]; if (!string.IsNullOrEmpty(generalconfigurationvo.DefaultTheme)) { if (Session["Theme"] == null || Session["Theme"].ToString() == string.Empty) { Session["Theme"] = generalconfigurationvo.DefaultTheme; } Page.Theme = Session["Theme"].ToString(); } if (!string.IsNullOrEmpty(generalconfigurationvo.ApplicationName)) { Page.Title = generalconfigurationvo.ApplicationName; } } } //if (Session["Theme"] == null || Session["Theme"].ToString() == string.Empty) //{ // Session["Theme"] = "Maroon"; //} //Page.Theme = Session["Theme"].ToString(); }
/// <summary> /// Used to get host configuration general details /// </summary> /// <param name="userId"></param> /// <returns></returns> public GeneralConfigurationVo GetHostGeneralConfiguration(int userId) { GeneralConfigurationVo generalConfigurationVo = new GeneralConfigurationVo(); GeneralConfigurationDao generalConfigurationDao = new GeneralConfigurationDao(); DataSet dsGeneralConfiguration = new DataSet(); try { dsGeneralConfiguration = generalConfigurationDao.GetHostGeneralConfiguration(userId); if (dsGeneralConfiguration != null && dsGeneralConfiguration.Tables[0].Rows.Count == 1) { generalConfigurationVo.HostLogoPlacement = dsGeneralConfiguration.Tables[0].Rows[0]["HAC_HostLogoPlacement"].ToString(); generalConfigurationVo.HostLogo = dsGeneralConfiguration.Tables[0].Rows[0]["HAC_HostLogo"].ToString(); generalConfigurationVo.AdviserLogoPlacement = dsGeneralConfiguration.Tables[0].Rows[0]["HAC_AdviserLogoPlacement"].ToString(); generalConfigurationVo.DefaultTheme = dsGeneralConfiguration.Tables[0].Rows[0]["HAC_DefaultTheme"].ToString(); generalConfigurationVo.ContactPersonName = dsGeneralConfiguration.Tables[0].Rows[0]["HAC_ContactPersonName"].ToString(); generalConfigurationVo.ContactPersonTelephoneNumber = Int64.Parse(dsGeneralConfiguration.Tables[0].Rows[0]["HAC_TelephoneNumber"].ToString()); generalConfigurationVo.LoginPageContent = dsGeneralConfiguration.Tables[0].Rows[0]["HAC_LoginPageContent"].ToString(); generalConfigurationVo.ApplicationName = dsGeneralConfiguration.Tables[0].Rows[0]["HAC_ApplicationName"].ToString(); generalConfigurationVo.Email = dsGeneralConfiguration.Tables[0].Rows[0]["HAC_Email"].ToString(); } } catch (Exception ex) { } return(generalConfigurationVo); }
protected void Page_Load(object sender, EventArgs e) { //uplLogoUpload.TargetFolder = Server.MapPath(@"~/Images/"); ////uplLogoUpload.TemporaryFolder = Server.MapPath(@"/Images/"); //uplLogoUpload.TargetPhysicalFolder = Server.MapPath(@"~/Images/"); if (!IsPostBack) { GeneralConfigurationBo generalconfigurationbo = new GeneralConfigurationBo(); GeneralConfigurationVo generalconfigurationvo = new GeneralConfigurationVo(); UserVo uservo = (UserVo)Session["UserVo"]; string xmlPath = ""; xmlPath = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"]).ToString(); generalconfigurationvo = generalconfigurationbo.GetHostGeneralConfiguration(xmlPath, 1000); if (!String.IsNullOrEmpty(generalconfigurationvo.DefaultTheme)) { ddlApplyTheme.SelectedValue = generalconfigurationvo.DefaultTheme; } if (!String.IsNullOrEmpty(generalconfigurationvo.AdviserLogoPlacement)) { ddlPickAdvisorLogoPosition.SelectedValue = generalconfigurationvo.AdviserLogoPlacement; } if (!String.IsNullOrEmpty(generalconfigurationvo.HostLogoPlacement)) { ddlPickHostLogoPosition.SelectedValue = generalconfigurationvo.HostLogoPlacement; } if (!String.IsNullOrEmpty(generalconfigurationvo.ApplicationName)) { txtApplicationName.Text = generalconfigurationvo.ApplicationName; } if (!String.IsNullOrEmpty(generalconfigurationvo.ContactPersonName)) { txtContactPerson.Text = generalconfigurationvo.ContactPersonName; } if (generalconfigurationvo.ContactPersonTelephoneNumber != 0) { txtTelephoneNo.Text = generalconfigurationvo.ContactPersonTelephoneNumber.ToString(); } if (!String.IsNullOrEmpty(generalconfigurationvo.Email)) { txtEmailId.Text = generalconfigurationvo.Email; } if (!String.IsNullOrEmpty(generalconfigurationvo.LoginPageContent)) { txtLoginPageContent.Text = generalconfigurationvo.LoginPageContent; } //Binary image needed to be here if (!String.IsNullOrEmpty(generalconfigurationvo.HostLogo)) { lblFileUploaded.Visible = true; lblFileUploaded.Text = generalconfigurationvo.HostLogo; //hdnUplFileName.Value = generalconfigurationvo.HostLogo; } } }
/// <summary> /// Used to insert/update host configuration general details /// </summary> /// <param name="userId"></param> /// <param name="generalconfigurationvo"></param> /// <returns></returns> public bool AddHostGeneralConfiguration(int userId, GeneralConfigurationVo generalconfigurationvo) { bool recordStatus = true; try { recordStatus = generalConfigurationDao.AddHostGeneralConfiguration(userId, generalconfigurationvo); } catch (Exception ex) { recordStatus = false; } return(recordStatus); }
protected void btnSubmit_Click(object sender, EventArgs e) { if (Page.IsValid) { GeneralConfigurationVo generalconfigurationvo = new GeneralConfigurationVo(); GeneralConfigurationBo generalconfigurationbo = new GeneralConfigurationBo(); bool recordstatus = true; UserVo uservo = (UserVo)Session["UserVo"]; generalconfigurationvo.AdviserLogoPlacement = ddlPickAdvisorLogoPosition.SelectedValue; generalconfigurationvo.ApplicationName = txtApplicationName.Text; generalconfigurationvo.ContactPersonName = txtContactPerson.Text; if (txtTelephoneNo.Text != string.Empty) { generalconfigurationvo.ContactPersonTelephoneNumber = Int64.Parse(txtTelephoneNo.Text); } generalconfigurationvo.DefaultTheme = ddlApplyTheme.SelectedValue; generalconfigurationvo.Email = txtEmailId.Text; generalconfigurationvo.HostLogoPlacement = ddlPickHostLogoPosition.SelectedValue; generalconfigurationvo.LoginPageContent = txtLoginPageContent.Text; //if (Session["UploadFileName"] != null && Session["UploadFileName"] != string.Empty) //{ // generalconfigurationvo.HostLogo = Session["UploadFileName"].ToString(); //} if (RadUpload1.UploadedFiles != null && RadUpload1.UploadedFiles.Count > 0) { if (!string.IsNullOrEmpty(RadUpload1.UploadedFiles[0].FileName.ToString())) { generalconfigurationvo.HostLogo = RadUpload1.UploadedFiles[0].FileName.ToString();; } } else { generalconfigurationvo.HostLogo = lblFileUploaded.Text; } recordstatus = generalconfigurationbo.AddHostGeneralConfiguration(uservo.UserId, generalconfigurationvo); if (recordstatus) { msgRecordStatus.Visible = true; if (RadUpload1.UploadedFiles != null && RadUpload1.UploadedFiles.Count > 0) { lblFileUploaded.Text = RadUpload1.UploadedFiles[0].FileName.ToString(); } } else { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", @"alert('Something Went Wrong \n Record Status: Unsuccessful');", true); } } }
protected void Page_PreInit(object sender, EventArgs e) { GeneralConfigurationVo generalconfigurationvo = new GeneralConfigurationVo(); if (Session[SessionContents.SAC_HostGeneralDetails] != null) { generalconfigurationvo = (GeneralConfigurationVo)Session[SessionContents.SAC_HostGeneralDetails]; if (!string.IsNullOrEmpty(generalconfigurationvo.DefaultTheme)) { if (Session["Theme"] == null || Session["Theme"].ToString() == string.Empty) { Session["Theme"] = generalconfigurationvo.DefaultTheme; } Page.Theme = Session["Theme"].ToString(); } } }
/// <summary> /// Used to insert/update host configuration general details /// </summary> /// <param name="userId"></param> /// <param name="generalconfigurationvo"></param> /// <returns></returns> public bool AddHostGeneralConfiguration(int userId, GeneralConfigurationVo generalconfigurationvo) { Database db; DbCommand cmdAddHostGeneralConfiguration; bool bRecordStatus = false; try { db = DatabaseFactory.CreateDatabase("wealtherp"); //Adding Data to the table cmdAddHostGeneralConfiguration = db.GetStoredProcCommand("SP_AddHostGeneralConfiguration"); db.AddInParameter(cmdAddHostGeneralConfiguration, "@HAC_HostLogoPlacement", DbType.String, generalconfigurationvo.HostLogoPlacement); db.AddInParameter(cmdAddHostGeneralConfiguration, "@HAC_HostLogo", DbType.String, generalconfigurationvo.HostLogo); db.AddInParameter(cmdAddHostGeneralConfiguration, "@HAC_AdviserLogoPlacement", DbType.String, generalconfigurationvo.AdviserLogoPlacement); db.AddInParameter(cmdAddHostGeneralConfiguration, "@HAC_DefaultTheme", DbType.String, generalconfigurationvo.DefaultTheme); db.AddInParameter(cmdAddHostGeneralConfiguration, "@HAC_ContactPersonName", DbType.String, generalconfigurationvo.ContactPersonName); db.AddInParameter(cmdAddHostGeneralConfiguration, "@HAC_TelephoneNumber", DbType.Int64, generalconfigurationvo.ContactPersonTelephoneNumber); db.AddInParameter(cmdAddHostGeneralConfiguration, "@HAC_LoginPageContent", DbType.String, generalconfigurationvo.LoginPageContent); db.AddInParameter(cmdAddHostGeneralConfiguration, "@HAC_ApplicationName", DbType.String, generalconfigurationvo.ApplicationName); db.AddInParameter(cmdAddHostGeneralConfiguration, "@HAC_Email", DbType.String, generalconfigurationvo.Email); db.AddInParameter(cmdAddHostGeneralConfiguration, "@U_UserId", DbType.Int32, userId); if (db.ExecuteNonQuery(cmdAddHostGeneralConfiguration) != 0) { bRecordStatus = true; } } catch (BaseApplicationException Ex) { bRecordStatus = false; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "GeneralConfigurationDao.cs:AddHostGeneralConfiguration(int customerId, int userId, CustomerProspectVo customerprospectvo)"); object[] objects = new object[1]; objects[0] = userId; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); bRecordStatus = false; throw exBase; } return(bRecordStatus); }
protected void Page_Load(object sender, EventArgs e) { GeneralConfigurationVo generalconfigurationvo = new GeneralConfigurationVo(); StringBuilder sbText = null; if (!IsPostBack) { if (Session[SessionContents.SAC_HostGeneralDetails] != null) { generalconfigurationvo = (GeneralConfigurationVo)Session[SessionContents.SAC_HostGeneralDetails]; sbText.Append("3. Contact "); if (!string.IsNullOrEmpty(generalconfigurationvo.ApplicationName)) { sbText.Append(generalconfigurationvo.ApplicationName); } else { sbText.Append("<Application Name not Filled>"); } sbText.Append(" team ("); if (!string.IsNullOrEmpty(generalconfigurationvo.ContactPersonName)) { sbText.Append(generalconfigurationvo.ContactPersonName); } else { sbText.Append("<Contact Peson Name not Filled>"); } sbText.Append(") at "); if (generalconfigurationvo.ContactPersonTelephoneNumber != 0) { sbText.Append(generalconfigurationvo.ContactPersonTelephoneNumber); } else { sbText.Append("<Telephone Number not Filled>"); } lblContactDetails.Text = sbText.ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { RMVo rmVo = new RMVo(); AdvisorBranchBo advisorBranchBo = new AdvisorBranchBo(); GeneralConfigurationVo generalconfigurationvo = new GeneralConfigurationVo(); try { lblDate.Text = DateTime.Now.ToLongDateString(); imgLeftPlaceHolder.Style.Add("display", "none"); imgCenterPlaceholder.Style.Add("display", "none"); imgRightPlaceholder.Style.Add("display", "none"); if (Session[SessionContents.SAC_HostGeneralDetails] != null) { generalconfigurationvo = (GeneralConfigurationVo)Session[SessionContents.SAC_HostGeneralDetails]; if (!IsPostBack) { if (!string.IsNullOrEmpty(generalconfigurationvo.HostLogoPlacement)) { if (generalconfigurationvo.HostLogoPlacement == "TopLeftCorner") { imgLeftPlaceHolder.Style.Add("display", "block"); imgLeftPlaceHolder.Src = "Images/" + generalconfigurationvo.HostLogo; } else if (generalconfigurationvo.HostLogoPlacement == "TopRightCorner") { imgRightPlaceholder.Style.Add("display", "block"); imgRightPlaceholder.Src = "Images/" + generalconfigurationvo.HostLogo; } else if (generalconfigurationvo.HostLogoPlacement == "TopCenter") { imgCenterPlaceholder.Style.Add("display", "block"); imgCenterPlaceholder.Src = "Images/" + generalconfigurationvo.HostLogo; } } } if (Session["userVo"] != null) { userVo = (UserVo)(Session["userVo"]); rmVo = (RMVo)(Session[SessionContents.RmVo]); lblUserName.Text = "Welcome " + " " + userVo.FirstName + " " + userVo.LastName; lblSignOut.Text = "SignOut"; LinkButtonSignIn.Text = ""; if (Session[SessionContents.LogoPath] != null) { logoPath = (Session[SessionContents.LogoPath].ToString()); } else { if (Session["advisorVo"] != null) { logoPath = "Images/" + ((AdvisorVo)Session["advisorVo"]).LogoPath; } } if (Session[SessionContents.BranchLogoPath] != null) { branchLogoPath = (Session[SessionContents.BranchLogoPath].ToString()); } else { if (rmVo != null) { branchLogoPath = "Images/" + (advisorBranchBo.GetBranch(advisorBranchBo.GetBranchId(rmVo.RMId))).LogoPath; } } if (!IsPostBack) { if (!string.IsNullOrEmpty(generalconfigurationvo.AdviserLogoPlacement)) { if (logoPath != "Images/" && logoPath != "") { if (generalconfigurationvo.AdviserLogoPlacement == "TopLeftCorner") { imgLeftPlaceHolder.Style.Add("display", "block"); imgLeftPlaceHolder.Src = logoPath; } else if (generalconfigurationvo.AdviserLogoPlacement == "TopRightCorner") { imgRightPlaceholder.Style.Add("display", "block"); imgRightPlaceholder.Src = logoPath; } else if (generalconfigurationvo.AdviserLogoPlacement == "TopCenter") { imgCenterPlaceholder.Style.Add("display", "block"); imgCenterPlaceholder.Src = logoPath; } } } if (imgLeftPlaceHolder.Src != "" && imgRightPlaceholder.Src != "") { if (branchLogoPath != "Images/" && branchLogoPath != "") { imgCenterPlaceholder.Style.Add("display", "block"); imgCenterPlaceholder.Src = branchLogoPath; } } else if (imgCenterPlaceholder.Src != "" && imgRightPlaceholder.Src != "") { if (branchLogoPath != "Images/" && branchLogoPath != "") { imgLeftPlaceHolder.Style.Add("display", "block"); imgLeftPlaceHolder.Src = branchLogoPath; } } else if (imgLeftPlaceHolder.Src != "" && imgCenterPlaceholder.Src != "") { if (branchLogoPath != "Images/" && branchLogoPath != "") { imgRightPlaceholder.Style.Add("display", "block"); imgRightPlaceholder.Src = branchLogoPath; } } } //if (logoPath != "Images/") //{ // AdvisorLogo.Src = logoPath; //} //if (branchLogoPath != "Images/") //{ // BranchLogo.Src = branchLogoPath; //} CustomerVo customerVo = new CustomerVo(); customerVo = (CustomerVo)(Session["CustomerVo"]); } else { if (!IsPostBack) { if (Request.QueryString["UserId"] != null) { string userId = Request.QueryString["UserId"].ToString(); Page.ClientScript.RegisterStartupScript(this.GetType(), "pageloadscript", "loginloadcontrolfromDefault('Userlogin','" + userId + "','');", true); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "pageloadscript", "loginloadcontrolfromDefault('Userlogin','','');", true); } } } } //if (AdvisorLogo.Src == "") //{ // AdvisorLogo.Style.Add("display", "none"); //} //if (BranchLogo.Src == "") //{ // BranchLogo.Style.Add("display", "none"); //} } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "Default.aspx:PageLoad()"); object[] objects = new object[1]; objects[0] = userVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void Page_PreInit(object sender, EventArgs e) { GeneralConfigurationVo generalconfigurationvo = new GeneralConfigurationVo(); GeneralConfigurationBo generalvonfigurationbo = new GeneralConfigurationBo(); HttpCookie UserPreference; string userTheme = string.Empty; string url = HttpContext.Current.Request.Url.AbsoluteUri; if (url == "http://122.166.49.40:86/" || url == "http://192.168.0.1:86/" || ConfigurationManager.AppSettings["Website_ADVISER"].ToString() != "1021") { PCGLabel.Text = "2015 @ Ampsys Consulting Pvt. Ltd."; } if (Request.Cookies["UserPreference"] != null) { // get the cookie HttpCookie cookie = Request.Cookies["UserPreference"]; // get the cookie value userTheme = Request.Cookies["UserPreference"].Values["UserTheme"]; Page.Theme = userTheme; lnkBrowserIcon.Href = Request.Cookies["UserPreference"].Values["UserICOFilePath"]; } if (Session["advisorVo"] != null) { advisorVo = (AdvisorVo)Session["advisorVo"]; } xmlPath = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"]).ToString(); if (advisorVo.HostId != 0) { generalconfigurationvo = generalvonfigurationbo.GetHostGeneralConfiguration(xmlPath, advisorVo.HostId); } else { generalconfigurationvo = generalvonfigurationbo.GetHostGeneralConfiguration(xmlPath, 1000); } Session[SessionContents.SAC_HostGeneralDetails] = generalconfigurationvo; if (Session[SessionContents.SAC_HostGeneralDetails] != null) { generalconfigurationvo = (GeneralConfigurationVo)Session[SessionContents.SAC_HostGeneralDetails]; if (!string.IsNullOrEmpty(generalconfigurationvo.DefaultTheme)) { if (Session["Theme"] == null || Session["Theme"].ToString() == string.Empty) { if (string.IsNullOrEmpty(userTheme)) { userTheme = generalconfigurationvo.DefaultTheme; } } else if (Session["Theme"] != null) { userTheme = Session["Theme"].ToString(); } } if (!string.IsNullOrEmpty(generalconfigurationvo.ApplicationName)) { Page.Title = generalconfigurationvo.ApplicationName; } } //SET THE THEME FROM USER COOKIES OR DEFAULT Page.Theme = userTheme; Session["Theme"] = userTheme; //if (Session["Theme"] == null || Session["Theme"].ToString() == string.Empty) //{ // Session["Theme"] = "Maroon"; //} //Page.Theme = Session["Theme"].ToString(); if (Session["AdvisorPreferenceVo"] != null) { advisorPreferenceVo = (AdvisorPreferenceVo)Session["AdvisorPreferenceVo"]; Page.Title = advisorPreferenceVo.BrowserTitleBarName; lnkBrowserIcon.Href = "~//Images//favicon//" + advisorPreferenceVo.BrowserTitleBarIconImageName; hidUserLogOutPageUrl.Value = advisorPreferenceVo.LoginWidgetLogOutPageURL; UserPreference = new HttpCookie("UserPreference"); UserPreference.Values["UserLoginPageURL"] = advisorPreferenceVo.WebSiteDomainName; if (!string.IsNullOrEmpty(Page.Theme)) { UserPreference.Values["UserTheme"] = Page.Theme.ToString(); } UserPreference.Values["UserICOFilePath"] = lnkBrowserIcon.Href.ToString(); UserPreference.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(UserPreference); } }
protected void Page_Load(object sender, EventArgs e) { //advisorVo = (AdvisorVo)Session["advisorVo"]; RMVo rmVo = new RMVo(); AdvisorBranchBo advisorBranchBo = new AdvisorBranchBo(); GeneralConfigurationVo generalconfigurationvo = new GeneralConfigurationVo(); string url = HttpContext.Current.Request.Url.AbsoluteUri; //tdTermsCondition.Visible = false; try { lblDate.Text = DateTime.Now.ToLongDateString(); //imgLeftPlaceHolder.Style.Add("display", "none"); imgCenterPlaceholder.Style.Add("display", "none"); imgRightPlaceholder.Style.Add("display", "none"); imgIFABanner.Style.Add("display", "none"); if (Session[SessionContents.SAC_HostGeneralDetails] != null) { generalconfigurationvo = (GeneralConfigurationVo)Session[SessionContents.SAC_HostGeneralDetails]; if (!IsPostBack) { if (!string.IsNullOrEmpty(generalconfigurationvo.HostLogoPlacement)) { if (generalconfigurationvo.HostLogoPlacement == "TopLeftCorner") { imgLeftPlaceHolder.Style.Add("display", "block"); } else if (generalconfigurationvo.HostLogoPlacement == "TopRightCorner") { imgRightPlaceholder.Style.Add("display", "block"); } else if (generalconfigurationvo.HostLogoPlacement == "TopCenter") { imgCenterPlaceholder.Style.Add("display", "block"); } if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["Website_Logo"].ToString())) { imgLeftPlaceHolder.Src = ConfigurationManager.AppSettings["Website_Logo"].ToString(); } } } if (Session["userVo"] != null) { userVo = (UserVo)(Session["userVo"]); rmVo = (RMVo)(Session[SessionContents.RmVo]); //tdTermsCondition.Visible = true; if (userVo.UserType == "Advisor") { //tdGodaddySeal.Visible = true; } else { //tdTermsCondition.Visible = false; } if ((!IsPostBack) && (userVo.UserType == "Customer")) { //tdTermsCondition.Visible = false; tdDemo.Visible = false; tdHelp.Visible = false; lnkDemo.Visible = false; lnkHelp.Visible = false; } lblUserName.Text = "Welcome " + " " + userVo.FirstName + " " + userVo.LastName; if (userVo.PermisionList != null && userVo.RoleList.Contains("Ops") && userVo.PermisionList.Count() > 0) { lblPermissionList.Visible = true; foreach (string PName in userVo.PermisionList) { lblPermissionList.Text += PName + ","; } lblPermissionList.Text = lblPermissionList.Text.TrimEnd(','); } lblSignOut.Text = "SignOut"; LinkButtonSignIn.Text = ""; imgSessionOut.Visible = false; if (Session[SessionContents.LogoPath] != null) { logoPath = (Session[SessionContents.LogoPath].ToString()); } else { if (Session["advisorVo"] != null) { logoPath = "Images/" + ((AdvisorVo)Session["advisorVo"]).LogoPath; } } if (Session[SessionContents.BranchLogoPath] != null) { branchLogoPath = (Session[SessionContents.BranchLogoPath].ToString()); } else { if (rmVo != null) { branchLogoPath = "Images/" + (advisorBranchBo.GetBranch(advisorBranchBo.GetBranchId(rmVo.RMId))).LogoPath; } } if (!IsPostBack) { if (!string.IsNullOrEmpty(generalconfigurationvo.AdviserLogoPlacement)) { if (logoPath != "Images/" && logoPath != "") { if (generalconfigurationvo.AdviserLogoPlacement == "TopLeftCorner") { imgLeftPlaceHolder.Style.Add("display", "block"); imgLeftPlaceHolder.Src = logoPath; } else if (generalconfigurationvo.AdviserLogoPlacement == "TopRightCorner") { imgRightPlaceholder.Style.Add("display", "block"); imgRightPlaceholder.Src = logoPath; } else if (generalconfigurationvo.AdviserLogoPlacement == "TopCenter") { imgCenterPlaceholder.Style.Add("display", "block"); imgCenterPlaceholder.Src = logoPath; } } } if (imgLeftPlaceHolder.Src != "" && imgRightPlaceholder.Src != "") { if (branchLogoPath != "Images/" && branchLogoPath != "") { imgCenterPlaceholder.Style.Add("display", "block"); imgCenterPlaceholder.Src = branchLogoPath; } } else if (imgCenterPlaceholder.Src != "" && imgRightPlaceholder.Src != "") { if (branchLogoPath != "Images/" && branchLogoPath != "") { imgLeftPlaceHolder.Style.Add("display", "block"); imgLeftPlaceHolder.Src = branchLogoPath; } } else if (imgLeftPlaceHolder.Src != "" && imgCenterPlaceholder.Src != "") { if (branchLogoPath != "Images/" && branchLogoPath != "") { imgRightPlaceholder.Style.Add("display", "block"); imgRightPlaceholder.Src = branchLogoPath; } } } if (advisorPreferenceVo.IsBannerEnabled) { imgPlaceholders.Visible = false; tblIFALongBanner.Visible = true; if (!string.IsNullOrEmpty(advisorPreferenceVo.BannerImageName)) { imgIFABanner.Style.Add("display", "block"); imgIFABanner.Src = "Images/" + advisorPreferenceVo.BannerImageName; } else { imgIFABanner.Style.Add("display", "none"); } } else { tblIFALongBanner.Visible = false; } //if (logoPath != "Images/") //{ // AdvisorLogo.Src = logoPath; //} //if (branchLogoPath != "Images/") //{ // BranchLogo.Src = branchLogoPath; //} CustomerVo customerVo = new CustomerVo(); customerVo = (CustomerVo)(Session["CustomerVo"]); } else { if (!IsPostBack) { if (Request.QueryString["UserId"] != null) { string userId = Request.QueryString["UserId"].ToString(); Page.ClientScript.RegisterStartupScript(this.GetType(), "pageloadscript", "loginloadcontrolfromDefault('Userlogin','" + userId + "','');", true); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "pageloadscript", "loginloadcontrolfromDefault('Userlogin','','');", true); } } } } //if (AdvisorLogo.Src == "") //{ // AdvisorLogo.Style.Add("display", "none"); //} //if (BranchLogo.Src == "") //{ // BranchLogo.Style.Add("display", "none"); //} if (userVo.UserType != "Advisor") { MenuItemCollection items = AdvisorMenu.Items; foreach (MenuItem item in items) { if (item.Value == @"Transact/Business online") { item.Text = ""; item.SeparatorImageUrl = null; } if (item.Value == @"Repository") { item.Text = ""; item.SeparatorImageUrl = null; } if (item.Value == @"Info links") { item.Text = ""; item.SeparatorImageUrl = null; } if (item.Value == @"Price List") { item.Text = ""; item.SeparatorImageUrl = null; } if (item.Value == @"Calculators") { item.Text = ""; item.SeparatorImageUrl = null; } } tdDemo.Visible = false; tdHelp.Visible = false; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "Default.aspx:PageLoad()"); object[] objects = new object[1]; objects[0] = userVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }