protected Customer CreateCustomer(CustomerGroup customerGroup, string name, string code, Division division, Category category) { Customer customer = new Customer(); customer.ID = Guid.NewGuid(); customer.SalesEmployee = CreateSalesEmployee(division); customer.CustomerGroup = customerGroup; customer.AccountNumber = code; customer.Name = name; customer.IncludeInSystem = true; customer.Manual = false; CreateCustomerCategory(customer, category); return customer; }
protected CustomerCategory CreateCustomerCategory(Customer customer, Category category) { CustomerCategory cuCa = new CustomerCategory(); cuCa.ID = Guid.NewGuid(); cuCa.Customer = customer; cuCa.Category = category; return cuCa; }
protected AnimationProduct CreateAnimationProduct(Division division, Animation animation, int normalMultiple, int warehouseMultiple, Category category, BrandAxe brandAxe, ItemType itemType) { AnimationProduct animationProduct = new AnimationProduct(); animationProduct.ID = Guid.NewGuid(); animationProduct.Animation = animation; animationProduct.ItemType = itemType; animationProduct.ItemGroup = CreateItemGroup(division); animationProduct.Product = CreateProduct(division); animationProduct.Signature = CreateSignature(division); if (normalMultiple == warehouseMultiple) { Multiple multiple = CreateMultiple(animationProduct.Product, normalMultiple); animationProduct.Multiple = multiple; animationProduct.Multiple1 = multiple; } else { animationProduct.Multiple = CreateMultiple(animationProduct.Product, normalMultiple); animationProduct.Multiple1 = CreateMultiple(animationProduct.Product, warehouseMultiple); } animationProduct.OnCAS = true; animationProduct.ConfirmedMADMonth = DateTime.Now; animationProduct.StockRisk = true; animationProduct.DeliveryRisk = true; animationProduct.SortOrder = 1; animationProduct.Category = category; animationProduct.BrandAxe = brandAxe; return animationProduct; }
protected Category CreateCategory(string name, Division division) { Category category = new Category(); category.ID = Guid.NewGuid(); category.Name = name; category.Division = division; return category; }