GetSortDirection() public static méthode

public static GetSortDirection ( StateBag viewState ) : SortDirection,
viewState StateBag
Résultat SortDirection,
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }