示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("StoreAccessControl", "/Templates/" + TemplateName + "/css/GridView/tablesort.css", "/Templates/" + TemplateName + "/css/MessageBox/style.css");
                IncludeJs("StoreAccessControl", "/js/FormValidation/jquery.validate.js", "/js/JQueryUI/jquery-ui-1.8.10.custom.js", "/js/GridView/jquery.grid.js",
                          "/js/GridView/SagePaging.js", "/js/GridView/jquery.global.js", "/js/GridView/jquery.dateFormat.js",
                          "/js/MessageBox/jquery.easing.1.3.js", "/js/PopUp/custom.js", "/js/MessageBox/alertbox.js",
                          "/Modules/AspxCommerce/AspxStoreAccessManagement/js/StoreAccess.js");

                StoreID  = int.Parse(GetStoreID.ToString());
                PortalID = int.Parse(GetPortalID.ToString());
                LblStoreAccessValueID        = lblStoreAccessValue.ClientID;
                LblAddEditStoreAccessTitleID = lblAddEditStoreAccessTitle.ClientID;
                UserName = GetUsername;
            }
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeJs("AttributesManage", "/js/GridView/jquery.grid.js", "/js/GridView/SagePaging.js", "/js/GridView/jquery.global.js", "/js/GridView/jquery.dateFormat.js", "/js/MessageBox/jquery.easing.1.3.js",
                          "/js/MessageBox/alertbox.js", "/Modules/AspxCommerce/AspxAttributesManagement/js/AttributesManage.js");
                IncludeCss("AttributesManage", "/Templates/" + TemplateName + "/css/GridView/tablesort.css", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/JQueryUI/jquery.ui.all.css");
                Page.ClientScript.RegisterClientScriptInclude("JQueryFormValidate", ResolveUrl("~/js/FormValidation/jquery.form-validation-and-hints.js"));
                PortalID     = int.Parse(GetPortalID.ToString());
                StoreID      = int.Parse(GetStoreID.ToString());
                UserName     = GetUsername;
                CultureName  = GetCurrentCultureName;
                UserModuleId = SageUserModuleID;
            }

            AddLanguage();
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             IncludeCss("CouponPerSalesManage", "/Templates/" + TemplateName + "/css/GridView/tablesort.css",
                        "/Templates/" + TemplateName + "/css/MessageBox/style.css",
                        "/Templates/" + TemplateName + "/css/JQueryUI/jquery.ui.all.css");
             IncludeJs("CouponPerSalesManage", "/js/JQueryUI/jquery-ui-1.8.10.custom.js",
                       "/js/GridView/jquery.grid.js", "/js/GridView/SagePaging.js", "/js/GridView/jquery.global.js",
                       "/js/GridView/jquery.dateFormat.js", "/js/DateTime/date.js",
                       "/js/MessageBox/jquery.easing.1.3.js", "/js/ExportToCSV/table2CSV.js",
                       "/js/MessageBox/alertbox.js",
                       "/Modules/AspxCommerce/AspxCouponManagement/js/CouponPerSalesManage.js",
                       "/js/CurrencyFormat/jquery.formatCurrency-1.4.0.js",
                       "/js/CurrencyFormat/jquery.formatCurrency.all.js");
             PortalID    = int.Parse(GetPortalID.ToString());
             StoreID     = int.Parse(GetStoreID.ToString());
             UserName    = GetUsername;
             CultureName = GetCurrentCultureName;
         }
         IncludeLanguageJS();
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("AttributeSetManage", "/Templates/" + TemplateName + "/css/GridView/tablesort.css", "/Templates/" + TemplateName + "/css/TreeView/ui.tree.css", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/PopUp/style.css", "/Modules/AspxCommerce/AspxAttributesManagement/css/module.css");
                IncludeJs("AttributeSetManage", "/js/GridView/jquery.grid.js", "/js/GridView/SagePaging.js",
                          "/js/GridView/jquery.global.js", "/js/GridView/jquery.dateFormat.js", "/js/TreeView/jquery.tree.ui.core.js", "/js/TreeView/ui.tree.js",
                          "/js/TreeView/contextmenu.js", "/js/PopUp/custom.js", "/js/FormValidation/jquery.validate.js", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js", "/Modules/AspxCommerce/AspxAttributesManagement/js/AttributesSetManage.js");

                AddImageUrls();
                PortalID    = int.Parse(GetPortalID.ToString());
                StoreID     = int.Parse(GetStoreID.ToString());
                UserName    = GetUsername;
                CultureName = GetCurrentCultureName; UserModuleId = SageUserModuleID;
            }
            AddLanguage();
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
示例#5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("CatalogPriceRule", "/Templates/" + TemplateName + "/css/GridView/tablesort.css", "/Templates/" + TemplateName + "/css/TreeView/ui.tree.css",
                           "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/JQueryUI/jquery.ui.all.css",
                           "/Modules/AspxCommerce/AspxCatalogPricingRule/css/module.css");
                IncludeJs("CatalogPriceRule", "/js/FormValidation/jquery.validate.js", "/js/GridView/jquery.grid.js",
                          "/js/GridView/SagePaging.js", "/js/GridView/jquery.global.js", "/js/GridView/jquery.dateFormat.js", "/js/DateTime/date.js",
                          "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js", "/js/jquery.multipleselectbox.js", "/Modules/AspxCommerce/AspxCatalogPricingRule/js/CatalogPriceRule.js");

                PortalID    = int.Parse(GetPortalID.ToString());
                StoreID     = int.Parse(GetStoreID.ToString());
                UserName    = GetUsername;
                CultureName = GetCurrentCultureName; UserModuleId = SageUserModuleID;
            }
            IncludeLanguageJS();
            Thread catalogRunning = AspxCommerce.Core.AspxCoreController.catalogThread;
            if (catalogRunning != null && catalogRunning.IsAlive)
            {
                IsCatalogThreadRunning = true;
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
示例#6
0
    private void GetStoreSettings()
    {
        Hashtable            hst = new Hashtable();
        StoreSettingProvider sep = new StoreSettingProvider();

        if (HttpContext.Current.Cache["AspxStoreSetting" + GetPortalID.ToString() + GetStoreID.ToString()] != null)
        {
            hst = (Hashtable)HttpContext.Current.Cache["AspxStoreSetting" + GetPortalID.ToString() + GetStoreID.ToString()];
            StoreSettingConfig ssc = new StoreSettingConfig();
            decimal            timeToDeleteCartItems = decimal.Parse(ssc.GetStoreSettingsByKey(StoreSetting.TimeToDeleteAbandonedCart, GetStoreID, GetPortalID, GetCurrentCultureName));
            decimal            timeToAbandonCart     = Convert.ToDecimal(ssc.GetStoreSettingsByKey(StoreSetting.CartAbandonedTime, GetStoreID, GetPortalID, GetCurrentCultureName));
            ctl.DeleteAbandonedCartItems(GetStoreID, GetPortalID, timeToDeleteCartItems, timeToAbandonCart);
        }
        else
        {
            DataTable dt = sep.GetStoreSettings(GetStoreID, GetPortalID, GetCurrentCultureName); if (dt != null && dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    hst.Add(dt.Rows[i]["SettingKey"].ToString(), dt.Rows[i]["SettingValue"].ToString());
                    StoreSettingConfig ssc = new StoreSettingConfig();
                    decimal            timeToDeleteCartItems = decimal.Parse(ssc.GetStoreSettingsByKey(StoreSetting.TimeToDeleteAbandonedCart, GetStoreID, GetPortalID, GetCurrentCultureName));
                    decimal            timeToAbandonCart     = Convert.ToDecimal(ssc.GetStoreSettingsByKey(StoreSetting.CartAbandonedTime, GetStoreID, GetPortalID, GetCurrentCultureName));
                    ctl.DeleteAbandonedCartItems(GetStoreID, GetPortalID, timeToDeleteCartItems, timeToAbandonCart);
                }
                HttpContext.Current.Cache.Insert("AspxStoreSetting" + GetPortalID.ToString() + GetStoreID.ToString(), hst);
            }
        }
    }
 private void SaveProtal()
 {
     if (Int32.Parse(hdnPortalID.Value) > 0)
     {
         PortalController.UpdatePortal(Int32.Parse(hdnPortalID.Value), txtPortalName.Text, false, GetUsername);
     }
     else
     {
         if (HttpRuntime.Cache["AspxStoreSetting" + GetPortalID.ToString() + GetStoreID.ToString()] != null)
         {
             string portalUrl;
             string portalName = txtPortalName.Text.Trim().Replace(" ", "_");
             if (IsUseFriendlyUrls)
             {
                 portalUrl = Request.ServerVariables["SERVER_NAME"] + "/portal/" + portalName + "/" + "home" + SageFrameSettingKeys.PageExtension;
             }
             else
             {
                 portalUrl = Request.ServerVariables["SERVER_NAME"] + "/portal/" + "home";
             }
             string newPortalname = SaveTemplate();
             PortalMgrController.AddStoreSubscriber(portalName, false, GetUsername,
                                                    newPortalname);
         }
         else
         {
             string newPortalname = SaveTemplate();
             PortalMgrController.AddPortal(txtPortalName.Text, false, GetUsername, newPortalname);
         }
     }
 }
