GetSortDirection() public static method

public static GetSortDirection ( StateBag viewState ) : SortDirection,
viewState StateBag
return SortDirection,
Beispiel #1
0
        protected void CarsGridView_Sorting(object sender, GridViewSortEventArgs e)
        {
            SortDirection sortDirection = SortingUtility.GetSortDirection(ViewState);

            ViewState[CarServiceConstants.SORT_DIRECTION_VIEW_STATE_ATTR]  = sortDirection;
            ViewState[CarServiceConstants.SORT_EXPRESSION_VIEW_STATE_ATTR] = e.SortExpression;
            IQueryable <Automobile> automobiles       = this.persister.GetAutomobiles();
            IQueryable <Automobile> sortedAutomobiles = SortingUtility.SortAutomobiles(automobiles, e.SortExpression, sortDirection);

            BindAutomobilesGrid(sortedAutomobiles);
        }
Beispiel #2
0
        protected void SparePartsGridView_Sorting(object sender, GridViewSortEventArgs e)
        {
            SortDirection sortDirection = SortingUtility.GetSortDirection(ViewState);

            ViewState[CarServiceConstants.SORT_DIRECTION_VIEW_STATE_ATTR]  = sortDirection;
            ViewState[CarServiceConstants.SORT_EXPRESSION_VIEW_STATE_ATTR] = e.SortExpression;
            IQueryable <SparePart> spareParts       = this.persister.GetSpareParts();
            IQueryable <SparePart> sortedSpareParts = SortingUtility.SortSpareParts(spareParts, e.SortExpression, sortDirection);

            BindSparePartsGrid(sortedSpareParts);
        }
Beispiel #3
0
        protected void UsersGridView_Sorting(object sender, GridViewSortEventArgs e)
        {
            SortDirection sortDirection = SortingUtility.GetSortDirection(ViewState);

            ViewState[CarServiceConstants.SORT_DIRECTION_VIEW_STATE_ATTR]  = sortDirection;
            ViewState[CarServiceConstants.SORT_EXPRESSION_VIEW_STATE_ATTR] = e.SortExpression;
            List <CarServiceUser>        users       = GetUsers();
            IEnumerable <CarServiceUser> sortedUsers = SortingUtility.SortUsers(users, e.SortExpression, sortDirection);

            BindUsersGrid(sortedUsers);
        }