protected CustomerAllocation CreateCustomerAllocation(Customer customer, AnimationProductDetail animationProductDetail) { CustomerAllocation customerAllocation = new CustomerAllocation(); customerAllocation.ID = Guid.NewGuid(); customerAllocation.Customer = customer; customerAllocation.AnimationProductDetail = animationProductDetail; return customerAllocation; }
protected CustomerGroupAllocation CreateCustomerGroupAllocation(CustomerGroup customerGroup, AnimationProductDetail animationProductDetail) { CustomerGroupAllocation groupAllocation = new CustomerGroupAllocation(); groupAllocation.ID = Guid.NewGuid(); groupAllocation.CustomerGroup = customerGroup; groupAllocation.AnimationProductDetail = animationProductDetail; return groupAllocation; }
protected AnimationProductDetail CreateAnimationProductDetail(AnimationProduct animationProduct, SalesArea salesArea) { AnimationProductDetail animationProductDetail = new AnimationProductDetail(); animationProductDetail.ID = Guid.NewGuid(); animationProductDetail.AnimationProduct = animationProduct; animationProductDetail.SalesArea = salesArea; //animationProductDetail.BDCQuantity = 10; return animationProductDetail; }
void AnimationProductDetailManager_EntityChanged(object sender, AnimationProductDetail entity) { if (entity.AnimationProduct != null && entity.AnimationProduct.Animation != null && entity.AnimationProduct.IDAnimation == Animation.ID) { entity.AnimationProduct.CalculateTotals(); foreach (AnimationProduct ap in Animation.AnimationProducts) { ap.TotalAnimationQuantity = -1; } } }
private void NextProduct() { int index = animation.ObservableProductDetails.IndexOf(selectedProductDetail); if (index >= 0) { int nextIndex = (index + 1) % animation.ObservableProductDetails.Count; if (index != nextIndex) { selectedProductDetail = animation.ObservableProductDetails[nextIndex]; OpenAllocation(); } } }
private void PreviousProduct() { int index = animation.ObservableProductDetails.IndexOf(selectedProductDetail); if (index >= 0) { int prevIndex = index - 1; if (prevIndex < 0) prevIndex = animation.ObservableProductDetails.Count - 1; if (index != prevIndex) { selectedProductDetail = animation.ObservableProductDetails[prevIndex]; OpenAllocation(); } } }
public AnimationAllocations(AnimationProductDetail apd) { RefreshAllocations(); PropertyChanged -= AnimationAllocations_PropertyChanged; PropertyChanged +=AnimationAllocations_PropertyChanged; productDetail = apd; CustomerGroupsAllocation.CollectionChanged -= new NotifyCollectionChangedEventHandler(CustomerGroupsAllocation_CollectionChanged); CustomerGroupsAllocation.CollectionChanged +=new NotifyCollectionChangedEventHandler(CustomerGroupsAllocation_CollectionChanged); apd.AnimationProduct.Animation.ObservableAnimationCustomerGroups.CollectionChanged += new NotifyCollectionChangedEventHandler(ObservableAnimationCustomerGroups_CollectionChanged); }