Exemplo n.º 1
0
    public static async Task <ReplyListString> Get20TopHighestCashInGame()
    {
        string          newUrl = url + "Get20TopHighestCashInGame";
        ReplyListString ans    = await GetListString(newUrl);

        return(ans);
    }
Exemplo n.º 2
0
    public static async Task <ReplyListString> Get20TopTotalGrossProfit()
    {
        string          newUrl = url + "Get20TopTotalGrossProfit";
        ReplyListString ans    = await GetListString(newUrl);

        return(ans);
    }
Exemplo n.º 3
0
    public static async Task <ReplyListString> Get20TopAmountOfGames()
    {
        string          newUrl = url + "Get20TopAmountOfGames";
        ReplyListString ans    = await GetListString(newUrl);

        return(ans);
    }
Exemplo n.º 4
0
        protected async void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            ReplyListString res;

            if (DropDownList1.SelectedItem.Text.Equals("Gross profit"))
            {
                res = await Client.Get20TopTotalGrossProfit();
            }
            else if (DropDownList1.SelectedItem.Text.Equals("Higest cash per game"))
            {
                res = await Client.Get20TopHighestCashInGame();
            }
            else if (DropDownList1.SelectedItem.Text.Equals("Number of games played"))
            {
                res = await Client.Get20TopAmountOfGames();
            }
            else
            {
                res = new ReplyListString(false, null, null);
            }
            if (res.Sucsses)
            {
                DataListLeader.Visible = true;
                JavaScriptSerializer serializer = new JavaScriptSerializer();
                List <string>        todes      = res.ListStringContent;
                foreach (string s in todes)
                {
                    leader.Add(serializer.Deserialize <PlayerLeader>(s));
                }
                DataListLeader.DataBind();
            }
            else
            {
                DataListLeader.Visible = false;
            }
        }