protected void Application_Start(object sender, EventArgs e)
        {
            try
            {
                ApplicationController objAppController = new ApplicationController();
                if (objAppController.IsInstalled())
                {
                    SageFrameConfig pagebase = new SageFrameConfig();
                    RolesManagementController objController = new RolesManagementController();
                    RolesManagementInfo res = objController.GetRoleIDByRoleName(SystemSetting.AnonymousUsername);
                    if (res != null)
                    {
                        SystemSetting.ANONYMOUS_ROLEID = res.RoleId.ToString();
                    }
                    bool IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
                    SageFrameSettingKeys.PageExtension = pagebase.GetSettingsByKey(SageFrameSettingKeys.SettingPageExtension);
                    bool isSchedulerOn = pagebase.GetSettingBollByKey(SageFrameSettingKeys.Scheduler);
                    if (IsUseFriendlyUrls)
                    {
                        RegisterRoutes(RouteTable.Routes);
                    }
                    if (isSchedulerOn)
                    {
                        RunSchedule();
                    }
                }
            }
            catch
            {
            }

        }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            storeID = GetStoreID;
            portalID = GetPortalID;
            userName = GetUsername;
            customerID = GetCustomerID;
            cultureName = GetCurrentCultureName;
            if (HttpContext.Current.Session.SessionID != null)
            {
                sessionCode = HttpContext.Current.Session.SessionID.ToString();
            }

            userIP = HttpContext.Current.Request.UserHostAddress;
            IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
            ipToCountry.GetCountry(userIP, out countryName);
            noImageWishList = StoreSetting.GetStoreSettingValueByKey(StoreSetting.DefaultProductImageURL, storeID, portalID, cultureName);
            enableWishList = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableWishList, storeID, portalID, cultureName);
            showImageInWishlist = StoreSetting.GetStoreSettingValueByKey(StoreSetting.ShowItemImagesInWishList, storeID, portalID, cultureName);
            allowOutStockPurchase = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowOutStockPurchase, storeID, portalID, cultureName);
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         SageFrameConfig pagebase = new SageFrameConfig();
         IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
         if (!IsPostBack)
         {
             storeID = GetStoreID;
             portalID = GetPortalID;
             userName = GetUsername;
             customerID = GetCustomerID;
             cultureName = GetCurrentCultureName;
             if (HttpContext.Current.Session.SessionID != null)
             {
                 sessionCode = HttpContext.Current.Session.SessionID.ToString();
             }
             noImageMyCartPath = StoreSetting.GetStoreSettingValueByKey(StoreSetting.DefaultProductImageURL, storeID, portalID, cultureName);
             allowMultipleAddShipping = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowMultipleShippingAddress, storeID, portalID, cultureName);
             showItemImagesOnCart = StoreSetting.GetStoreSettingValueByKey(StoreSetting.ShowItemImagesInCart, storeID, portalID, cultureName);
             minOrderAmount = StoreSetting.GetStoreSettingValueByKey(StoreSetting.MinimumOrderAmount, storeID, portalID, cultureName);
             minimumItemQuantity = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.MinimumItemQuantity, storeID, portalID, cultureName));
             maximumItemQuantity = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.MaximumItemQuantity, storeID, portalID, cultureName));
             allowOutStockPurchase = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowOutStockPurchase, storeID, portalID, cultureName);
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Example #4
0
        public bool LogPageMethodException(Exception exc)
        {
            string strIPaddress = string.Empty;
            string strPageUrl   = string.Empty;

            if (HttpContext.Current != null && HttpContext.Current.Request != null && HttpContext.Current.Request.UserHostAddress != string.Empty)
            {
                strIPaddress = HttpContext.Current.Request.UserHostAddress;
            }

            if (HttpContext.Current != null && HttpContext.Current.Request != null && HttpContext.Current.Request.RawUrl != string.Empty)
            {
                strPageUrl = HttpContext.Current.Request.RawUrl;
            }

            int                inID          = 0;
            SageFrameConfig    sfConfig      = new SageFrameConfig();
            ErrorLogController objController = new ErrorLogController();

            inID = objController.InsertLog((int)SageFrame.Web.SageFrameEnums.ErrorType.AdministrationArea, 11, exc.Message, exc.ToString(),
                                           strIPaddress, strPageUrl, true, sfConfig.GetPortalID, sfConfig.GetUsername);


            return(sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseCustomErrorMessages));
        }
