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

            StoreStatusFilter StoreStatusFilter = new StoreStatusFilter();

            StoreStatusFilter.Skip      = 0;
            StoreStatusFilter.Take      = 20;
            StoreStatusFilter.OrderBy   = StoreStatusOrder.Id;
            StoreStatusFilter.OrderType = OrderType.ASC;
            StoreStatusFilter.Selects   = StoreStatusSelect.ALL;
            StoreStatusFilter.Id        = DirectSalesOrder_StoreStatusFilterDTO.Id;
            StoreStatusFilter.Code      = DirectSalesOrder_StoreStatusFilterDTO.Code;
            StoreStatusFilter.Name      = DirectSalesOrder_StoreStatusFilterDTO.Name;

            List <StoreStatus> StoreStatuses = await StoreStatusService.List(StoreStatusFilter);

            List <DirectSalesOrder_StoreStatusDTO> DirectSalesOrder_StoreStatusDTOs = StoreStatuses
                                                                                      .Select(x => new DirectSalesOrder_StoreStatusDTO(x)).ToList();

            return(DirectSalesOrder_StoreStatusDTOs);
        }
コード例 #2
0
        public async Task <List <Store_StoreStatusDTO> > SingleListStoreStatus([FromBody] Store_StoreStatusFilterDTO Store_StoreStatusFilterDTO)
        {
            if (!ModelState.IsValid)
            {
                throw new BindException(ModelState);
            }

            StoreStatusFilter StoreStatusFilter = new StoreStatusFilter();

            StoreStatusFilter.Skip      = 0;
            StoreStatusFilter.Take      = int.MaxValue;
            StoreStatusFilter.Take      = 20;
            StoreStatusFilter.OrderBy   = StoreStatusOrder.Id;
            StoreStatusFilter.OrderType = OrderType.ASC;
            StoreStatusFilter.Selects   = StoreStatusSelect.ALL;

            List <StoreStatus> StoreStatuses = await StoreStatusService.List(StoreStatusFilter);

            List <Store_StoreStatusDTO> Store_StoreStatusDTOs = StoreStatuses
                                                                .Select(x => new Store_StoreStatusDTO(x)).ToList();

            return(Store_StoreStatusDTOs);
        }