Exemplo n.º 1
0
        //public static PageServices GetUserControlPageService(UserControl control)
        //{
        //    var pageParent = (control.Page as BasePage);
        //    if (pageParent == null)
        //        return new PageServices(control.Page);
        //    return pageParent.PageService;
        //}

        private void basePagePreInit(object sender, EventArgs e)
        {
            try {
                MasterPage = (BaseSRPMaster)Master;
                MasterPage.InitResFile();
            } catch //(Exception ex)
            {
            }
        }
        //public void LoadPageInfo()
        //{

        //    if (!string.IsNullOrEmpty(srpPageName))
        //    {
        //        //int cmsPageID = CMSPageHelper.FindPageId(srpPageName);

        //        //pageInfo = CMSPageHelper.SelectPageInfo(cmsPageID);
        //        //pageContent = CMSPageHelper.SelectPageContent(cmsPageID);
        //        //pageWidgetSettings = CMSPageHelper.SelectPageWidgetSettings(cmsPageID);
        //    }
        //}

        public void TranslateStrings(Control ctl)
        {
            MasterPage = (BaseSRPMaster)Master;
            MasterPage.InitResFile();

            LoadLabels(ctl);
            LoadValidators(ctl);
            LoadRadioButtonLists(ctl);
            LoadDropDownListLists(ctl);
            LoadButtons(ctl);
        }
        //public static PageServices GetUserControlPageService(UserControl control)
        //{
        //    var pageParent = (control.Page as BasePage);
        //    if (pageParent == null)
        //        return new PageServices(control.Page);
        //    return pageParent.PageService;
        //}

        private void basePagePreInit(object sender, EventArgs e)
        {
            try
            {
                MasterPage = (BaseSRPMaster)Master;
                MasterPage.InitResFile();
            }
            catch //(Exception ex)
            {
            }
            if ("y".Equals(Request.QueryString["print"]))
            {
                MasterPageFile = "~/master/Print.master";
            }
        }
Exemplo n.º 4
0
        //public static PageServices GetUserControlPageService(UserControl control)
        //{
        //    var pageParent = (control.Page as BasePage);
        //    if (pageParent == null)
        //        return new PageServices(control.Page);
        //    return pageParent.PageService;
        //}

        private void basePagePreInit(object sender, EventArgs e)
        {
            try {
                var secretCode = this.Context.Request.QueryString["secretcode"];
                if (!string.IsNullOrWhiteSpace(secretCode))
                {
                    Session[SessionKey.SecretCode] = secretCode.Length > 50
                        ? secretCode.Substring(0, 50).Trim()
                        : secretCode.Trim();
                    Session[SessionKey.RequestedPath] = "~/Dashboard.aspx";
                }

                MasterPage = (BaseSRPMaster)Master;
                MasterPage.InitResFile();
            } catch //(Exception ex)
            {
            }
        }
Exemplo n.º 5
0
        //public void LoadPageInfo()
        //{

        //    if (!string.IsNullOrEmpty(srpPageName))
        //    {
        //        //int cmsPageID = CMSPageHelper.FindPageId(srpPageName);

        //        //pageInfo = CMSPageHelper.SelectPageInfo(cmsPageID);
        //        //pageContent = CMSPageHelper.SelectPageContent(cmsPageID);
        //        //pageWidgetSettings = CMSPageHelper.SelectPageWidgetSettings(cmsPageID);
        //    }
        //}

        public void TranslateStrings(Control ctl)
        {
            MasterPage = (BaseSRPMaster)Master;
            MasterPage.InitResFile();

            LoadLabels(ctl);
            LoadValidators(ctl);
            LoadRadioButtonLists(ctl);
            LoadDropDownListLists(ctl);
            LoadButtons(ctl);
            string systemName = GetResourceString("system-name");

            if (string.IsNullOrEmpty(Page.Title) || Page.Title == "Home Page")
            {
                if (systemName != "system-name")
                {
                    string title  = systemName;
                    string slogan = GetResourceString("slogan");
                    if (slogan != "slogan")
                    {
                        title = string.Format("{0} - {1}",
                                              title,
                                              slogan);
                    }
                    Page.Title = title.Trim();
                }
            }
            else
            {
                if (systemName != "system-name")
                {
                    Page.Title = string.Format("{0} - {1}",
                                               Page.Title,
                                               systemName).Trim();
                }
            }
        }
        //public static PageServices GetUserControlPageService(UserControl control)
        //{
        //    var pageParent = (control.Page as BasePage);
        //    if (pageParent == null)
        //        return new PageServices(control.Page);
        //    return pageParent.PageService;
        //}

        private void basePagePreInit(object sender, EventArgs e) {
            try {
                var secretCode = this.Context.Request.QueryString["secretcode"];
                if (!string.IsNullOrWhiteSpace(secretCode))
                {
                    Session[SessionKey.SecretCode] = secretCode.Length > 50
                        ? secretCode.Substring(0, 50).Trim()
                        : secretCode.Trim();
                    Session[SessionKey.RequestedPath] = "~/Dashboard.aspx";
                }

                MasterPage = (BaseSRPMaster)Master;
                MasterPage.InitResFile();
            } catch //(Exception ex)
              {
            }
        }
        //public void LoadPageInfo()
        //{

        //    if (!string.IsNullOrEmpty(srpPageName))
        //    {
        //        //int cmsPageID = CMSPageHelper.FindPageId(srpPageName);

        //        //pageInfo = CMSPageHelper.SelectPageInfo(cmsPageID);
        //        //pageContent = CMSPageHelper.SelectPageContent(cmsPageID);
        //        //pageWidgetSettings = CMSPageHelper.SelectPageWidgetSettings(cmsPageID);
        //    }
        //}

        public void TranslateStrings(Control ctl) {
            MasterPage = (BaseSRPMaster)Master;
            MasterPage.InitResFile();

            LoadLabels(ctl);
            LoadValidators(ctl);
            LoadRadioButtonLists(ctl);
            LoadDropDownListLists(ctl);
            LoadButtons(ctl);
            string systemName = GetResourceString("system-name");
            if(string.IsNullOrEmpty(Page.Title) || Page.Title == "Home Page") {
                if(systemName != "system-name") {
                    string title = systemName;
                    string slogan = GetResourceString("slogan");
                    if(slogan != "slogan") {
                        title = string.Format("{0} - {1}",
                                              title,
                                              slogan);
                    }
                    Page.Title = title.Trim();
                }
            } else {
                if(systemName != "system-name") {
                    Page.Title = string.Format("{0} - {1}",
                                               Page.Title,
                                               systemName).Trim();
                }
            }
        }
Exemplo n.º 8
0
 //public static PageServices GetUserControlPageService(UserControl control)
 //{
 //    var pageParent = (control.Page as BasePage);
 //    if (pageParent == null)
 //        return new PageServices(control.Page);
 //    return pageParent.PageService;
 //}
 private void basePagePreInit(object sender, EventArgs e)
 {
     try {
         MasterPage = (BaseSRPMaster)Master;
         MasterPage.InitResFile();
     } catch //(Exception ex)
       {
     }
 }