| | | 1 | | using OzonDomains.Models; |
| | | 2 | | using Services.FiltersServices.SortModels; |
| | | 3 | | |
| | | 4 | | namespace Services.FiltersServices.SortManagers |
| | | 5 | | { |
| | | 6 | | public class OrderSortManager |
| | | 7 | | { |
| | | 8 | | public IQueryable<Order> ApplySortOrderQueryable(IQueryable<Order> ordersQuery, OrderSortState sortOrder) |
| | | 9 | | { |
| | 131 | 10 | | return sortOrder switch |
| | 131 | 11 | | { |
| | 2 | 12 | | OrderSortState.ShipmentNumberAsc => ordersQuery.OrderBy(o => o.ShipmentNumber), |
| | 2 | 13 | | OrderSortState.ShipmentNumberDesc => ordersQuery.OrderByDescending(o => o.ShipmentNumber), |
| | 131 | 14 | | |
| | 2 | 15 | | OrderSortState.ProcessingDateAsc => ordersQuery.OrderBy(o => o.ProcessingDate), |
| | 1 | 16 | | OrderSortState.ProcessingDateDesc => ordersQuery.OrderByDescending(o => o.ProcessingDate), |
| | 131 | 17 | | |
| | 2 | 18 | | OrderSortState.ShippingDateAsc => ordersQuery.OrderBy(o => o.ShippingDate), |
| | 2 | 19 | | OrderSortState.ShippingDateDesc => ordersQuery.OrderByDescending(o => o.ShippingDate), |
| | 131 | 20 | | |
| | 2 | 21 | | OrderSortState.StatusAsc => ordersQuery.OrderBy(o => o.ClientStatus != null ? o.ClientStatus.Name : null |
| | 2 | 22 | | OrderSortState.StatusDesc => ordersQuery.OrderByDescending(o => o.ClientStatus != null ? o.ClientStatus. |
| | 131 | 23 | | |
| | 2 | 24 | | OrderSortState.AppStatusIdAsc => ordersQuery.OrderBy(o => o.AppStatus != null ? o.AppStatus.Name : null) |
| | 2 | 25 | | OrderSortState.AppStatusIdDesc => ordersQuery.OrderByDescending(o => o.AppStatus != null ? o.AppStatus.N |
| | 131 | 26 | | |
| | 2 | 27 | | OrderSortState.ShipmentAmountAsc => ordersQuery.OrderBy(o => o.ShipmentAmount), |
| | 2 | 28 | | OrderSortState.ShipmentAmountDesc => ordersQuery.OrderByDescending(o => o.ShipmentAmount), |
| | 131 | 29 | | |
| | 2 | 30 | | OrderSortState.ProductNameAsc => ordersQuery.OrderBy(o => o.ProductName), |
| | 2 | 31 | | OrderSortState.ProductNameDesc => ordersQuery.OrderByDescending(o => o.ProductName), |
| | 131 | 32 | | |
| | 2 | 33 | | OrderSortState.ArticleAsc => ordersQuery.OrderBy(o => o.ProductKey), |
| | 2 | 34 | | OrderSortState.ArticleDesc => ordersQuery.OrderByDescending(o => o.ProductKey), |
| | 131 | 35 | | |
| | 2 | 36 | | OrderSortState.PriceAsc => ordersQuery.OrderBy(o => o.Price), |
| | 2 | 37 | | OrderSortState.PriceDesc => ordersQuery.OrderByDescending(o => o.Price), |
| | 131 | 38 | | |
| | 2 | 39 | | OrderSortState.QuantityAsc => ordersQuery.OrderBy(o => o.Quantity), |
| | 2 | 40 | | OrderSortState.QuantityDesc => ordersQuery.OrderByDescending(o => o.Quantity), |
| | 131 | 41 | | |
| | 2 | 42 | | OrderSortState.ShipmentWarehouseIdAsc => ordersQuery.OrderBy(o => o.ShipmentWarehouse != null ? o.Shipme |
| | 2 | 43 | | OrderSortState.ShipmentWarehouseIdDesc => ordersQuery.OrderByDescending(o => o.ShipmentWarehouse != null |
| | 131 | 44 | | |
| | 2 | 45 | | OrderSortState.СurrencyIdAsc => ordersQuery.OrderBy(o => o.Сurrency != null ? o.Сurrency.Name : null), |
| | 2 | 46 | | OrderSortState.СurrencyIdDesc => ordersQuery.OrderByDescending(o => o.Сurrency != null ? o.Сurrency.Name |
| | 131 | 47 | | |
| | 2 | 48 | | OrderSortState.SupplierAsc => ordersQuery.OrderBy(o => o.Supplier != null ? o.Supplier.Name : null), |
| | 2 | 49 | | OrderSortState.SupplierDesc => ordersQuery.OrderByDescending(o => o.Supplier != null ? o.Supplier.Name : |
| | 131 | 50 | | |
| | 2 | 51 | | OrderSortState.PurchasePriceAsc => ordersQuery.OrderBy(o => o.PurchasePrice), |
| | 2 | 52 | | OrderSortState.PurchasePriceDesc => ordersQuery.OrderByDescending(o => o.PurchasePrice), |
| | 131 | 53 | | |
| | 2 | 54 | | OrderSortState.ProductInfoIdAsc => ordersQuery.OrderBy(o => o.ProductInfoId), |
| | 2 | 55 | | OrderSortState.ProductInfoIdDesc => ordersQuery.OrderByDescending(o => o.ProductInfoId), |
| | 131 | 56 | | |
| | 2 | 57 | | OrderSortState.MinOzonCommissionAsc => ordersQuery.OrderBy(o => o.MinOzonCommission), |
| | 2 | 58 | | OrderSortState.MinOzonCommissionDesc => ordersQuery.OrderByDescending(o => o.MinOzonCommission), |
| | 131 | 59 | | |
| | 2 | 60 | | OrderSortState.MaxOzonCommissionAsc => ordersQuery.OrderBy(o => o.MaxOzonCommission), |
| | 2 | 61 | | OrderSortState.MaxOzonCommissionDesc => ordersQuery.OrderByDescending(o => o.MaxOzonCommission), |
| | 131 | 62 | | |
| | 2 | 63 | | OrderSortState.ProfitAsc => ordersQuery.OrderBy(o => o.MinProfit), |
| | 2 | 64 | | OrderSortState.ProfitDesc => ordersQuery.OrderByDescending(o => o.MinProfit), |
| | 131 | 65 | | |
| | 2 | 66 | | OrderSortState.CurrentPriceAsc => ordersQuery.OrderBy(o => o.ProductInfo != null ? o.ProductInfo.Current |
| | 2 | 67 | | OrderSortState.CurrentPriceDesc => ordersQuery.OrderByDescending(o => o.ProductInfo != null ? o.ProductI |
| | 131 | 68 | | |
| | 2 | 69 | | OrderSortState.VolumeAsc => ordersQuery.OrderBy(o => o.ProductInfo != null ? o.ProductInfo.VolumetricWei |
| | 2 | 70 | | OrderSortState.VolumeDesc => ordersQuery.OrderByDescending(o => o.ProductInfo != null ? o.ProductInfo.Vo |
| | 131 | 71 | | |
| | 2 | 72 | | OrderSortState.DiscountAsc => ordersQuery.OrderBy(o => o.MinDiscount), |
| | 2 | 73 | | OrderSortState.DiscountDesc => ordersQuery.OrderByDescending(o => o.MinDiscount), |
| | 131 | 74 | | |
| | 2 | 75 | | OrderSortState.DeliveryCityAsc => ordersQuery.OrderBy(o => o.DeliveryCity), |
| | 2 | 76 | | OrderSortState.DeliveryCityDesc => ordersQuery.OrderByDescending(o => o.DeliveryCity), |
| | 131 | 77 | | |
| | 2 | 78 | | OrderSortState.CategoryAsc => ordersQuery.OrderBy(o => o.NewCategory), |
| | 2 | 79 | | OrderSortState.CategoryDesc => ordersQuery.OrderByDescending(o => o.NewCategory), |
| | 131 | 80 | | |
| | 2 | 81 | | OrderSortState.OrderNumberToSupplierAsc => ordersQuery.OrderBy(o => o.OrderNumberToSupplier), |
| | 2 | 82 | | OrderSortState.OrderNumberToSupplierDesc => ordersQuery.OrderByDescending(o => o.OrderNumberToSupplier), |
| | 0 | 83 | | OrderSortState.ScanitAsc => ordersQuery.OrderBy(o => o.Scanit), |
| | 0 | 84 | | OrderSortState.ScanitDesc => ordersQuery.OrderByDescending(o => o.Scanit), |
| | 131 | 85 | | |
| | 2 | 86 | | OrderSortState.OzonClientAsc => ordersQuery.OrderBy(o => o.OzonClient != null ? o.OzonClient.Name : null |
| | 2 | 87 | | OrderSortState.OzonClientDesc => ordersQuery.OrderByDescending(o => o.OzonClient != null ? o.OzonClient. |
| | 131 | 88 | | |
| | 2 | 89 | | OrderSortState.ManufacturerAsc => ordersQuery |
| | 2 | 90 | | .OrderBy(o => o.EtProducer != null ? o.EtProducer.Name : null) |
| | 2 | 91 | | .ThenBy(o => o.ProductKey), |
| | 2 | 92 | | OrderSortState.ManufacturerDesc => ordersQuery |
| | 2 | 93 | | .OrderByDescending(o => o.EtProducer != null ? o.EtProducer.Name : null) |
| | 2 | 94 | | .ThenBy(o => o.ProductKey), |
| | 131 | 95 | | |
| | 2 | 96 | | OrderSortState.FromFileAsc => ordersQuery.OrderBy(o => o.FromFile), |
| | 2 | 97 | | OrderSortState.FromFileDesc => ordersQuery.OrderByDescending(o => o.FromFile), |
| | 131 | 98 | | |
| | 2 | 99 | | OrderSortState.DeliveryPeriodAsc => ordersQuery.OrderBy(o => o.DeliveryPeriod), |
| | 2 | 100 | | OrderSortState.DeliveryPeriodDesc => ordersQuery.OrderByDescending(o => o.DeliveryPeriod), |
| | 131 | 101 | | |
| | 2 | 102 | | OrderSortState.CostPriceAsc => ordersQuery.OrderBy(o => o.CostPrice), |
| | 2 | 103 | | OrderSortState.CostPriceDesc => ordersQuery.OrderByDescending(o => o.CostPrice), |
| | 131 | 104 | | |
| | 2 | 105 | | OrderSortState.TimeLeftAsc => ordersQuery.OrderBy(o => o.ShippingDate), |
| | 2 | 106 | | OrderSortState.TimeLeftDesc => ordersQuery.OrderByDescending(o => o.ShippingDate), |
| | 131 | 107 | | |
| | 2 | 108 | | OrderSortState.LastStatusChangeDateAsc => ordersQuery.OrderBy(o => o.LastStatusChangeDate), |
| | 2 | 109 | | OrderSortState.LastStatusChangeDateDesc => ordersQuery.OrderByDescending(o => o.LastStatusChangeDate), |
| | 131 | 110 | | |
| | 2 | 111 | | OrderSortState.DeliveryAsc => ordersQuery.OrderBy(o => o.Delivery != null && o.Delivery.Provider != null |
| | 2 | 112 | | OrderSortState.DeliveryDesc => ordersQuery.OrderByDescending(o => o.Delivery != null && o.Delivery.Provi |
| | 131 | 113 | | |
| | 4 | 114 | | _ => ordersQuery.OrderByDescending(o => o.ProcessingDate) |
| | 131 | 115 | | }; |
| | | 116 | | } |
| | | 117 | | |
| | | 118 | | public IEnumerable<Order> ApplySortOrder(IEnumerable<Order> orders, OrderSortState sortOrder) |
| | | 119 | | { |
| | 131 | 120 | | return sortOrder switch |
| | 131 | 121 | | { |
| | 7 | 122 | | OrderSortState.ShipmentNumberAsc => orders.OrderBy(o => o.ShipmentNumber), |
| | 7 | 123 | | OrderSortState.ShipmentNumberDesc => orders.OrderByDescending(o => o.ShipmentNumber), |
| | 131 | 124 | | |
| | 7 | 125 | | OrderSortState.ProcessingDateAsc => orders.OrderBy(o => o.ProcessingDate), |
| | 7 | 126 | | OrderSortState.ProcessingDateDesc => orders.OrderByDescending(o => o.ProcessingDate), |
| | 131 | 127 | | |
| | 7 | 128 | | OrderSortState.ShippingDateAsc => orders.OrderBy(o => o.ShippingDate), |
| | 7 | 129 | | OrderSortState.ShippingDateDesc => orders.OrderByDescending(o => o.ShippingDate), |
| | 131 | 130 | | |
| | 8 | 131 | | OrderSortState.StatusAsc => orders.OrderBy(o => o.ClientStatus?.Name), |
| | 8 | 132 | | OrderSortState.StatusDesc => orders.OrderByDescending(o => o.ClientStatus?.Name), |
| | 131 | 133 | | |
| | 7 | 134 | | OrderSortState.AppStatusIdAsc => orders.OrderBy(o => o.AppStatus?.Name), |
| | 7 | 135 | | OrderSortState.AppStatusIdDesc => orders.OrderByDescending(o => o.AppStatus?.Name), |
| | 131 | 136 | | |
| | 7 | 137 | | OrderSortState.ShipmentAmountAsc => orders.OrderBy(o => o.ShipmentAmount), |
| | 7 | 138 | | OrderSortState.ShipmentAmountDesc => orders.OrderByDescending(o => o.ShipmentAmount), |
| | 131 | 139 | | |
| | 7 | 140 | | OrderSortState.ProductNameAsc => orders.OrderBy(o => o.ProductName), |
| | 7 | 141 | | OrderSortState.ProductNameDesc => orders.OrderByDescending(o => o.ProductName), |
| | 131 | 142 | | |
| | 7 | 143 | | OrderSortState.ArticleAsc => orders.OrderBy(o => o.ProductKey), |
| | 7 | 144 | | OrderSortState.ArticleDesc => orders.OrderByDescending(o => o.ProductKey), |
| | 131 | 145 | | |
| | 7 | 146 | | OrderSortState.PriceAsc => orders.OrderBy(o => o.Price), |
| | 7 | 147 | | OrderSortState.PriceDesc => orders.OrderByDescending(o => o.Price), |
| | 131 | 148 | | |
| | 7 | 149 | | OrderSortState.QuantityAsc => orders.OrderBy(o => o.Quantity), |
| | 7 | 150 | | OrderSortState.QuantityDesc => orders.OrderByDescending(o => o.Quantity), |
| | 131 | 151 | | |
| | 7 | 152 | | OrderSortState.ShipmentWarehouseIdAsc => orders.OrderBy(o => o.ShipmentWarehouse?.Name), |
| | 7 | 153 | | OrderSortState.ShipmentWarehouseIdDesc => orders.OrderByDescending(o => o.ShipmentWarehouse?.Name), |
| | 131 | 154 | | |
| | 7 | 155 | | OrderSortState.СurrencyIdAsc => orders.OrderBy(o => o.Сurrency?.Name), |
| | 7 | 156 | | OrderSortState.СurrencyIdDesc => orders.OrderByDescending(o => o.Сurrency?.Name), |
| | 131 | 157 | | |
| | 7 | 158 | | OrderSortState.SupplierAsc => orders.OrderBy(o => o.Supplier?.Name), |
| | 7 | 159 | | OrderSortState.SupplierDesc => orders.OrderByDescending(o => o.Supplier?.Name), |
| | 131 | 160 | | |
| | 7 | 161 | | OrderSortState.PurchasePriceAsc => orders.OrderBy(o => o.PurchasePrice), |
| | 7 | 162 | | OrderSortState.PurchasePriceDesc => orders.OrderByDescending(o => o.PurchasePrice), |
| | 131 | 163 | | |
| | 7 | 164 | | OrderSortState.ProductInfoIdAsc => orders.OrderBy(o => o.ProductInfoId), |
| | 7 | 165 | | OrderSortState.ProductInfoIdDesc => orders.OrderByDescending(o => o.ProductInfoId), |
| | 131 | 166 | | |
| | 7 | 167 | | OrderSortState.MinOzonCommissionAsc => orders.OrderBy(o => o.MinOzonCommission), |
| | 7 | 168 | | OrderSortState.MinOzonCommissionDesc => orders.OrderByDescending(o => o.MinOzonCommission), |
| | 131 | 169 | | |
| | 7 | 170 | | OrderSortState.MaxOzonCommissionAsc => orders.OrderBy(o => o.MaxOzonCommission), |
| | 7 | 171 | | OrderSortState.MaxOzonCommissionDesc => orders.OrderByDescending(o => o.MaxOzonCommission), |
| | 131 | 172 | | |
| | 8 | 173 | | OrderSortState.ProfitAsc => orders.OrderBy(o => o.MinProfit), |
| | 8 | 174 | | OrderSortState.ProfitDesc => orders.OrderByDescending(o => o.MinProfit), |
| | 131 | 175 | | |
| | 7 | 176 | | OrderSortState.CurrentPriceAsc => orders.OrderBy(o => o.ProductInfo?.CurrentPriceWithDiscount), |
| | 7 | 177 | | OrderSortState.CurrentPriceDesc => orders.OrderByDescending(o => o.ProductInfo?.CurrentPriceWithDiscount |
| | 131 | 178 | | |
| | 7 | 179 | | OrderSortState.VolumeAsc => orders.OrderBy(o => o.ProductInfo?.VolumetricWeight), |
| | 7 | 180 | | OrderSortState.VolumeDesc => orders.OrderByDescending(o => o.ProductInfo?.VolumetricWeight), |
| | 131 | 181 | | |
| | 7 | 182 | | OrderSortState.DiscountAsc => orders.OrderBy(o => o.MinDiscount), |
| | 7 | 183 | | OrderSortState.DiscountDesc => orders.OrderByDescending(o => o.MinDiscount), |
| | 131 | 184 | | |
| | 7 | 185 | | OrderSortState.DeliveryCityAsc => orders.OrderBy(o => o.DeliveryCity), |
| | 7 | 186 | | OrderSortState.DeliveryCityDesc => orders.OrderByDescending(o => o.DeliveryCity), |
| | 131 | 187 | | |
| | 7 | 188 | | OrderSortState.CategoryAsc => orders.OrderBy(o => o.NewCategory), |
| | 7 | 189 | | OrderSortState.CategoryDesc => orders.OrderByDescending(o => o.NewCategory), |
| | 131 | 190 | | |
| | 7 | 191 | | OrderSortState.OrderNumberToSupplierAsc => orders.OrderBy(o => o.OrderNumberToSupplier), |
| | 7 | 192 | | OrderSortState.OrderNumberToSupplierDesc => orders.OrderByDescending(o => o.OrderNumberToSupplier), |
| | 0 | 193 | | OrderSortState.ScanitAsc => orders.OrderBy(o => o.Scanit), |
| | 0 | 194 | | OrderSortState.ScanitDesc => orders.OrderByDescending(o => o.Scanit), |
| | 131 | 195 | | |
| | 7 | 196 | | OrderSortState.OzonClientAsc => orders.OrderBy(o => o.OzonClient?.Name ?? string.Empty), |
| | 7 | 197 | | OrderSortState.OzonClientDesc => orders.OrderByDescending(o => o.OzonClient?.Name ?? string.Empty), |
| | 131 | 198 | | |
| | 2 | 199 | | OrderSortState.ManufacturerAsc => orders |
| | 7 | 200 | | .OrderBy(o => o.EtProducer?.Name ?? string.Empty) |
| | 9 | 201 | | .ThenBy(o => o.ProductKey ?? string.Empty), |
| | 2 | 202 | | OrderSortState.ManufacturerDesc => orders |
| | 7 | 203 | | .OrderByDescending(o => o.EtProducer?.Name ?? string.Empty) |
| | 9 | 204 | | .ThenBy(o => o.ProductKey ?? string.Empty), |
| | 131 | 205 | | |
| | 7 | 206 | | OrderSortState.FromFileAsc => orders.OrderBy(o => o.FromFile), |
| | 7 | 207 | | OrderSortState.FromFileDesc => orders.OrderByDescending(o => o.FromFile), |
| | 131 | 208 | | |
| | 7 | 209 | | OrderSortState.DeliveryPeriodAsc => orders.OrderBy(x => x.DeliveryPeriodDay), |
| | 7 | 210 | | OrderSortState.DeliveryPeriodDesc => orders.OrderByDescending(x => x.DeliveryPeriodDay), |
| | 131 | 211 | | |
| | 7 | 212 | | OrderSortState.CostPriceAsc => orders.OrderBy(o => o.CostPrice), |
| | 7 | 213 | | OrderSortState.CostPriceDesc => orders.OrderByDescending(o => o.CostPrice), |
| | 131 | 214 | | |
| | 7 | 215 | | OrderSortState.TimeLeftAsc => orders.OrderBy(o => o.TimeLeftDay), |
| | 7 | 216 | | OrderSortState.TimeLeftDesc => orders.OrderByDescending(o => o.TimeLeftDay), |
| | 131 | 217 | | |
| | 7 | 218 | | OrderSortState.LastStatusChangeDateAsc => orders.OrderBy(o => o.LastStatusChangeDate), |
| | 7 | 219 | | OrderSortState.LastStatusChangeDateDesc => orders.OrderByDescending(o => o.LastStatusChangeDate), |
| | 131 | 220 | | |
| | 8 | 221 | | OrderSortState.DeliveryAsc => orders.OrderBy(o => o.Delivery?.Provider?.Name), |
| | 8 | 222 | | OrderSortState.DeliveryDesc => orders.OrderByDescending(o => o.Delivery?.Provider?.Name), |
| | 131 | 223 | | |
| | 13 | 224 | | _ => orders.OrderByDescending(o => o.ProcessingDate) |
| | 131 | 225 | | }; |
| | | 226 | | } |
| | | 227 | | |
| | | 228 | | public Dictionary<string, OrderSortState> GetSortOrderViewData(OrderSortState sortOrder) |
| | | 229 | | { |
| | 61 | 230 | | return new Dictionary<string, OrderSortState> |
| | 61 | 231 | | { |
| | 61 | 232 | | ["ShipmentNumberSort"] = sortOrder == OrderSortState.ShipmentNumberAsc |
| | 61 | 233 | | ? OrderSortState.ShipmentNumberDesc |
| | 61 | 234 | | : OrderSortState.ShipmentNumberAsc, |
| | 61 | 235 | | |
| | 61 | 236 | | ["ProcessingDateSort"] = sortOrder == OrderSortState.ProcessingDateAsc |
| | 61 | 237 | | ? OrderSortState.ProcessingDateDesc |
| | 61 | 238 | | : OrderSortState.ProcessingDateAsc, |
| | 61 | 239 | | |
| | 61 | 240 | | ["ShippingDateSort"] = sortOrder == OrderSortState.ShippingDateAsc |
| | 61 | 241 | | ? OrderSortState.ShippingDateDesc |
| | 61 | 242 | | : OrderSortState.ShippingDateAsc, |
| | 61 | 243 | | |
| | 61 | 244 | | ["StatusSort"] = sortOrder == OrderSortState.StatusAsc |
| | 61 | 245 | | ? OrderSortState.StatusDesc |
| | 61 | 246 | | : OrderSortState.StatusAsc, |
| | 61 | 247 | | |
| | 61 | 248 | | ["CurrentPriceSort"] = sortOrder == OrderSortState.CurrentPriceAsc |
| | 61 | 249 | | ? OrderSortState.CurrentPriceDesc |
| | 61 | 250 | | : OrderSortState.CurrentPriceAsc, |
| | 61 | 251 | | |
| | 61 | 252 | | ["AppStatusIdSort"] = sortOrder == OrderSortState.AppStatusIdAsc |
| | 61 | 253 | | ? OrderSortState.AppStatusIdDesc |
| | 61 | 254 | | : OrderSortState.AppStatusIdAsc, |
| | 61 | 255 | | |
| | 61 | 256 | | ["ShipmentAmountSort"] = sortOrder == OrderSortState.ShipmentAmountAsc |
| | 61 | 257 | | ? OrderSortState.ShipmentAmountDesc |
| | 61 | 258 | | : OrderSortState.ShipmentAmountAsc, |
| | 61 | 259 | | |
| | 61 | 260 | | ["ProductNameSort"] = sortOrder == OrderSortState.ProductNameAsc |
| | 61 | 261 | | ? OrderSortState.ProductNameDesc |
| | 61 | 262 | | : OrderSortState.ProductNameAsc, |
| | 61 | 263 | | |
| | 61 | 264 | | ["ArticleSort"] = sortOrder == OrderSortState.ArticleAsc |
| | 61 | 265 | | ? OrderSortState.ArticleDesc |
| | 61 | 266 | | : OrderSortState.ArticleAsc, |
| | 61 | 267 | | |
| | 61 | 268 | | ["PriceSort"] = sortOrder == OrderSortState.PriceAsc |
| | 61 | 269 | | ? OrderSortState.PriceDesc |
| | 61 | 270 | | : OrderSortState.PriceAsc, |
| | 61 | 271 | | |
| | 61 | 272 | | ["QuantitySort"] = sortOrder == OrderSortState.QuantityAsc |
| | 61 | 273 | | ? OrderSortState.QuantityDesc |
| | 61 | 274 | | : OrderSortState.QuantityAsc, |
| | 61 | 275 | | |
| | 61 | 276 | | ["ShipmentWarehouseSort"] = sortOrder == OrderSortState.ShipmentWarehouseIdAsc |
| | 61 | 277 | | ? OrderSortState.ShipmentWarehouseIdDesc |
| | 61 | 278 | | : OrderSortState.ShipmentWarehouseIdAsc, |
| | 61 | 279 | | |
| | 61 | 280 | | ["SupplierSort"] = sortOrder == OrderSortState.SupplierAsc |
| | 61 | 281 | | ? OrderSortState.SupplierDesc |
| | 61 | 282 | | : OrderSortState.SupplierAsc, |
| | 61 | 283 | | |
| | 61 | 284 | | ["PurchasePriceSort"] = sortOrder == OrderSortState.PurchasePriceAsc |
| | 61 | 285 | | ? OrderSortState.PurchasePriceDesc |
| | 61 | 286 | | : OrderSortState.PurchasePriceAsc, |
| | 61 | 287 | | |
| | 61 | 288 | | ["ProductInfoIdSort"] = sortOrder == OrderSortState.ProductInfoIdAsc |
| | 61 | 289 | | ? OrderSortState.ProductInfoIdDesc |
| | 61 | 290 | | : OrderSortState.ProductInfoIdAsc, |
| | 61 | 291 | | |
| | 61 | 292 | | ["OzonCommissionSort"] = sortOrder == OrderSortState.MinOzonCommissionAsc |
| | 61 | 293 | | ? OrderSortState.MinOzonCommissionDesc |
| | 61 | 294 | | : OrderSortState.MinOzonCommissionAsc, |
| | 61 | 295 | | |
| | 61 | 296 | | ["VolumeSort"] = sortOrder == OrderSortState.VolumeAsc |
| | 61 | 297 | | ? OrderSortState.VolumeDesc |
| | 61 | 298 | | : OrderSortState.VolumeAsc, |
| | 61 | 299 | | |
| | 61 | 300 | | ["ProfitSort"] = sortOrder == OrderSortState.ProfitAsc |
| | 61 | 301 | | ? OrderSortState.ProfitDesc |
| | 61 | 302 | | : OrderSortState.ProfitAsc, |
| | 61 | 303 | | |
| | 61 | 304 | | ["DiscountSort"] = sortOrder == OrderSortState.DiscountAsc |
| | 61 | 305 | | ? OrderSortState.DiscountDesc |
| | 61 | 306 | | : OrderSortState.DiscountAsc, |
| | 61 | 307 | | |
| | 61 | 308 | | ["DeliveryCitySort"] = sortOrder == OrderSortState.DeliveryCityAsc |
| | 61 | 309 | | ? OrderSortState.DeliveryCityDesc |
| | 61 | 310 | | : OrderSortState.DeliveryCityAsc, |
| | 61 | 311 | | |
| | 61 | 312 | | ["CategorySort"] = sortOrder == OrderSortState.CategoryAsc |
| | 61 | 313 | | ? OrderSortState.CategoryDesc |
| | 61 | 314 | | : OrderSortState.CategoryAsc, |
| | 61 | 315 | | |
| | 61 | 316 | | ["OrderNumberToSupplierSort"] = sortOrder == OrderSortState.OrderNumberToSupplierAsc |
| | 61 | 317 | | ? OrderSortState.OrderNumberToSupplierDesc |
| | 61 | 318 | | : OrderSortState.OrderNumberToSupplierAsc, |
| | 61 | 319 | | |
| | 61 | 320 | | ["OzonClient"] = sortOrder == OrderSortState.OzonClientAsc |
| | 61 | 321 | | ? OrderSortState.OzonClientDesc |
| | 61 | 322 | | : OrderSortState.OzonClientAsc, |
| | 61 | 323 | | |
| | 61 | 324 | | ["ManufacturerSort"] = sortOrder == OrderSortState.ManufacturerAsc |
| | 61 | 325 | | ? OrderSortState.ManufacturerDesc |
| | 61 | 326 | | : OrderSortState.ManufacturerAsc, |
| | 61 | 327 | | |
| | 61 | 328 | | ["FromFileSort"] = sortOrder == OrderSortState.FromFileAsc |
| | 61 | 329 | | ? OrderSortState.FromFileDesc |
| | 61 | 330 | | : OrderSortState.FromFileAsc, |
| | 61 | 331 | | |
| | 61 | 332 | | ["DeliveryPeriodSort"] = sortOrder == OrderSortState.DeliveryPeriodAsc |
| | 61 | 333 | | ? OrderSortState.DeliveryPeriodDesc |
| | 61 | 334 | | : OrderSortState.DeliveryPeriodAsc, |
| | 61 | 335 | | |
| | 61 | 336 | | ["CostPriceсеSort"] = sortOrder == OrderSortState.CostPriceAsc |
| | 61 | 337 | | ? OrderSortState.CostPriceDesc |
| | 61 | 338 | | : OrderSortState.CostPriceAsc, |
| | 61 | 339 | | |
| | 61 | 340 | | ["TimeLeftSort"] = sortOrder == OrderSortState.TimeLeftAsc |
| | 61 | 341 | | ? OrderSortState.TimeLeftDesc |
| | 61 | 342 | | : OrderSortState.TimeLeftAsc, |
| | 61 | 343 | | |
| | 61 | 344 | | ["LastStatusChangeDateSort"] = sortOrder == OrderSortState.LastStatusChangeDateAsc |
| | 61 | 345 | | ? OrderSortState.LastStatusChangeDateDesc |
| | 61 | 346 | | : OrderSortState.LastStatusChangeDateAsc, |
| | 61 | 347 | | |
| | 61 | 348 | | ["DeliverySort"] = sortOrder == OrderSortState.DeliveryAsc |
| | 61 | 349 | | ? OrderSortState.DeliveryDesc |
| | 61 | 350 | | : OrderSortState.DeliveryAsc |
| | 61 | 351 | | }; |
| | | 352 | | } |
| | | 353 | | } |
| | | 354 | | } |