public async void LoadData<T>(WhereClip where,OrderByClip order) where T : Entity, new() { try { cmd.ShowOpaqueLayer(this.GridViewCellPhone, 125, true); int perpage = pagerControl1.PageSize; int page = pagerControl1.PageIndex; List<T> result = await Task.Run(() => OrmHelper.GetData<T>(perpage, page, where, order)); GridViewCellPhone.DataSource = result; int count = await Task.Run(() => OrmHelper.GetDataCount<T>(where)); this.pagerControl1.DrawControl(count); } finally { cmd.HideOpaqueLayer(); } }