IdenticalProductList(ProductLinksController controller, int[] product1_ids, int company2_id, Cliver.ProductIdentifier.Engine engine) { Product1Ids = (from x in product1_ids where controller.db.Products.Where(p => p.Id == x).First().CompanyId != company2_id select x).ToArray(); Company2Id = company2_id; this.engine = engine; product_links = engine.CreateProductLinkList(Product1Ids, Company2Id); }
public static void SaveLink(ProductLinksController controller, int[] product_ids) { Cliver.ProductIdentifier.Engine engine; IdenticalProductList ipl = get_from_session(controller, null, 0); if (ipl == null) { engine = new Cliver.ProductIdentifier.Engine(true); } else { engine = ipl.engine; } engine.SaveLink(product_ids); }