示例#8
0
    private List <CurrrencyRateInfo> GetCountryCodeRates()
    {
        Hashtable            hst = new Hashtable();
        StoreSettingProvider sep = new StoreSettingProvider();

        if (HttpContext.Current.Cache["AspxCurrencyRate" + GetPortalID.ToString() + GetStoreID.ToString()] != null)
        {
            hst = (Hashtable)HttpContext.Current.Cache["AspxCurrencyRate" + GetPortalID.ToString() + GetStoreID.ToString()];

            List <CurrrencyRateInfo> currencies = (List <CurrrencyRateInfo>)hst["CURRENCY"];
            return(currencies);
        }
        else
        {
            AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
            aspxCommonObj.StoreID  = GetStoreID;
            aspxCommonObj.PortalID = GetPortalID;
            List <CurrrencyRateInfo> currencyRate = AspxCurrencyController.GetCountryCodeRates(aspxCommonObj);
            if (currencyRate.Count > 0)
            {
                hst.Add("CURRENCY", currencyRate);
                HttpContext.Current.Cache.Insert("AspxCurrencyRate" + GetPortalID.ToString() + GetStoreID.ToString(), hst);
            }
            else
            {
            }
            return(currencyRate);
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         ddlAvailablePortal.Visible = false;
         lblAvailablePortal.Visible = false;
         lblUrl.Visible             = false;
         txtUrl.Visible             = false;
         appPath = GetApplicationName;
         if (!IsPostBack)
         {
             BindPortal();
             //BindSitePortal();
             PanelVisibility(false, true);
             imbBtnSaveChanges.Attributes.Add("onclick", "javascript:return confirm('" + GetSageMessage("PortalModules", "AreYouSureToSaveChanges") + "')");
         }
         trEmail.Visible = false;
         //test.Visible = false;
         if (HttpRuntime.Cache["AspxStoreSetting" + GetPortalID.ToString() + GetStoreID.ToString()] != null)
         {
             trEmail.Visible = true;
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
示例#10
0
        private void SaveProtal()
        {
            if (Int32.Parse(hdnPortalID.Value) > 0)
            {
                bool   IsParent  = ddlAvailablePortal.SelectedIndex == 0 ? true : false;
                int    ParentID  = ddlAvailablePortal.SelectedIndex == 0 ? 0 : int.Parse(ddlAvailablePortal.SelectedValue);
                string PortalURL = ddlAvailablePortal.SelectedIndex == 0 ? txtUrl.Text : txtPortalName.Text;


                PortalController.UpdatePortal(Int32.Parse(hdnPortalID.Value), txtPortalName.Text, IsParent, GetUsername, PortalURL, ParentID);
            }
            else
            {
                if (HttpRuntime.Cache["AspxStoreSetting" + GetPortalID.ToString() + GetStoreID.ToString()] != null)
                {
                    string newPortalname = SaveTemplate();
                    int    ParentPortal  = int.Parse(ddlAvailablePortal.SelectedValue);
                    // string PSEOName = txtUrl.Text == string.Empty ? ddlAvailablePortal.SelectedItem.ToString() : txtUrl.Text;
                    string PSEOName = string.Empty;
                    if (txtUrl.Text != string.Empty)
                    {
                        PSEOName = txtUrl.Text.Contains("http://") || txtUrl.Text.Contains("https://") ? txtUrl.Text : "http://" + txtUrl.Text;
                    }
                    else
                    {
                        PSEOName = txtPortalName.Text;
                    }
                    bool IsParent = false;
                    //PortalMgrController.AddPortal(txtPortalName.Text, false, GetUsername, newPortalname);
                    if (ddlAvailablePortal.SelectedIndex == 0)
                    {
                        IsParent = true;
                    }
                    PortalMgrController.AddStoreSubscriber(txtPortalName.Text, IsParent, GetUsername,
                                                           newPortalname, ParentPortal, PSEOName);
                }
                else
                {
                    string newPortalname = SaveTemplate();
                    int    ParentPortal  = int.Parse(ddlAvailablePortal.SelectedValue);
                    // string PSEOName = txtUrl.Text == string.Empty ? ddlAvailablePortal.SelectedItem.ToString() : txtUrl.Text;
                    string PSEOName = string.Empty;
                    if (txtUrl.Text != string.Empty)
                    {
                        PSEOName = txtUrl.Text.Contains("http://") || txtUrl.Text.Contains("https://") ? txtUrl.Text : "http://" + txtUrl.Text;
                    }
                    else
                    {
                        PSEOName = txtPortalName.Text;
                    }
                    bool IsParent = false;
                    //PortalMgrController.AddPortal(txtPortalName.Text, false, GetUsername, newPortalname);
                    if (ddlAvailablePortal.SelectedIndex == 0)
                    {
                        IsParent = true;
                    }
                    PortalMgrController.AddPortal(txtPortalName.Text, IsParent, GetUsername, newPortalname, ParentPortal, PSEOName);
                }
            }
        }
示例#11
0
        private void SagePageLoadPart()
        {
            if (!IsPostBack)
            {
                string          sageNavigateUrl = string.Empty;
                SageFrameConfig sfConfig        = new SageFrameConfig();
                if (!IsParent)
                {
                    sageNavigateUrl = GetParentURL + "/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage).Replace(" ", "-") + Extension;
                }
                else
                {
                    sageNavigateUrl = GetParentURL + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage).Replace(" ", "-") + Extension;
                }
                hypPreview.NavigateUrl = sageNavigateUrl;
                Image imgProgress = (Image)UpdateProgress1.FindControl("imgPrgress");
                if (imgProgress != null)
                {
                    imgProgress.ImageUrl = GetAdminImageUrl("ajax-loader.gif", true);
                }
            }
            SessionTracker sessionTracker = (SessionTracker)Session[SessionKeys.Tracker];

            if (string.IsNullOrEmpty(sessionTracker.PortalID))
            {
                sessionTracker.PortalID = GetPortalID.ToString();
                sessionTracker.Username = GetUsername;
                SageFrameConfig sfConfig = new SageFrameConfig();
                sessionTracker.InsertSessionTrackerPages = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.InsertSessionTrackingPages);
                SageFrame.Web.SessionLog SLog = new SageFrame.Web.SessionLog();
                SLog.SessionTrackerUpdateUsername(sessionTracker, GetUsername, GetPortalID.ToString());
                Session[SessionKeys.Tracker] = sessionTracker;
            }
        }
示例#12
0
        private void LogInPublicModeRegistration()
        {
            string strRoles             = string.Empty;
            MembershipController member = new MembershipController();
            RoleController       role   = new RoleController();
            UserInfo             user   = member.GetUserDetails(GetPortalID, UserName.Text.Trim());

            if (!(string.IsNullOrEmpty(UserName.Text) && string.IsNullOrEmpty(Password.Text)))
            {
                if (PasswordHelper.ValidateUser(user.PasswordFormat, Password.Text, user.Password, user.PasswordSalt))
                {
                    string userRoles = role.GetRoleNames(user.UserName, GetPortalID);
                    strRoles += userRoles;
                    if (strRoles.Length > 0)
                    {
                        SetUserRoles(strRoles);
                        SessionTracker sessionTracker = (SessionTracker)Session[SessionKeys.Tracker];
                        sessionTracker.PortalID      = GetPortalID.ToString();
                        sessionTracker.Username      = UserName.Text;
                        Session[SessionKeys.Tracker] = sessionTracker;
                        SageFrame.Web.SessionLog SLog = new SageFrame.Web.SessionLog();
                        SLog.SessionTrackerUpdateUsername(sessionTracker, sessionTracker.Username, GetPortalID.ToString());
                        {
                            FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
                                                                                             user.UserName,
                                                                                             DateTime.Now,
                                                                                             DateTime.Now.AddMinutes(30),
                                                                                             true,
                                                                                             GetPortalID.ToString(),
                                                                                             FormsAuthentication.FormsCookiePath);

                            // Encrypt the ticket.
                            string encTicket = FormsAuthentication.Encrypt(ticket);

                            // Create the cookie.
                            string randomCookieValue = GenerateRandomCookieValue();
                            Session[SessionKeys.RandomCookieValue] = randomCookieValue;
                            SecurityPolicy  objSecurity            = new SecurityPolicy();
                            HttpCookie      cookie                 = new HttpCookie(objSecurity.FormsCookieName(GetPortalID), encTicket);
                            SageFrameConfig objConfig              = new SageFrameConfig();
                            string          ServerCookieExpiration = objConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.ServerCookieExpiration);
                            int             expiryTime             = Math.Abs(int.Parse(ServerCookieExpiration));
                            expiryTime     = expiryTime < 5 ? 5 : expiryTime;
                            cookie.Expires = DateTime.Now.AddMinutes(expiryTime);
                            Response.Cookies.Add(cookie);

                            if (!IsParent)
                            {
                                Response.Redirect(ResolveUrl("~/portal/" + GetPortalSEOName + "/" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + Extension), false);
                            }
                            else
                            {
                                Response.Redirect(ResolveUrl("~/" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + Extension), false);
                            }
                        }
                    }
                }
            }
        }
