Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string tingImageUrlFolder         = ConfigurationManager.AppSettings["tingImageServiceCall"];
            Dictionary <string, string> lodge = new Dictionary <string, string>();
            string lodgename = Request.QueryString["p"];

            lodgename = StripAwayUnderscores(lodgename);
            if (!String.IsNullOrEmpty(lodgename))
            {
                lodge = library.GetLodge(lodgename);
                if (lodge["lodgeFound"] == "1")
                {
                    setLodgeName(lodge);
                    processLodgeLogo(lodge["logo"]);
                    //processLodgeTopFiveTingers(lodge["id"]); // not updating this yet
                    //processLodgeTings(lodge);
                    //json = JsonConvert.SerializeObject(AjaxOperation.GetKrugerTings().GetRange(0,10));
                    json = JsonConvert.SerializeObject(AjaxOperation.GetLodgeTings(new Guid(lodge["parkid"])));

                    var script = string.Format("setLodgeTingers({0}, '{1}', '{2}', '{3}', '{4}')", json, tingImageUrlFolder, lodgename, lodge["id"], GetTextSliderContent(lodge));

                    ScriptManager.RegisterStartupScript(this, this.GetType(), "", script, true);
                    loadTingsUserControl();
                }
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            latestGalleries = new Dictionary <string, List <GalleryItem> >();
            latestGalleries = AjaxOperation.GetHomePageLatestGalleries();
            var galleries      = JsonConvert.SerializeObject(latestGalleries);
            var scriptFunction = String.Format("setLattestGalleries({0});", galleries);

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", scriptFunction, true);
        }
 private void processLodgeTopFiveTingers(string lodgeid)
 {
     topFiveTingers = new List <Dictionary <string, string> >();
     topFiveTingers = AjaxOperation.GetLodgeTopFiveTingers(lodgeid);
 }