Example #5
0
 private void SageInitPart()
 {
     SetPortalCofig();
     InitializePage();
     LoadModuleControls();
     SageFrameConfig sfConfig = new SageFrameConfig();
     IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
     //LoadControl(phdAdministrativBreadCrumb, "~/Controls/ctl_AdminBreadCrum.ascx");
     LoadControl(phdAdminMenu, "~/Controls/ctl_AdminMenuOnly.ascx");
     if (sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalShowFooter) == "1")
     {
         divFooterWrapper.Attributes.Add("style", "display:block;");
     }
     else
     {
         divFooterWrapper.Attributes.Add("style", "display:none;");
     }
     BindModuleControls();
     HiddenField hdnPageID = new HiddenField();
     hdnPageID.ID = "hdnPageID";
     if (HttpContext.Current.Request.QueryString["pgid"] != null)
     {
         hdnPageID.Value = HttpContext.Current.Request.QueryString["pgid"].ToString();
     }
     HiddenField hdnActiveIndex = new HiddenField();
     hdnActiveIndex.ID = "hdnActiveIndex";
     if (HttpContext.Current.Request.QueryString["ActInd"] != null)
     {
         hdnActiveIndex.Value = HttpContext.Current.Request.QueryString["ActInd"].ToString();
     }
     this.Page.Form.Controls.Add(hdnPageID);
     this.Page.Form.Controls.Add(hdnActiveIndex);
     OverridePageInfo(null);
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         SageFrameConfig sfConfig = new SageFrameConfig();
         IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
         if (HttpContext.Current.User != null)
         {
             if (Membership.GetUser() != null)
             {
                 lnkloginStatus.Text = SageLogOutText;
                 lnkloginStatus.CommandName = "LOGOUT";
             }
             else
             {
                 lnkloginStatus.Text = SageLogInText;
                 lnkloginStatus.CommandName = "LOGIN";
             }
         }
         else
         {
             lnkloginStatus.Text = SageLogInText;
             lnkloginStatus.CommandName = "LOGIN";
         }
     }
     catch
     {
     }
 }
    private void StartProccess()
    {
        try
        {

            var sfConfig = new SageFrameConfig();
           bool _isUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            string sageRedirectPath;
            if (_isUseFriendlyUrls)
            {
                if (!IsParent)
                {
                    sageRedirectPath = ResolveUrl(GetParentURL + "/portal/" + GetPortalSEOName + "/" + "Cash-On-Delivery-Success.aspx");
                }
                else
                {
                    sageRedirectPath = ResolveUrl("~/" + "Cash-On-Delivery-Success.aspx");
                 }
            }
            else
            {
                sageRedirectPath = ResolveUrl("{~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + "Cash-On-Delivery-Success");
            }

                                 Response.Redirect(sageRedirectPath);



        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            if (!IsPostBack)
            {
                IncludeCss("ShoppingBagHeader", "/Templates/" + TemplateName + "/css/PopUp/style.css", "/Templates/" + TemplateName + "/css/MessageBox/style.css");
                IncludeJs("ShoppingBagHeader", "/js/PopUp/custom.js", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js", "/js/Session.js",
                    "Modules/AspxCommerce/AspxShoppingBagHeader/js/ShoppingBag.js");
                StoreID = GetStoreID;
                PortalID = GetPortalID;
                CustomerID = GetCustomerID;
                UserName = GetUsername;
                CultureName = GetCurrentCultureName;

                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                StoreSettingConfig ssc = new StoreSettingConfig();
                ShowMiniShopCart = ssc.GetStoreSettingsByKey(StoreSetting.ShowMiniShoppingCart, StoreID, PortalID, CultureName);
                AllowMultipleAddChkOut = ssc.GetStoreSettingsByKey(StoreSetting.AllowMultipleShippingAddress, StoreID, PortalID, CultureName);
                MinOrderAmount = ssc.GetStoreSettingsByKey(StoreSetting.MinimumOrderAmount, StoreID, PortalID, CultureName);
                AllowAnonymousCheckOut = ssc.GetStoreSettingsByKey(StoreSetting.AllowAnonymousCheckOut, StoreID, PortalID, CultureName);
                ShoppingCartURL = ssc.GetStoreSettingsByKey(StoreSetting.ShoppingCartURL, StoreID, PortalID, CultureName);
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Example #9
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="RedirectUrl"></param>
        public void ProcessCancelRequestBase(string RedirectUrl)
        {
            string          strURL            = string.Empty;
            SageFrameConfig pagebase          = new SageFrameConfig();
            bool            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);

            if (!IsUseFriendlyUrls)
            {
                string[] arrUrl;
                arrUrl = Request.RawUrl.Split('&');
                if (arrUrl.Length > 0)
                {
                    for (int i = 0; i < 3; i++)
                    {
                        strURL += arrUrl[i] + "&";
                    }
                    strURL = strURL.Remove(strURL.LastIndexOf('&'));
                }
            }
            else
            {
                if (RedirectUrl.Contains("?"))
                {
                    string[] d = RedirectUrl.Split('?');
                    strURL = d[0];
                }
            }
            HttpContext.Current.Response.Redirect(strURL, false);
        }
Example #10
0
    public void CheckAccess()
    {
        string preFix = string.Empty;
        string paneName = string.Empty;
        string ControlSrc = string.Empty;
        string phdContainer = string.Empty;
        string PageSEOName = string.Empty;
        string redirecPath = string.Empty;
        SageFrameConfig sfConfig = new SageFrameConfig();
        IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
        StoreAccessDetailsInfo storeAccessTracker = new StoreAccessDetailsInfo();
        storeAccessTracker.PortalID = GetPortalID.ToString();
        storeAccessTracker.StoreID = GetStoreID.ToString();
        storeAccessTracker.Username = GetUsername;
        if (Membership.GetUser() != null)
        {
            MembershipUser userDetail = Membership.GetUser(GetUsername);
            storeAccessTracker.UserEmail = userDetail.Email;
        }
        else
        {
            storeAccessTracker.UserEmail = "";
        }
        StoreAccessResultInfo saResults = (StoreAccessResultInfo)GetStoreAccessByCurrentData(storeAccessTracker);
        bool storeClosed = (bool)saResults.StoreClosed;
        bool storeAccessible = (bool)saResults.IsAccess;

        if (storeAccessible)
        {
            DataSet dsPageSettings = new DataSet();

            dsPageSettings = sfConfig.GetPageSettingsByPageSEOName("1", "Home", GetUsername);
            if (bool.Parse(dsPageSettings.Tables[0].Rows[0][0].ToString()) == true)
            {
                //if (bool.Parse(dsPageSettings.Tables[0].Rows[0][2].ToString()) != true)
                //{
                if (bool.Parse(dsPageSettings.Tables[0].Rows[0][1].ToString()) == true)
                {
                    //from session previous url will retrive and redirect to id
                    string returnURL = HttpContext.Current.Session["StoreClosed"].ToString();
                    HttpContext.Current.Session.Remove("StoreClosed");
                    Response.Redirect(returnURL);
                }
                else
                {

                }

            }
            else
            {
                //portal no found
            }
        }
        else
        {
        }


    }
Example #11
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="rawUrl"></param>
        /// <param name="controlPath"></param>
        /// <param name="parameter"></param>
        public void ProcessSourceControlUrlBase(string rawUrl, string controlPath, string parameter)
        {
            //Added For unique Control ID generation
            //int controlUniqueIDPrefix = GetRandomNumber(System.Int32.Parse(DateTime.Now.ToString()), System.Int32.MaxValue);

            string          strURL            = string.Empty;
            SageFrameConfig pagebase          = new SageFrameConfig();
            bool            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);

            if (!IsUseFriendlyUrls)
            {
                if (rawUrl.Contains(parameter))
                {
                    rawUrl = rawUrl.Remove(rawUrl.IndexOf(parameter) - 1);
                }
                strURL = rawUrl + "&" + parameter + "=" + controlPath;
            }
            else
            {
                if (rawUrl.Contains("?"))
                {
                    string[] d = rawUrl.Split('?');
                    strURL = d[0];
                    strURL = strURL + "?" + parameter + "=" + controlPath;
                }
                else
                {
                    strURL = rawUrl + "?" + parameter + "=" + controlPath;
                }
            }
            HttpContext.Current.Response.Redirect(strURL, false);
        }
      protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            string modulePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
            AspxAdminNotificationModulePath = ResolveUrl(modulePath);

            if (!IsPostBack)
            {

                IncludeJs("AspxAdminNotificationView",
                      "/Modules/AspxCommerce/AspxAdminNotification/js/AspxAdminNotificationView.js"
                      );

                IncludeCss("AspxAdminNotificationView",
                     "/Modules/AspxCommerce/AspxAdminNotification/css/AdminNotification.css",
                     "/Modules/AspxCommerce/AspxAdminNotification/css/style.css"
                    );
              
            }

            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }

    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                var sfConfig = new SageFrameConfig();
                _isUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);

                if (_isUseFriendlyUrls)
                {
                    if (!IsParent)
                    {
                        AddressPath = HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + "/portal/" + GetPortalSEOName + "/";

                    }
                    else
                    {
                        AddressPath = HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + "/";
                    }
                }
                StoreSettingConfig ssc = new StoreSettingConfig();               
                MainCurrency = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, GetPortalID, GetPortalID, GetCurrentCultureName);  

            }
            IncludeLanguageJS();
        }
        catch
        {
        }    
    }
