Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ModuleServicePath         = ResolveUrl("~") + "Modules/AspxCommerce/AspxCommerceServices/";
         aspxCommonObj.StoreID     = GetStoreID;
         aspxCommonObj.PortalID    = GetPortalID;
         aspxCommonObj.CultureName = GetCurrentCultureName;
         HeaderSettingInfo objHeadeSetting = new HeaderSettingInfo();
         objHeadeSetting = AspxHeaderController.GetHeaderSetting(aspxCommonObj);
         HeaderType      = objHeadeSetting.HeaderType;
     }
     IncludeLanguageJS();
 }
 public static HeaderSettingInfo GetHeaderSetting(AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         SQLHandler sqlHandle = new SQLHandler();
         HeaderSettingInfo objHeadSetting = new HeaderSettingInfo();
         objHeadSetting = sqlHandle.ExecuteAsObject<HeaderSettingInfo>("[usp_Aspx_GetHeaderSettings]", parameterCollection);
         return objHeadSetting;
     }
     catch (Exception e)
     {
         throw e;
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            ModuleServicePath = ResolveUrl("~") + "Modules/AspxCommerce/AspxCommerceServices/";
            aspxCommonObj.StoreID = GetStoreID;
            aspxCommonObj.PortalID = GetPortalID;
            aspxCommonObj.CultureName = GetCurrentCultureName;
            HeaderSettingInfo objHeadeSetting = new HeaderSettingInfo();
            objHeadeSetting = AspxHeaderController.GetHeaderSetting(aspxCommonObj);
            HeaderType = objHeadeSetting.HeaderType;
        }
        IncludeLanguageJS();

    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            GetPortalCommonInfo(out StoreID, out PortalID, out CustomerID, out UserName, out CultureName, out SessionCode);
            AspxCommonInfo aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName, CustomerID, SessionCode);

            SageFrameConfig sfConfig = new SageFrameConfig();
            LogInURL = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage);

            HeaderSettingInfo objHeaderSetting = new HeaderSettingInfo();
            objHeaderSetting = AspxHeaderController.GetHeaderSetting(aspxCommonObj);
            HeaderType = objHeaderSetting.HeaderType;

            HeaderItemsCount objHeaderCount = new HeaderItemsCount();
            AspxHeaderController objHeader = new AspxHeaderController();
            objHeaderCount = objHeader.GetHeaderItemsCount(aspxCommonObj);
            WishCount = objHeaderCount.WishCount;
            CartCount = objHeaderCount.CartCount;

            hst = AppLocalized.getLocale(this.AppRelativeTemplateSourceDirectory);//

            StoreSettingConfig ssc = new StoreSettingConfig();
            ssc.GetStoreSettingParamSeven(StoreSetting.MyAccountURL, StoreSetting.ShoppingCartURL,
                StoreSetting.ShowAddToCartButton, StoreSetting.AllowAnonymousCheckOut, StoreSetting.AllowMultipleShippingAddress,
                StoreSetting.MinimumCartSubTotalAmount, StoreSetting.SingleCheckOutURL, out MyAccountURL, out ShoppingCartURL,
                out AllowAddToCart, out AllowAnonymousCheckOut, out AllowMultipleShipping, out MinCartSubTotalAmount,
                out SingleAddressChkOutURL, StoreID, PortalID, CultureName);

            string templateName = TemplateName;

            if (HttpContext.Current.Session.SessionID != null)
            {
                SessionCode = HttpContext.Current.Session.SessionID.ToString();
            }
            if (!IsPostBack)
            {
                IncludeCss("AspxHeaderControl", "/Templates/" + templateName + "/css/MessageBox/style.css", "/Templates/" + templateName + "/css/PopUp/style.css",
                     "/Modules/AspxCommerce/AspxHeaderControl/css/module.css");
                IncludeJs("AspxHeaderControl", "/js/PopUp/custom.js", "/js/MessageBox/alertbox.js", "/Modules/AspxCommerce/AspxHeaderControl/js/HeaderControl.js");//"/js/jquery.easing.1.3.js",
                if (HttpContext.Current.Request.UrlReferrer != null)
                {
                    string urlContent = HttpContext.Current.Request.UrlReferrer.AbsolutePath;
                    if (urlContent.Contains(LogInURL) && UserName.ToLower() != "anonymoususer")
                    {
                        FrmLogin = true;
                        if (HttpContext.Current.Session["LoginMessageInfo"] == null)
                        {
                            HttpContext.Current.Session["LoginMessageInfo"] = true;
                        }
                        int x = Convert.ToInt32(HttpContext.Current.Session["LoginMessageInfoCount"]);
                        HttpContext.Current.Session["LoginMessageInfoCount"] = x + 1;
                    }
                    else if (HttpContext.Current.Session["LoginMessageInfo"] != null)
                    {
                        HttpContext.Current.Session.Remove("LoginMessageInfo");
                        HttpContext.Current.Session.Remove("LoginMessageInfoCount");
                    }
                }

            }
            IncludeLanguageJS();
            WishListURL = objHeaderSetting.WishListPageName;
            CountWishItems(aspxCommonObj);

        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Beispiel #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            GetPortalCommonInfo(out StoreID, out PortalID, out CustomerID, out UserName, out CultureName, out SessionCode);
            AspxCommonInfo aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName, CustomerID, SessionCode);

            SageFrameConfig sfConfig = new SageFrameConfig();
            LogInURL = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage);

            HeaderSettingInfo objHeaderSetting = new HeaderSettingInfo();
            objHeaderSetting = AspxHeaderController.GetHeaderSetting(aspxCommonObj);
            HeaderType       = objHeaderSetting.HeaderType;

            HeaderItemsCount     objHeaderCount = new HeaderItemsCount();
            AspxHeaderController objHeader      = new AspxHeaderController();
            objHeaderCount = objHeader.GetHeaderItemsCount(aspxCommonObj);
            WishCount      = objHeaderCount.WishCount;
            CartCount      = objHeaderCount.CartCount;

            hst = AppLocalized.getLocale(this.AppRelativeTemplateSourceDirectory);//

            StoreSettingConfig ssc = new StoreSettingConfig();
            ssc.GetStoreSettingParamSeven(StoreSetting.MyAccountURL, StoreSetting.ShoppingCartURL,
                                          StoreSetting.ShowAddToCartButton, StoreSetting.AllowAnonymousCheckOut, StoreSetting.AllowMultipleShippingAddress,
                                          StoreSetting.MinimumCartSubTotalAmount, StoreSetting.SingleCheckOutURL, out MyAccountURL, out ShoppingCartURL,
                                          out AllowAddToCart, out AllowAnonymousCheckOut, out AllowMultipleShipping, out MinCartSubTotalAmount,
                                          out SingleAddressChkOutURL, StoreID, PortalID, CultureName);

            string templateName = TemplateName;

            if (HttpContext.Current.Session.SessionID != null)
            {
                SessionCode = HttpContext.Current.Session.SessionID.ToString();
            }
            if (!IsPostBack)
            {
                IncludeCss("AspxHeaderControl", "/Templates/" + templateName + "/css/MessageBox/style.css", "/Templates/" + templateName + "/css/PopUp/style.css",
                           "/Modules/AspxCommerce/AspxHeaderControl/css/module.css");
                IncludeJs("AspxHeaderControl", "/js/PopUp/custom.js", "/js/MessageBox/alertbox.js", "/Modules/AspxCommerce/AspxHeaderControl/js/HeaderControl.js");//"/js/jquery.easing.1.3.js",
                if (HttpContext.Current.Request.UrlReferrer != null)
                {
                    string urlContent = HttpContext.Current.Request.UrlReferrer.AbsolutePath;
                    if (urlContent.Contains(LogInURL) && UserName.ToLower() != "anonymoususer")
                    {
                        FrmLogin = true;
                        if (HttpContext.Current.Session["LoginMessageInfo"] == null)
                        {
                            HttpContext.Current.Session["LoginMessageInfo"] = true;
                        }
                        int x = Convert.ToInt32(HttpContext.Current.Session["LoginMessageInfoCount"]);
                        HttpContext.Current.Session["LoginMessageInfoCount"] = x + 1;
                    }
                    else if (HttpContext.Current.Session["LoginMessageInfo"] != null)
                    {
                        HttpContext.Current.Session.Remove("LoginMessageInfo");
                        HttpContext.Current.Session.Remove("LoginMessageInfoCount");
                    }
                }
            }
            IncludeLanguageJS();
            WishListURL = objHeaderSetting.WishListPageName;
            CountWishItems(aspxCommonObj);
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }