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!