Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack)
        {
            return;
        }

        SetTitle(commonCulture.ElementValues.getResourceXPathString("/Products/ClubGallardo/Label", commonVariables.ProductsXML));

        var opSettings = new OperatorSettings(System.Configuration.ConfigurationManager.AppSettings.Get("Operator"));
        var addGpi     = Convert.ToBoolean(opSettings.Values.Get("GPIAddOtheClubs"));

        var isbHandler  = new ISBHandler(commonVariables.CurrentMemberSessionId, "ClubGallardo", commonVariables.GetSessionVariable("CurrencyCode"));
        var isbCategory = isbHandler.Process();

        var pngHandler  = new PNGHandler(commonVariables.CurrentMemberSessionId, "ClubGallardo");
        var pngCategory = pngHandler.Process();

        IEnumerable <IGrouping <string, GameCategoryInfo> > games;

        if (addGpi)
        {
            var gpiHandler  = new GPIHandler(commonVariables.CurrentMemberSessionId);
            var gpiCategory = gpiHandler.Process(true);
            isbCategory[0].Current = gpiHandler.InsertInjectedGames(gpiCategory, isbCategory[0].Current);

            games = pngCategory.Union(isbCategory).Union(gpiCategory).GroupBy(x => x.Title);
        }
        else
        {
            games = pngCategory.Union(isbCategory).GroupBy(x => x.Title);
        }

        StringBuilder sbGames = new StringBuilder();

        foreach (var category in games)
        {
            sbGames.AppendFormat("<div data-role='collapsible' data-collapsed='false' data-theme='b' data-content-theme='a' data-mini='true'><h4>{0}</h4>", category.Key);

            sbGames.AppendFormat("<div id='div{0}' class='div-product'><div><ul>", category.Key);

            foreach (var item in category)
            {
                AddGames(sbGames, item.New);

                AddGames(sbGames, item.Current);
            }

            sbGames.Append("</ul></div></div></div>");
        }

        divContainer.InnerHtml = Convert.ToString(sbGames);
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack)
        {
            return;
        }

        SetTitle(commonCulture.ElementValues.getResourceXPathString("/Products/ClubDivino/Label", commonVariables.ProductsXML));

        var opSettings = new OperatorSettings(System.Configuration.ConfigurationManager.AppSettings.Get("Operator"));
        var addGpi     = Convert.ToBoolean(opSettings.Values.Get("GPIAddOtheClubs"));
        var sbGames    = new StringBuilder();

        var bsHandler  = new BSHandler(commonVariables.CurrentMemberSessionId, "ClubDivino", "FundTransfer", GetDevice());
        var bsCategory = bsHandler.Process();

        var cxHandler  = new CTXMHandler(commonVariables.CurrentMemberSessionId);
        var cxCategory = cxHandler.Process();

        var uc8Handler  = new UC8Handler(commonVariables.CurrentMemberSessionId, "ClubDivino", "FundTransfer");
        var uc8Category = uc8Handler.Process();

        IEnumerable <IGrouping <string, GameCategoryInfo> > games;

        if (addGpi)
        {
            var gpiHandler  = new GPIHandler(commonVariables.CurrentMemberSessionId);
            var gpiCategory = gpiHandler.Process(true);
            cxCategory[0].Current = gpiHandler.InsertInjectedGames(gpiCategory, cxCategory[0].Current);

            games = bsCategory.Union(cxCategory).Union(uc8Category).Union(gpiCategory).GroupBy(x => x.Title);
        }
        else
        {
            games = bsCategory.Union(cxCategory).Union(uc8Category).GroupBy(x => x.Title);
        }

        foreach (var group in games)
        {
            AddGamesPerDevice(sbGames, group);
        }

        divContainer.InnerHtml = Convert.ToString(sbGames);
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack)
        {
            return;
        }


        //var handler = new GNSHandler(commonVariables.CurrentMemberSessionId, "ClubNuovo", "FundTransfer");
        //var gnsCategory = handler.Process();
        if (!string.IsNullOrWhiteSpace(commonCookie.CookieCurrency))
        {
            if ((commonCookie.CookieCurrency.ToLower() == "vnd") || (commonCookie.CookieCurrency.ToLower() == "idr"))
            {
                _currencySupported = false;
            }
        }

        PLSHandler plsHandler;
        List <GameCategoryInfo> plsCategory = null;

        if (_currencySupported)
        {
            plsHandler  = new PLSHandler(commonVariables.CurrentMemberSessionId, "ClubNuovo", "FundTransfer");
            plsCategory = plsHandler.Process();
        }

        var mrsHandler  = new MRSHandler(commonVariables.CurrentMemberSessionId, "ClubNuovo", "FundTransfer");
        var mrsCategory = mrsHandler.Process();

        var opSettings = new OperatorSettings(System.Configuration.ConfigurationManager.AppSettings.Get("Operator"));
        var addGpi     = Convert.ToBoolean(opSettings.Values.Get("GPIAddOtheClubs"));

        IEnumerable <IGrouping <string, GameCategoryInfo> > games;

        if (addGpi)
        {
            var gpiHandler  = new GPIHandler(commonVariables.CurrentMemberSessionId);
            var gpiCategory = gpiHandler.Process(true);
            //gnsCategory[0].Current = gpiHandler.InsertInjectedGames(gpiCategory, gnsCategory[0].Current);
            //games = gnsCategory.Union(plsCategory).Union(gpiCategory).GroupBy(x => x.Title);

            if (_currencySupported)
            {
                plsCategory[0].Current = gpiHandler.InsertInjectedGames(gpiCategory, plsCategory[0].Current);
                games = plsCategory.Union(mrsCategory).Union(gpiCategory).GroupBy(x => x.Title);
            }
            else
            {
                mrsCategory[0].Current = gpiHandler.InsertInjectedGames(gpiCategory, mrsCategory[0].Current);
                games = mrsCategory.Union(gpiCategory).GroupBy(x => x.Title);
            }
        }
        else
        {
            games = _currencySupported ? plsCategory.Union(mrsCategory).GroupBy(x => x.Title) : mrsCategory.GroupBy(x => x.Title);
        }

        var sbGames = new StringBuilder();

        foreach (var category in games)
        {
            sbGames.AppendFormat("<div data-role='collapsible' data-collapsed='false' data-theme='b' data-content-theme='a' data-mini='true'><h4>{0}</h4>", category.Key);

            sbGames.AppendFormat("<div id='div{0}' class='div-product'><div><ul>", category.Key);

            foreach (var item in category)
            {
                AddGames(sbGames, item.New);

                AddGames(sbGames, item.Current);
            }

            sbGames.Append("</ul></div></div></div>");
        }

        divContainer.InnerHtml = Convert.ToString(sbGames);
    }