示例#13
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
        {
        }
    }
示例#14
0
        private void LogInPublicModeRegistration()
        {
            string strRoles             = string.Empty;
            MembershipController member = new MembershipController();
            RoleController       role   = new RoleController();
            UserInfo             user   = member.GetUserDetails(GetPortalID, UserName.Text);

            if (!(string.IsNullOrEmpty(UserName.Text) && string.IsNullOrEmpty(Password.Text)))
            {
                if (PasswordHelper.ValidateUser(user.PasswordFormat, Password.Text, user.Password, user.PasswordSalt))
                {
                    string userRoles = role.GetRoleNames(user.UserName, GetPortalID);
                    strRoles += userRoles;
                    if (strRoles.Length > 0)
                    {
                        SetUserRoles(strRoles);
                        SessionTracker sessionTracker = (SessionTracker)Session[SessionKeys.Tracker];
                        sessionTracker.PortalID      = GetPortalID.ToString();
                        sessionTracker.Username      = UserName.Text;
                        Session[SessionKeys.Tracker] = sessionTracker;
                        SageFrame.Web.SessionLog SLog = new SageFrame.Web.SessionLog();
                        SLog.SessionTrackerUpdateUsername(sessionTracker, sessionTracker.Username, GetPortalID.ToString());
                        {
                            FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
                                                                                             user.UserName,
                                                                                             DateTime.Now,
                                                                                             DateTime.Now.AddMinutes(30),
                                                                                             true,
                                                                                             GetPortalID.ToString(),
                                                                                             FormsAuthentication.FormsCookiePath);

                            // Encrypt the ticket.
                            string encTicket = FormsAuthentication.Encrypt(ticket);

                            // Create the cookie.
                            Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName + "_" + GetApplicationName + "_" + GetPortalID, encTicket));
                            bool IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
                            if (IsUseFriendlyUrls)
                            {
                                if (GetPortalID > 1)
                                {
                                    Response.Redirect(ResolveUrl("~/portal/" + GetPortalSEOName + "/" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + Extension), false);
                                }
                                else
                                {
                                    Response.Redirect(ResolveUrl("~/" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + Extension), false);
                                }
                            }
                            else
                            {
                                Response.Redirect(ResolveUrl("~/Default" + Extension + "?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage)), false);
                            }
                        }
                    }
                }
            }
        }
