private void LoadData() { var ds = new DataSet(); DataTable dt = null; if ((bool)CRIsMasterTenant) { dt = SRPUser.GetLogedInNowAll(); } else { dt = SRPUser.GetLogedInNow((int)CRTenantID); } ds.Tables.Add(dt); if (!string.IsNullOrEmpty(_mStrSortExp)) { dt.DefaultView.Sort = _mStrSortExp + (_mSortDirection == SortDirection.Descending ? " DESC" : ""); var ds2 = new DataSet(); ds2.Tables.Add(dt.DefaultView.ToTable()); ds = ds2; } gv.DataSource = ds; gv.DataBind(); }
private void LoadData() { var ds = new DataSet(); var dt = SRPUser.GetLogedInNow(); ds.Tables.Add(dt); if (_mStrSortExp != "") { dt.DefaultView.Sort = _mStrSortExp + (_mSortDirection == SortDirection.Descending ? " DESC" : ""); var ds2 = new DataSet(); ds2.Tables.Add(dt.DefaultView.ToTable()); ds = ds2; } gv.DataSource = ds; gv.DataBind(); }