Example #14
0
 protected void Application_Start(object sender, EventArgs e)
 {
     try
     {
         string IsInstalled = Config.GetSetting("IsInstalled").ToString();
         string InstallationDate = Config.GetSetting("InstallationDate").ToString();
         if ((IsInstalled != "" && IsInstalled != "false") && InstallationDate != "")
         {
             SageFrameConfig pagebase = new SageFrameConfig();
             RolesManagementDataContext db = new RolesManagementDataContext(SystemSetting.SageFrameConnectionString);
             sp_GetRoleIDByRoleNameResult res = (sp_GetRoleIDByRoleNameResult)db.sp_GetRoleIDByRoleName(SystemSetting.AnonymousUsername).SingleOrDefault();
             if (res != null)
             {
                 SystemSetting.ANONYMOUS_ROLEID = res.RoleId.ToString();
             }
             bool IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
             if (IsUseFriendlyUrls)
             {
                 RegisterRoutes(RouteTable.Routes);
             }
         }
     }
     catch
     {
     }
     
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            if (!IsPostBack)
            {
                storeID = GetStoreID;
                portalID = GetPortalID;
                customerID = GetCustomerID;
                userName = GetUsername;
                cultureName = GetCurrentCultureName;

                if (HttpContext.Current.Session.SessionID != null)
                {
                    sessionCode = HttpContext.Current.Session.SessionID.ToString();
                }
                myAccountURL = StoreSetting.GetStoreSettingValueByKey(StoreSetting.MyAccountURL, storeID, portalID, cultureName);
                shoppingCartURL = StoreSetting.GetStoreSettingValueByKey(StoreSetting.ShoppingCartURL, storeID, portalID, cultureName);
                wishListURL = StoreSetting.GetStoreSettingValueByKey(StoreSetting.WishListURL, storeID, portalID, cultureName);
                allowAnonymousCheckOut = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowAnonymousCheckOut, storeID, portalID, cultureName);
                allowMultipleShipping = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowMultipleShippingAddress, storeID, portalID, cultureName);
                minOrderAmount = StoreSetting.GetStoreSettingValueByKey(StoreSetting.MinimumOrderAmount, storeID, portalID, cultureName);
                allowWishList = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableWishList,storeID,portalID,cultureName);
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("messagecss", "/Templates/" + TemplateName + "/css/MessageBox/style.css",
                    "/Modules/AspxCommerce/AspxServiceItems/css/ServiceItems.css");
                IncludeJs("messagejs", "/js/MessageBox/alertbox.js");
                var sfConfig = new SageFrameConfig();
                _isUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);

                if (_isUseFriendlyUrls)
                {
                    if (GetPortalID > 1)
                    {
                        _sageRedirectPath =
                            ResolveUrl("~/portal/" + GetPortalSEOName + "/" +sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + SageFrameSettingKeys.PageExtension);
                        _addressPath = HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + "/portal/" +GetPortalSEOName + "/";

                    }
                    else
                    {
                        _sageRedirectPath =
                            ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) +
                                       SageFrameSettingKeys.PageExtension);
                        _addressPath = HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + "/";

                    }
                }
                else
                {
                    _sageRedirectPath =
                        ResolveUrl("{~/Default" + SageFrameSettingKeys.PageExtension + "?ptlid=" + GetPortalID +
                                   "&ptSEO=" + GetPortalSEOName + "&pgnm=" +
                                   sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
                }

                var imgProgress = (Image) UpdateProgress1.FindControl("imgPrgress");
                if (imgProgress != null)
                {
                    imgProgress.ImageUrl = GetTemplateImageUrl("ajax-loader.gif", true);
                }
                hlnkHomePage.NavigateUrl = _sageRedirectPath;

                StoreSettingConfig ssc = new StoreSettingConfig();
                                            
                StoreLogoUrl = ssc.GetStoreSettingsByKey(StoreSetting.StoreLogoURL, GetStoreID, GetPortalID, GetCurrentCultureName);
                SendConfrimMessage();
            }
            IncludeLanguageJS();
        }
        catch(Exception ex)
        {
            throw ex;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            try
            {
                if (Session["OrderID"] != null)
                {
                    orderID = int.Parse(Session["OrderID"].ToString());
                }

                var sfConfig = new SageFrameConfig();
                _isUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
                PageExtension = SageFrameSettingKeys.PageExtension;
                string sageRedirectPath;
                if (_isUseFriendlyUrls)
                {
                    if (!IsParent)
                    {
                        sageRedirectPath = ResolveUrl(GetParentURL + "/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + PageExtension);
                        _addressPath = HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + "/portal/" + GetPortalSEOName + "/";
                    }
                    else
                    {
                        sageRedirectPath = ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + PageExtension);
                        _addressPath = HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + "/";
                    }
                }
                else
                {
                    sageRedirectPath = ResolveUrl("{~/Default" + PageExtension + "?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
                }

                var imgProgress = (Image)UpdateProgress1.FindControl("imgPrgress");
                if (imgProgress != null)
                {
                    imgProgress.ImageUrl = GetTemplateImageUrl("ajax-loader.gif", true);
                }
                hlnkHomePage.NavigateUrl = sageRedirectPath;

                 
                IncludeLanguageJS();
                if (Session["mb_IsCheckoutFromMobile"] != null)
                {
                    MobileSuccess(sageRedirectPath);
                }else
                {
                    WebSuccess(sageRedirectPath);
                }
            }
            catch (Exception ex)
            {

                ProcessException(ex);
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
            aspxCommonObj.StoreID = GetStoreID;
            aspxCommonObj.PortalID = GetPortalID;
            aspxCommonObj.UserName = GetUsername;
            aspxCommonObj.CultureName = GetCurrentCultureName;


            if (!IsPostBack)
            {
                if (Session["OrderID"] != null)
                {
                    orderID = int.Parse(Session["OrderID"].ToString());
                }
                var sfConfig = new SageFrameConfig();
                _isUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);

                if (_isUseFriendlyUrls)
                {
                    if (!IsParent)
                    {
                        _sageRedirectPath = ResolveUrl("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + ".aspx");
                    }
                    else
                    {
                        _sageRedirectPath = ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + ".aspx");
                    }
                }
                else
                {
                    _sageRedirectPath = ResolveUrl("{~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
                }

                var imgProgress = (Image)UpdateProgress1.FindControl("imgPrgress");
                if (imgProgress != null)
                {
                    imgProgress.ImageUrl = GetTemplateImageUrl("ajax-loader.gif", true);
                }
                hlnkHomePage.NavigateUrl = _sageRedirectPath;

                SendEmailFrom = StoreSetting.GetStoreSettingValueByKey(StoreSetting.SendEcommerceEmailsFrom, GetStoreID, GetPortalID, GetCurrentCultureName);
                SendOrderNotice = StoreSetting.GetStoreSettingValueByKey(StoreSetting.SendOrderNotification, GetStoreID, GetPortalID, GetCurrentCultureName);
                SendConfrimMessage();
            }
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     appPath = GetApplicationName;
     ActiveTemplate = TemplateName;
     UserName = GetUsername;
     PortalID = GetPortalID;
     PortalName = GetPortalSEOName;           
     BuildAccessControlledSelection();
     SageFrameConfig sfConfig = new SageFrameConfig();
     bool ShowSideBar = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.ShowSideBar);
     IsSideBarVisible = ShowSideBar ? 1 : 0;        
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            IncludeLanguageJS();
            Extension = SageFrameSettingKeys.PageExtension;
            SageFrameConfig sfConfig = new SageFrameConfig();
            IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            FormsAuthenticationTicket ticket = SecurityPolicy.GetUserTicket(GetPortalID);
            if (ticket != null)
            {
                int LoggedInPortalID = int.Parse(ticket.UserData.ToString());
                if (ticket.Name != ApplicationKeys.anonymousUser)
                {
                    string[] sysRoles = SystemSetting.SUPER_ROLE;
                    if (GetPortalID == LoggedInPortalID || Roles.IsUserInRole(ticket.Name, sysRoles[0]))
                    {
                        RoleController _role = new RoleController();
                        string userinroles = _role.GetRoleNames(GetUsername, LoggedInPortalID);
                        if (userinroles != string.Empty || userinroles != null)
                        {

                        }
                        else
                        {
                            lnkloginStatus.Text = SageLogInText;
                            lnkloginStatus.CommandName = "LOGIN";
                        }
                    }
                    else
                    {
                        lnkloginStatus.Text = SageLogInText;
                        lnkloginStatus.CommandName = "LOGIN";
                    }
                    lnkloginStatus.Text = SageLogOutText;
                    lnkloginStatus.CommandName = "LOGOUT";                    
                }
                else
                {
                    lnkloginStatus.Text = SageLogInText;
                    lnkloginStatus.CommandName = "LOGIN";
                }
            }
            else
            {
                lnkloginStatus.Text = SageLogInText;
                lnkloginStatus.CommandName = "LOGIN";
            }
        }
        catch
        {
        }
    }
 protected void ProcessException(Exception exc)
 {            
     ErrorLogDataContext db = new ErrorLogDataContext(SystemSetting.SageFrameConnectionString);
     System.Nullable<int> inID=0;
     db.sp_LogInsert(ref inID,(int)SageFrame.Web.SageFrameEnums.ErrorType.AdministrationArea, 11, exc.Message, exc.ToString(),
         HttpContext.Current.Request.UserHostAddress, Request.RawUrl, true, GetPortalID, GetUsername);
     SageFrameConfig pagebase = new SageFrameConfig();
     if (pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseCustomErrorMessages))
     {
         ShowMessage(SageMessageTitle.Exception.ToString(), exc.Message, exc.ToString(), SageMessageType.Error);
     }
     
 }        
 protected void Page_Load(object sender, EventArgs e)
 {
     appPath =GetApplicationName;
     Extension = SageFrameSettingKeys.PageExtension;
     UserName = GetUsername;
     PortalID = GetPortalID;
     PortalName = GetPortalSEOName;
     SageFrameConfig sfConfig = new SageFrameConfig();
     bool ShowSideBar = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.ShowSideBar);
     IsSideBarVisible = ShowSideBar ? 1 : 0;
     BuildQuickLinks();       
     lblVersion.Text = string.Format("V {0}",Config.GetSetting("SageFrameVersion"));      
 }
        protected void ProcessException(Exception exc)
        {
            int inID = 0;
            ErrorLogController objController = new ErrorLogController();
            inID = objController.InsertLog((int)SageFrame.Web.SageFrameEnums.ErrorType.AdministrationArea, 11, exc.Message, exc.ToString(),
                HttpContext.Current.Request.UserHostAddress, Request.RawUrl, true, GetPortalID, GetUsername);

            SageFrameConfig pagebase = new SageFrameConfig();
            if (pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseCustomErrorMessages))
            {
                ShowMessage(SageMessageTitle.Exception.ToString(), exc.Message, exc.ToString(), SageMessageType.Error);
            }
        } 
 protected void Page_Load(object sender, EventArgs e)
 {
     Extension = SageFrameSettingKeys.PageExtension;
     SageFrameConfig sfConfig = new SageFrameConfig();
     userName = SecurityPolicy.GetUser(GetPortalID);
     IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
     if (!IsPostBack)
     {
         profileText = GetSageMessage("LoginStatus", "MyProfile");               
         Literal lnkProfileUrl = (Literal)LoginView1.TemplateControl.FindControl("lnkProfileUrl");
         RegisterURL = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalRegistrationPage) + SageFrameSettingKeys.PageExtension;
         if (sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalShowProfileLink) == "1")
         {                    
             if (IsUseFriendlyUrls)
             {
                 if (GetPortalID > 1)
                 {
                     profileURL = "<a  href='" + ResolveUrl("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalUserProfilePage) + SageFrameSettingKeys.PageExtension) + "'>" + profileText + "</a>";
                 }
                 else
                 {
                     profileURL = "<a  href='" + ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalUserProfilePage) + SageFrameSettingKeys.PageExtension) + "'>" + profileText + "</a>";
                 }
             }
             else
             {
                 profileURL = "<a  href='" + ResolveUrl("~/Default"+Extension+"?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalUserProfilePage)) + "'>" + profileText + "</a>";
             }
         }
         else
         {
             profileURL = "";
         }
         if (IsUseFriendlyUrls)
         {
             if (GetPortalID > 1)
             {
                 RegisterURL = ResolveUrl("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalRegistrationPage) + SageFrameSettingKeys.PageExtension);
             }
             else
             {
                 RegisterURL = ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalRegistrationPage) + SageFrameSettingKeys.PageExtension);
             }
         }
         else
         {
             RegisterURL = ResolveUrl("~/Default"+Extension+"?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalRegistrationPage));
         }
     }
 }