示例#15
0
        private void SagePageLoadPart()
        {
            LoadGlobalVariables();
            if (!IsPostBack)
            {
                hypHome.NavigateUrl    = sageNavigateUrl;
                hypHome.Text           = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage);
                hypHome.ImageUrl       = GetTemplateImageUrl("home.png", true);
                hypPreview.NavigateUrl = hypHome.NavigateUrl;
                Image imgProgress = (Image)UpdateProgress1.FindControl("imgPrgress");
                if (imgProgress != null)
                {
                    imgProgress.ImageUrl = GetTemplateImageUrl("ajax-loader.gif", true);
                }
                bool IsAdmin = false;
                if (HttpContext.Current.User != null)
                {
                    MembershipUser user = Membership.GetUser();
                    if (user != null)
                    {
                        string[] sysRoles = SystemSetting.SYSTEM_SUPER_ROLES;
                        foreach (string role in sysRoles)
                        {
                            if (Roles.IsUserInRole(user.UserName, role))
                            {
                                IsAdmin = true;
                                break;
                            }
                        }
                    }
                }
                if (IsAdmin)
                {
                    divAdminControlPanel.Attributes.Add("style", "display:block");
                }
                else
                {
                    divAdminControlPanel.Attributes.Add("style", "display:none");
                }
                Session["payMentGateWayRefresh"] = Server.UrlEncode(System.DateTime.Now.ToString());
            }
            SessionTracker sessionTracker = (SessionTracker)Session["Tracker"];

            if (string.IsNullOrEmpty(sessionTracker.PortalID))
            {
                sessionTracker.PortalID = GetPortalID.ToString();
                sessionTracker.Username = GetUsername;
                SageFrameConfig sfConfig = new SageFrameConfig();
                sessionTracker.InsertSessionTrackerPages = sfConfig.GetSettingsByKey(SageFrameSettingKeys.InsertSessionTrackingPages);
                SageFrame.Web.SessionLog SLog = new SageFrame.Web.SessionLog();
                SLog.SessionTrackerUpdateUsername(sessionTracker, GetUsername, GetPortalID.ToString());
                Session["Tracker"] = sessionTracker;
            }
        }
        private void LogInPublicModeRegistration()
        {
            string strRoles             = string.Empty;
            MembershipController member = new MembershipController();
            RoleController       role   = new RoleController();
            UserInfo             user   = member.GetUserDetails(GetPortalID, UserName.Text);

            if (!(string.IsNullOrEmpty(UserName.Text) && string.IsNullOrEmpty(Password.Text)))
            {
                if (PasswordHelper.ValidateUser(user.PasswordFormat, Password.Text, user.Password, user.PasswordSalt))
                {
                    string userRoles = role.GetRoleNames(user.UserName, GetPortalID);
                    strRoles += userRoles;
                    if (strRoles.Length > 0)
                    {
                        SetUserRoles(strRoles);
                        SessionTracker sessionTracker = (SessionTracker)Session["Tracker"];
                        sessionTracker.PortalID = GetPortalID.ToString();
                        sessionTracker.Username = UserName.Text;
                        Session["Tracker"]      = sessionTracker;
                        SageFrame.Web.SessionLog SLog = new SageFrame.Web.SessionLog();
                        string          ReturnUrl     = string.Empty;
                        SageFrameConfig sfConfig      = new SageFrameConfig();
                        SLog.SessionTrackerUpdateUsername(sessionTracker, sessionTracker.Username,
                                                          GetPortalID.ToString());
                        FormsAuthentication.SetAuthCookie(UserName.Text, true);

                        if (Request.QueryString["ReturnUrl"] != null)
                        {
                            Response.Redirect(ResolveUrl(Request.QueryString["ReturnUrl"].ToString()), false);
                        }
                        else
                        {
                            bool IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
                            if (IsUseFriendlyUrls)
                            {
                                if (GetPortalID > 1)
                                {
                                    Response.Redirect("~/portal/" + GetPortalSEOName + "/" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + ".aspx", false);
                                }
                                else
                                {
                                    Response.Redirect("~/" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + ".aspx", false);
                                }
                            }
                            else
                            {
                                Response.Redirect(ResolveUrl("~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + pagebase.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage)), false);
                            }
                        }
                    }
                }
            }
        }
示例#17
0
        private void BindPortalSetting()
        {
            Hashtable       hst = new Hashtable();
            SettingProvider sep = new SettingProvider();
            DataTable       dt  = sep.GetSettingsByPortal(GetPortalID.ToString(), string.Empty); //GetSettingsByPortal();

            if (dt != null && dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    hst.Add(dt.Rows[i]["SettingKey"].ToString(), dt.Rows[i]["SettingValue"].ToString());
                }
            }
            HttpContext.Current.Cache.Insert("SageSetting", hst);
        }
示例#18
0
 public string GetStoreNotAccessPageContent()
 {
     try
     {
         List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >();
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@StoreID", GetStoreID.ToString()));
         ParaMeterCollection.Add(new KeyValuePair <string, object>("@PortalID", GetPortalID.ToString()));
         SQLHandler sagesql = new SQLHandler();
         return(sagesql.ExecuteAsScalar <string>("dbo.usp_Aspx_CheckStoreNotAccessPageContent", ParaMeterCollection));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
        private void LogInPublicModeRegistration(UserInfo user)
        {
            string          strRoles  = string.Empty;
            RoleController  role      = new RoleController();
            SageFrameConfig sfConfig  = new SageFrameConfig();
            string          userRoles = role.GetRoleNames(user.UserName, GetPortalID);

            strRoles += userRoles;
            if (strRoles.Length > 0)
            {
                SetUserRoles(strRoles);
                SessionTracker sessionTracker = (SessionTracker)Session[SessionKeys.Tracker];
                sessionTracker.PortalID      = GetPortalID.ToString();
                sessionTracker.Username      = user.UserName;
                Session[SessionKeys.Tracker] = sessionTracker;
                SageFrame.Web.SessionLog SLog = new SageFrame.Web.SessionLog();
                SLog.SessionTrackerUpdateUsername(sessionTracker, sessionTracker.Username, GetPortalID.ToString());
                {
                    FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
                                                                                     user.UserName,
                                                                                     DateTime.Now,
                                                                                     DateTime.Now.AddMinutes(30),
                                                                                     true,
                                                                                     GetPortalID.ToString(),
                                                                                     FormsAuthentication.FormsCookiePath);
                    // Encrypt the ticket.
                    string encTicket = FormsAuthentication.Encrypt(ticket);
                    // Create the cookie.
                    Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName + "_" + GetApplicationName + "_" + GetPortalID, encTicket));
                    bool IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
                    if (IsUseFriendlyUrls)
                    {
                        if (GetPortalID > 1)
                        {
                            Response.Redirect(ResolveUrl("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + SageFrameSettingKeys.PageExtension), false);
                        }
                        else
                        {
                            Response.Redirect(ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + SageFrameSettingKeys.PageExtension), false);
                        }
                    }
                    else
                    {
                        Response.Redirect(ResolveUrl("~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage)), false);
                    }
                }
            }
        }
        private void DeletePortal(Int32 portalID)
        {
            PortalInfo objInfo = PortalController.GetPortalByPortalID(portalID, GetUsername);

            txtPortalName.Text = objInfo.Name;
            if (HttpRuntime.Cache["AspxStoreSetting" + GetPortalID.ToString() + GetStoreID.ToString()] != null)
            {
                PortalController.DeleteStorePortal(portalID, GetPortalID, GetUsername);
            }
            else
            {
                PortalController.DeletePortal(portalID, GetUsername);
            }

            ShowMessage("", GetSageMessage("PortalSettings", "PortalDeleteSuccessfully"), "", SageMessageType.Success);
        }
示例#21
0
        private void LogInPublicModeRegistration(UserInfo user)
        {
            string          strRoles  = string.Empty;
            RoleController  role      = new RoleController();
            SageFrameConfig sfConfig  = new SageFrameConfig();
            string          userRoles = role.GetRoleIDs(user.UserName, GetPortalID);

            strRoles += userRoles;
            if (strRoles.Length > 0)
            {
                SetUserRoles(strRoles);
                //SessionTracker sessionTracker = (SessionTracker)Session[SessionKeys.Tracker];
                //sessionTracker.PortalID = GetPortalID.ToString();
                //sessionTracker.Username = user.UserName;
                //Session[SessionKeys.Tracker] = sessionTracker;
                SageFrame.Web.SessionLog SLog       = new SageFrame.Web.SessionLog();
                SageFrameConfig          SageConfig = new SageFrameConfig();
                SageFrameSettingKeys.PageExtension = SageConfig.GetSettingsByKey(SageFrameSettingKeys.SettingPageExtension);
                bool EnableSessionTracker = bool.Parse(SageConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.EnableSessionTracker));
                if (EnableSessionTracker)
                {
                    SLog.SessionTrackerUpdateUsername(user.UserName, GetPortalID.ToString());
                }
                {
                    FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
                                                                                     user.UserName,
                                                                                     DateTime.Now,
                                                                                     DateTime.Now.AddMinutes(30),
                                                                                     true,
                                                                                     GetPortalID.ToString(),
                                                                                     FormsAuthentication.FormsCookiePath);
                    // Encrypt the ticket.
                    string encTicket = FormsAuthentication.Encrypt(ticket);
                    // Create the cookie.
                    SecurityPolicy objSecurity = new SecurityPolicy();
                    Response.Cookies.Add(new HttpCookie(objSecurity.FormsCookieName(GetPortalID), encTicket));
                    if (!IsParent)
                    {
                        Response.Redirect(ResolveUrl("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + SageFrameSettingKeys.PageExtension), false);
                    }
                    else
                    {
                        Response.Redirect(ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + SageFrameSettingKeys.PageExtension), false);
                    }
                }
            }
        }
 private void BindGrid()
 {
     try
     {
         DataSet ds = GetSettingsByPortalAndSettingType(GetPortalID.ToString(), GetUsername);
         if (ds != null && ds.Tables != null && ds.Tables[0] != null)
         {
             DataTable dt = ds.Tables[0];
             ViewState["FeedBackdt"] = dt;
             gdvContactUs.DataSource = dt;
             gdvContactUs.DataBind();
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
示例#23
0
        private HTMLContentInfo GetHTMLContent(int portalID, int userModuleID, string cultureName)
        {
            List <KeyValuePair <string, string> > ParaMeterCollection = new List <KeyValuePair <string, string> >();

            ParaMeterCollection.Add(new KeyValuePair <string, string>("@PortalID", GetPortalID.ToString()));
            ParaMeterCollection.Add(new KeyValuePair <string, string>("@UsermoduleID", userModuleID.ToString()));
            ParaMeterCollection.Add(new KeyValuePair <string, string>("@CultureName", cultureName.ToString()));

            SQLHandler sagesql = new SQLHandler();
            //ArrayList arrColl = DataSourceHelper.FillCollection(sagesql.ExecuteAsDataReader("dbo.sp_HtmlTextGetByPortalAndUserModule", ParaMeterCollection), typeof(HTMLContentInfo));
            HTMLContentInfo objHtmlInfo = sagesql.ExecuteAsObject <HTMLContentInfo>("dbo.sp_HtmlTextGetByPortalAndUserModule", ParaMeterCollection);

            //if (arrColl != null)
            //{
            //    objHtmlInfo = (HTMLContentInfo)arrColl[0];
            //}
            return(objHtmlInfo);
        }
示例#24
0
        private void SagePageLoadPart()
        {
            try
            {
                CreateGlobalVariables();
                if (!IsPostBack)
                {
                    hypHome.NavigateUrl    = sageNavigateUrl;
                    hypHome.Text           = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage);
                    hypHome.ImageUrl       = GetTemplateImageUrl("home.png", true);
                    hypPreview.NavigateUrl = hypHome.NavigateUrl;
                    Image imgProgress = (Image)UpdateProgress1.FindControl("imgPrgress");
                    if (imgProgress != null)
                    {
                        imgProgress.ImageUrl = GetTemplateImageUrl("ajax-loader.gif", true);
                    }
                }
                if ((SessionTracker)Session["Tracker"] != null)
                {
                    SessionTracker sessionTracker = (SessionTracker)Session["Tracker"];
                    if (string.IsNullOrEmpty(sessionTracker.PortalID))
                    {
                        sessionTracker.PortalID = GetPortalID.ToString();
                        sessionTracker.Username = GetUsername;
                        SageFrameConfig sfConfig = new SageFrameConfig();
                        sessionTracker.InsertSessionTrackerPages = sfConfig.GetSettingsByKey(SageFrameSettingKeys.InsertSessionTrackingPages);

                        SageFrame.Web.SessionLog SLog = new SageFrame.Web.SessionLog();
                        SLog.SessionTrackerUpdateUsername(sessionTracker, GetUsername, GetPortalID.ToString());
                        SLog.StoreSessionTrackerAdd(sessionTracker, GetStoreID, GetPortalID);
                        Session["Tracker"] = sessionTracker;
                    }
                }
                //if ((StoreSettingInfo)Session["DefaultStoreSettings"] == null)
                //{
                //    AspxCommerceWebService AspxCommerceWebService = new AspxCommerceWebService();
                //    StoreSettingInfo DefaultStoreSettings = AspxCommerceWebService.GetAllStoreSettings(GetStoreID, GetPortalID, GetCurrentCultureName);
                //    Session["DefaultStoreSettings"] = DefaultStoreSettings;
                //}
            }
            catch
            {
            }
        }
示例#25
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;
        SecurityPolicy            objSecurity = new SecurityPolicy();
        FormsAuthenticationTicket ticket      = objSecurity.GetUserTicket(GetPortalID);

        if (ticket != null && ticket.Name != ApplicationKeys.anonymousUser)
        {
            MembershipController member     = new MembershipController();
            UserInfo             userDetail = member.GetUserDetails(GetPortalID, 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)
        {
            string returnURL = HttpContext.Current.Session["StoreBlocked"].ToString();
            HttpContext.Current.Session.Remove("StoreBlocked");
            Response.Redirect(returnURL);
        }
        else
        {
        }
    }
 protected void imbSave_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         int    PortalID = GetPortalID;
         string url      = txtScreenName.Text;
         int    userModuleID;
         bool   status = int.TryParse(SageUserModuleID, out userModuleID);
         bool   statuses;
         int    count;
         statuses = int.TryParse(txtTwittsCount.Text, out count);
         TwitterSqlhandler twtSql = new TwitterSqlhandler();
         twtSql.SaveTwitterSettings(userModuleID.ToString(), GetPortalID.ToString(), "Tweets", url, count.ToString());
         ShowMessage(SageMessageTitle.Information.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/TwitterDeck/ModuleLocalText", "TwitterSettingSavedSuccessfully"), "", SageMessageType.Success);
     }
     catch (Exception Ex)
     {
         ProcessException(Ex);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("CartPriceRule", "/Templates/" + TemplateName + "/css/GridView/tablesort.css", "/Templates/" + TemplateName + "/css/TreeView/ui.tree.css", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/JQueryUI/jquery.ui.all.css");
                IncludeJs("CartPriceRule", "/js/JQueryUI/jquery-ui-1.8.10.custom.js", "/js/FormValidation/jquery.validate.js", "/js/GridView/jquery.grid.js",
                          "/js/GridView/SagePaging.js", "/js/GridView/jquery.global.js", "/js/GridView/jquery.dateFormat.js", "/js/DateTime/date.js",
                          "/js/DateTime/date.js", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js", "/js/jquery.multipleselectbox.js", "/Modules/AspxCommerce/AspxCartPricingRule/js/CartPriceRule.js");

                PortalID    = int.Parse(GetPortalID.ToString());
                StoreID     = int.Parse(GetStoreID.ToString());
                UserName    = GetUsername;
                CultureName = GetCurrentCultureName;
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
示例#28
0
        private void GetStoreSettings()
        {
            Hashtable            hst = new Hashtable();
            StoreSettingProvider sep = new StoreSettingProvider();

            if (HttpContext.Current.Cache["AspxStoreSetting" + GetPortalID.ToString() + GetStoreID.ToString()] != null)
            {
                hst = (Hashtable)HttpContext.Current.Cache["AspxStoreSetting" + GetPortalID.ToString() + GetStoreID.ToString()];
            }
            else
            {
                DataTable dt = sep.GetStoreSettings(GetStoreID, GetPortalID, GetCurrentCultureName); //GetSettingsByPortal();
                if (dt != null && dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        hst.Add(dt.Rows[i]["SettingKey"].ToString(), dt.Rows[i]["SettingValue"].ToString());
                    }
                }
            }
            HttpContext.Current.Cache.Insert("AspxStoreSetting" + GetPortalID.ToString() + GetStoreID.ToString(), hst);
        }
 public void CreateNewTemplateFolder(string TemplateName)
 {
     try
     {
         string completePath = Server.MapPath(appPath + "/Templates/" + TemplateName);
         string path         = HttpContext.Current.Server.MapPath(appPath).Replace(@"\Admin", "");
         if (HttpRuntime.Cache["AspxStoreSetting" + GetPortalID.ToString() + GetStoreID.ToString()] != null)
         {
             DirectoryInfo SrcDirA = new DirectoryInfo(path + "/Templates/AspxCommerce/");
             DirectoryInfo DisDirA = new DirectoryInfo(path + "/Templates/" + TemplateName);
             CopyDirectory(SrcDirA, DisDirA);
         }
         else
         {
             DirectoryInfo SrcDir = new DirectoryInfo(path + "/Core/Blank/");
             DirectoryInfo DisDir = new DirectoryInfo(path + "/Templates/" + TemplateName);
             CopyDirectory(SrcDir, DisDir);
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 /// <summary>
 /// Get Module Control Types
 /// </summary>
 /// <param name="ModuleID">ModuleID</param>
 /// <returns>Module Information, Control Types, Module Package Detail</returns>
 public DataSet GetExtensionSettings(string ModuleID)
 {
     try
     {
         List <KeyValuePair <string, string> > ParaMeterCollection = new List <KeyValuePair <string, string> >();
         ParaMeterCollection.Add(new KeyValuePair <string, string>("@ModuleID", ModuleID));
         ParaMeterCollection.Add(new KeyValuePair <string, string>("@PortalID", GetPortalID.ToString()));
         DataSet    ds      = new DataSet();
         SQLHandler sagesql = new SQLHandler();
         ds = sagesql.ExecuteAsDataSet("dbo.sp_GetExtensionSetting", ParaMeterCollection);
         return(ds);
     }
     catch (Exception e)
     {
         throw e;
     }
 }