Пример #1
0
        private void LoadData(string TenIDOverride = "0")
        {
            var ds = new DataSet();

            var dt = new DataTable();

            var aTenID = (TenIDOverride == "0" ? TenID.SelectedValue : TenIDOverride);

            Session["ATENID"] = aTenID;
            if (aTenID != "0")
            {
                dt = SRPUser.FetchAllAsDataTable(int.Parse(aTenID));
            }

            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();
        }
Пример #2
0
        private void LoadData()
        {
            var ds = new DataSet();
            var dt = SRPUser.FetchAllAsDataTable();

            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();
        }