private async void GetSoftwares() { using (var client = new SoftwaresClient(GlobalProperties.BaseUrl)) { var softwares = await client.GetSoftwares(); foreach (var item in softwares) { var tr = new TableRow(); tr.Cells.Add(new TableCell() { Text = item.Id.ToString() }); tr.Cells.Add(new TableCell() { Text = item.ManufacturerName }); tr.Cells.Add(new TableCell() { Text = item.Name }); tr.Cells.Add(new TableCell() { Text = item.GenreName }); tr.Cells.Add(CreateLinks(item)); tblSoftwares.Rows.Add(tr); } } }
private async Task GetSoftwareDetails(int id) { if (Session["Token"] == null) { Session["IsLoggedIn"] = false; Response.Redirect("~/Default.aspx"); } using (var client = new SoftwaresClient(GlobalProperties.BaseUrl, (TokenModel)Session["Token"])) { _software = await client.GetSoftware(id); } if (_software == null) { return; } lblSoftwareTitle.Text = _software.ToString(); }