private void getAll()
        {
            string sortField     = GridDpt.SortField;
            string sortDirection = GridDpt.SortDirection;

            GridDpt.RecordCount = BLLGET.GetRecordCount(" dptId<>10000 ");

            DataView view = BLLGET.GetListByPage(" dptId<>10000 ", " dptId asc ", GridDpt.PageIndex * GridDpt.PageSize, (GridDpt.PageIndex + 1) * GridDpt.PageSize).Tables[0].DefaultView;

            view.Sort          = String.Format("{0} {1}", sortField, sortDirection);
            GridDpt.DataSource = view.ToTable();
        }
Ejemplo n.º 2
0
        protected void LoadData()
        {
            Maticsoft.BLL.tDepartMent BLL = new Maticsoft.BLL.tDepartMent();
            string sortField     = GridDpt.SortField;
            string sortDirection = GridDpt.SortDirection;

            if (TreeDpt.SelectedNode == null)
            {
                GridDpt.RecordCount = BLL.GetRecordCount(" dptId<>10000 ");

                DataView view = BLL.GetListByPage(" dptId<>10000 ", " dptId asc ", GridDpt.PageIndex * GridDpt.PageSize, (GridDpt.PageIndex + 1) * GridDpt.PageSize).Tables[0].DefaultView;
                view.Sort          = String.Format("{0} {1}", sortField, sortDirection);
                GridDpt.DataSource = view.ToTable();
            }
            else
            {
                string NodeId = TreeDpt.SelectedNodeID;
                GridDpt.RecordCount = BLL.GetRecordCount(" dptFatherId=" + NodeId);
                DataView view = BLL.GetListByPage(" dptFatherId=" + NodeId, " dptId asc ", GridDpt.PageIndex * GridDpt.PageSize, (GridDpt.PageIndex + 1) * GridDpt.PageSize).Tables[0].DefaultView;
                view.Sort          = String.Format("{0} {1}", sortField, sortDirection);
                GridDpt.DataSource = view.ToTable();
            }
            GridDpt.DataBind();
        }