public static async Task <List <Religion> > LoadSecond(string firstName) { List <Religion> usreligions = null; await Task.Run(() => { //Take 20 sec to retrive from DB usreligions = ReligionManager.GetAllAsync(); }); return(usreligions); }
public async Task <List <Religion> > GetReligionAsync() { List <Religion> religions = null; await Task.Run(() => { religions = ReligionManager.GetAllAsync(); lblfour.Text = "Complete Four"; lblfour.ForeColor = Color.Purple; }); return(religions); }
private void LoadReligion() { try { List <Religion> list = ReligionManager.GetAll(); if (list != null && list.Count > 0) { gvReligion.DataSource = list; gvReligion.DataBind(); } } catch (Exception ex) { lblMessage.Text = ex.Message; } }
public static List <Religion> LoadFour(string firstName) { List <Religion> users = ReligionManager.GetAllAsync(); return(users); }