void fillBussinessUnit()
{
HttpResponseMessage response = client.GetAsync("api/BusinessUnit").Result; // Blocking call!
if (response.IsSuccessStatusCode)
{
var result = response.Content.ReadAsAsync<IEnumerable<GEN_BUSINESS_UNIT>>().Result;
ddlBussinessUnit.DataSource = result.ToList();
ddlBussinessUnit.DataValueField = "CODE";
ddlBussinessUnit.DataTextField = "DESC_ENG";
ddlBussinessUnit.DataBind();
}
else
{
}
}
{
HttpResponseMessage response = client.GetAsync("api/BusinessUnit").Result; // Blocking call!
if (response.IsSuccessStatusCode)
{
var result = response.Content.ReadAsAsync<IEnumerable<GEN_BUSINESS_UNIT>>().Result;
ddlBussinessUnit.DataSource = result.ToList();
ddlBussinessUnit.DataValueField = "CODE";
ddlBussinessUnit.DataTextField = "DESC_ENG";
ddlBussinessUnit.DataBind();
}
else
{
}
}