public static async Task <ReplyListString> Get20TopHighestCashInGame() { string newUrl = url + "Get20TopHighestCashInGame"; ReplyListString ans = await GetListString(newUrl); return(ans); }
public static async Task <ReplyListString> Get20TopTotalGrossProfit() { string newUrl = url + "Get20TopTotalGrossProfit"; ReplyListString ans = await GetListString(newUrl); return(ans); }
public static async Task <ReplyListString> Get20TopAmountOfGames() { string newUrl = url + "Get20TopAmountOfGames"; ReplyListString ans = await GetListString(newUrl); return(ans); }
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; } }