Example #25
0
        protected void ProcessException(Exception exc)
        {
            ErrorLogDataContext db = new ErrorLogDataContext(SystemSetting.SageFrameConnectionString);

            System.Nullable <int> inID = 0;
            db.sp_LogInsert(ref inID, (int)SageFrame.Web.SageFrameEnums.ErrorType.CommonError, 11, exc.Message, exc.ToString(),
                            HttpContext.Current.Request.UserHostAddress, Request.RawUrl, true, GetPortalID, GetUsername);
            SageFrameConfig pagebase = new SageFrameConfig();

            if (pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseCustomErrorMessages))
            {
                ShowMessage(SageMessageTitle.Exception.ToString(), exc.Message, exc.ToString(), SageMessageType.Error);
            }
        }
 protected void page_init(object sender, EventArgs e)
 {
     try
     {
         SageFrameConfig pagebase = new SageFrameConfig();
         IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
         UserIp = HttpContext.Current.Request.UserHostAddress;
         IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
         ipToCountry.GetCountry(UserIp, out CountryName);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
        /// <summary>
        /// Handles the exception and records in the log
        /// </summary>
        /// <param name="exc">exception</param>
        protected void ProcessException(Exception exc)
        {
            int inID = 0;
            ErrorLogController objController = new ErrorLogController();

            inID = objController.InsertLog((int)SageFrame.Web.SageFrameEnums.ErrorType.AdministrationArea, 11, exc.Message, exc.ToString(),
                                           HttpContext.Current.Request.UserHostAddress, Request.RawUrl, true, GetPortalID, GetUsername);

            SageFrameConfig pagebase = new SageFrameConfig();

            if (pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseCustomErrorMessages))
            {
                ShowMessage(SageMessageTitle.Exception.ToString(), exc.Message, exc.ToString(), SageMessageType.Error);
            }
        }
 protected void page_init(object sender, EventArgs e)
 {
     try
     {
         SageFrameConfig pagebase = new SageFrameConfig();
         IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);          
         AspxRewardPointsModulePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
         IncludeLanguageJS();
         InitializeJS();
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                SageFrameConfig sfConfig = new SageFrameConfig();
                IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);

                if (IsUseFriendlyUrls)
                {
                    if (GetPortalID > 1)
                    {
                        sageRedirectPath = ResolveUrl("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + ".aspx");
                        addressPath = HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + "/portal/" + GetPortalSEOName + "/";
             
                    }
                    else
                    {
                        sageRedirectPath = ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + ".aspx");
                        addressPath = HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + "/";
             
                    }
                }
                else
                {
                    sageRedirectPath = ResolveUrl("{~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
                }

                Image imgProgress = (Image)UpdateProgress1.FindControl("imgPrgress");
                if (imgProgress != null)
                {
                    imgProgress.ImageUrl = GetTemplateImageUrl("ajax-loader.gif", true);
                }
                hlnkHomePage.NavigateUrl = sageRedirectPath;

                StoreSettingConfig ssc = new StoreSettingConfig();
                sendEmailFrom = ssc.GetStoreSettingsByKey(StoreSetting.SendEcommerceEmailsFrom, GetStoreID, GetPortalID, GetCurrentCultureName);
                sendOrderNotice = ssc.GetStoreSettingsByKey(StoreSetting.SendOrderNotification, GetStoreID, GetPortalID, GetCurrentCultureName);

                SendConfrimMessage();
            }
        }
        catch
        {
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SageFrameConfig pagebase = new SageFrameConfig();
            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
            if (!IsPostBack)
            {
                IncludeCss("AspxHeaderControl", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/PopUp/style.css");
                IncludeJs("AspxHeaderControl", "/js/PopUp/custom.js", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js", "/Modules/AspxCommerce/AspxHeaderControl/js/HeaderControl.js");
                StoreID = GetStoreID;
                PortalID = GetPortalID;
                CustomerID = GetCustomerID;
                UserName = GetUsername;
                CultureName = GetCurrentCultureName;

                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                StoreSettingConfig ssc = new StoreSettingConfig();
                MyAccountURL = ssc.GetStoreSettingsByKey(StoreSetting.MyAccountURL, StoreID, PortalID, CultureName);
                ShoppingCartURL = ssc.GetStoreSettingsByKey(StoreSetting.ShoppingCartURL, StoreID, PortalID, CultureName);
                WishListURL = ssc.GetStoreSettingsByKey(StoreSetting.WishListURL, StoreID, PortalID, CultureName);
                AllowAnonymousCheckOut = ssc.GetStoreSettingsByKey(StoreSetting.AllowAnonymousCheckOut, StoreID, PortalID, CultureName);
                AllowMultipleShipping = ssc.GetStoreSettingsByKey(StoreSetting.AllowMultipleShippingAddress, StoreID, PortalID, CultureName);
                MinOrderAmount = ssc.GetStoreSettingsByKey(StoreSetting.MinimumOrderAmount, StoreID, PortalID, CultureName);
                AllowWishList = ssc.GetStoreSettingsByKey(StoreSetting.EnableWishList, StoreID, PortalID, CultureName);
                if (HttpContext.Current.Request.UrlReferrer != null)
                {
                    string urlContent = HttpContext.Current.Request.UrlReferrer.AbsolutePath;
                    if (urlContent.Contains(pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage)))
                    {
                        FrmLogin = true;
                    }
                }
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    } 
Example #31
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         SageFrameConfig pagebase = new SageFrameConfig();
         IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
         if (!IsPostBack)
         {
             storeID = GetStoreID;
             portalID = GetPortalID;
             userName = GetUsername;
             cultureName = GetCurrentCultureName;
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         SageFrameConfig pagebase = new SageFrameConfig();
         IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
         CulturalName = GetCurrentCultureName;
         PortalID = GetPortalID;
         UserName = GetUsername;
         baseURL = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
         if (!IsPostBack)
         {
             Session["SageDtv"] = null;
         }
     }
     catch
     {
     }
 }
Example #33
0
 protected void LoginStatus1_LoggedOut(object sender, EventArgs e)
 {
     SetUserRoles(string.Empty);
     SageFrameConfig sfConfig = new SageFrameConfig();
     bool IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
     if (IsUseFriendlyUrls)
     {
         if (GetPortalID > 1)
         {
             Response.Redirect("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + ".aspx");
         }
         else
         {
             Response.Redirect("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + ".aspx");
         }
     }
     else
     {
         Response.Redirect("~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
     }
 }
Example #34
0
        public bool LogWCFException(Exception exc)
        {
            string strIPaddress = string.Empty;
            string strPageUrl = string.Empty;
            if (HttpContext.Current != null && HttpContext.Current.Request != null && HttpContext.Current.Request.UserHostAddress != string.Empty)
            {
                strIPaddress = HttpContext.Current.Request.UserHostAddress;
            }

            if (HttpContext.Current != null && HttpContext.Current.Request != null && HttpContext.Current.Request.RawUrl != string.Empty)
            {
                strPageUrl = HttpContext.Current.Request.RawUrl;
            }
            ErrorLogDataContext db = new ErrorLogDataContext(SystemSetting.SageFrameConnectionString);
            System.Nullable<int> inID = 0;
            SageFrameConfig sfConfig = new SageFrameConfig();
            db.sp_LogInsert(ref inID, (int)SageFrameEnums.ErrorType.WCF, 11, exc.Message, exc.ToString(),
                strIPaddress, strPageUrl, true, sfConfig.GetPortalID, sfConfig.GetUsername);            
            return sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseCustomErrorMessages);

        }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         SageFrameConfig pagebase = new SageFrameConfig();
         IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
         if (!IsPostBack)
         {
             IncludeCss("SimpleSearch", "/Templates/" + TemplateName + "/css/JQueryUIFront/jquery.ui.all.css");
             IncludeJs("SimpleSearch", "/js/JQueryUI/jquery-ui-1.8.10.custom.js", "/Modules/AspxCommerce/AspxGeneralSearch/js/SimpleSearch.js");
             StoreID = GetStoreID;
             PortalID = GetPortalID;
             UserName = GetUsername;
             CultureName = GetCurrentCultureName;
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
        public bool LogWCFException(Exception exc)
        {
            string strIPaddress = string.Empty;
            string strPageUrl   = string.Empty;

            if (HttpContext.Current != null && HttpContext.Current.Request != null && HttpContext.Current.Request.UserHostAddress != string.Empty)
            {
                strIPaddress = HttpContext.Current.Request.UserHostAddress;
            }

            if (HttpContext.Current != null && HttpContext.Current.Request != null && HttpContext.Current.Request.RawUrl != string.Empty)
            {
                strPageUrl = HttpContext.Current.Request.RawUrl;
            }
            ErrorLogDataContext db = new ErrorLogDataContext(SystemSetting.SageFrameConnectionString);

            System.Nullable <int> inID     = 0;
            SageFrameConfig       sfConfig = new SageFrameConfig();

            db.sp_LogInsert(ref inID, (int)SageFrameEnums.ErrorType.WCF, 11, exc.Message, exc.ToString(),
                            strIPaddress, strPageUrl, true, sfConfig.GetPortalID, sfConfig.GetUsername);
            return(sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseCustomErrorMessages));
        }