Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                SiteSettings settings = new SiteSettings();
                settings.LoadByPrimaryKey(1); //fb
                uiHyperLinkFB.NavigateUrl = settings.URL;

                settings.LoadByPrimaryKey(2); //twitter
                uiHyperLinkTwitter.NavigateUrl = settings.URL;

                settings.LoadByPrimaryKey(3); //youtube
                uiHyperLinkYoutube.NavigateUrl = settings.URL;

                settings.LoadByPrimaryKey(4); //google
                uiHyperLinkGp.NavigateUrl = settings.URL;
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.IsAuthenticated)
                Response.Redirect("home.aspx");

            if (!IsPostBack)
            {
                SiteSettings settings = new SiteSettings();
                settings.LoadByPrimaryKey(1); //fb
                uiHyperLinkFB.NavigateUrl = settings.URL;

                settings.LoadByPrimaryKey(2); //twitter
                uiHyperLinkTwitter.NavigateUrl = settings.URL;

                settings.LoadByPrimaryKey(3); //youtube
                uiHyperLinkYoutube.NavigateUrl = settings.URL;

                settings.LoadByPrimaryKey(4); //google
                uiHyperLinkGp.NavigateUrl = settings.URL;
            }
        }
Esempio n. 3
0
        protected override void OnInit(EventArgs e)
        {
            if (Request.IsAuthenticated)
            {
                if (!IsPostBack)
                {
                    loadUserInfo();

                    var mails = Helper.EnumUtil.GetValues<Helper.Enums.SiteMembers>().Select(m => new
                    {
                        ID = (int)m,
                        Name = Helper.StringEnum.GetStringValue(m),
                    }).ToList();
                    lstHelpRequests.DataTextField = "Name";
                    lstHelpRequests.DataValueField = "ID";
                    lstHelpRequests.DataSource = mails;
                    lstHelpRequests.DataBind();

                    SiteSettings settings = new SiteSettings();
                    settings.LoadByPrimaryKey(1); //fb
                    uiHyperLinkFB.NavigateUrl = settings.URL;

                    settings.LoadByPrimaryKey(2); //twitter
                    uiHyperLinkTwitter.NavigateUrl = settings.URL;

                    settings.LoadByPrimaryKey(3); //youtube
                    uiHyperLinkYoutube.NavigateUrl = settings.URL;

                    settings.LoadByPrimaryKey(4); //google
                    uiHyperLinkGp.NavigateUrl = settings.URL;
                }
            }
            else
            {
                Response.Redirect("~/default.aspx");
            }
            base.OnInit(e);
        }
Esempio n. 4
0
        public bool SaveTerms(string terms)
        {
            try
            {
                SiteSettings setting = new SiteSettings();
                setting.LoadByPrimaryKey(5); // terms
                setting.Content = Server.HtmlEncode(terms);
                setting.Save();

            }
            catch (Exception ex)
            {
                return false;
            }

            return true;
        }
Esempio n. 5
0
        public bool SaveSocials(string fb, string tw, string gp, string yt)
        {
            try
            {
                SiteSettings setting = new SiteSettings();
                setting.LoadByPrimaryKey(1); // fb
                setting.URL = fb;
                setting.Save();

                setting.LoadByPrimaryKey(2); // TWITTER
                setting.URL = tw;
                setting.Save();

                setting.LoadByPrimaryKey(3); // youtube
                setting.URL = yt;
                setting.Save();

                setting.LoadByPrimaryKey(4); // google
                setting.URL = gp;
                setting.Save();
            }
            catch (Exception ex)
            {
                return false;
            }

            return true;
        }
Esempio n. 6
0
        public bool SavePrivacy(string privacy)
        {
            try
            {
                SiteSettings setting = new SiteSettings();
                setting.LoadByPrimaryKey(6); // privacy
                setting.Content = Server.HtmlEncode(privacy);
                setting.Save();

            }
            catch (Exception ex)
            {
                return false;
            }

            return true;
        }
Esempio n. 7
0
        public bool SaveFaq(string Faq)
        {
            try
            {
                SiteSettings setting = new SiteSettings();
                setting.LoadByPrimaryKey(7); // faq
                setting.Content = Server.HtmlEncode(Faq);
                setting.Save();

            }
            catch (Exception ex)
            {
                return false;
            }

            return true;
        }