コード例 #1
0
        public async Task <ActionResult <List <DirectSalesOrder_RequestStateDTO> > > FilterListRequestState([FromBody] DirectSalesOrder_RequestStateFilterDTO DirectSalesOrder_RequestStateFilterDTO)
        {
            if (UnAuthorization)
            {
                return(Forbid());
            }
            if (!ModelState.IsValid)
            {
                throw new BindException(ModelState);
            }

            RequestStateFilter RequestStateFilter = new RequestStateFilter();

            RequestStateFilter.Skip      = 0;
            RequestStateFilter.Take      = 20;
            RequestStateFilter.OrderBy   = RequestStateOrder.Id;
            RequestStateFilter.OrderType = OrderType.ASC;
            RequestStateFilter.Selects   = RequestStateSelect.ALL;
            RequestStateFilter.Id        = DirectSalesOrder_RequestStateFilterDTO.Id;
            RequestStateFilter.Code      = DirectSalesOrder_RequestStateFilterDTO.Code;
            RequestStateFilter.Name      = DirectSalesOrder_RequestStateFilterDTO.Name;

            List <RequestState> RequestStatees = await RequestStateService.List(RequestStateFilter);

            List <DirectSalesOrder_RequestStateDTO> DirectSalesOrder_RequestStateDTOs = RequestStatees
                                                                                        .Select(x => new DirectSalesOrder_RequestStateDTO(x)).ToList();

            return(DirectSalesOrder_RequestStateDTOs);
        }
コード例 #2
0
        public async Task <List <Role_RequestStateDTO> > SingleListRequestState()
        {
            RequestStateFilter RequestStateFilter = new RequestStateFilter();

            RequestStateFilter.Skip      = 0;
            RequestStateFilter.Take      = 20;
            RequestStateFilter.OrderBy   = RequestStateOrder.Id;
            RequestStateFilter.OrderType = OrderType.ASC;
            RequestStateFilter.Selects   = RequestStateSelect.ALL;

            List <RequestState> RequestStatees = await RequestStateService.List(RequestStateFilter);

            List <Role_RequestStateDTO> Role_RequestStateDTOs = RequestStatees
                                                                .Select(x => new Role_RequestStateDTO(x)).ToList();

            return(Role_RequestStateDTOs);
        }