How could I just show orders from one Manufacturer on the Administration Orders Page?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
This is what I have so far, but it doesn't seem to be working at all.
Any ideas folks?


             OrderCollection orders = OrderManager.SearchOrders(startDate, endDate, txtCustomerEmail.Text, orderStatus, paymentStatus, shippingStatus);
            Manufacturer manufactuer = ManufacturerManager.GetManufacturerByID(manufacturerID);
            int totalRecords = 0;

            ProductCollection products = ProductManager.GetAllProducts(0, manufacturerID, null,
                null, null, null, false, int.MaxValue, 0, null, out totalRecords);

            OrderCollection designerOrders = new OrderCollection();

            try
            {
                foreach (Order order in orders)
                {
                    bool includesManufacturer = false;
                    OrderProductVariantCollection orderProductVariants = order.OrderProductVariants;
                    foreach (OrderProductVariant orderProductVariant in orderProductVariants)
                    {
                        Product product = orderProductVariant.ProductVariant.Product;
                        if (products.Contains(product))
                        {
                            includesManufacturer = true;
                        }

                    }
                    if (includesManufacturer)
                        designerOrders.Add(order);
                }
            }
            catch
            {
            }

            return designerOrders;


Thanks!
13 years ago
I know it's rather dated, but this is still an issue. Anyone have an idea yet?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.