Esempio n. 1
0
        protected CustomerAllocation CreateCustomerAllocation(Customer customer, AnimationProductDetail animationProductDetail)
        {
            CustomerAllocation customerAllocation = new CustomerAllocation();
            customerAllocation.ID = Guid.NewGuid();
            customerAllocation.Customer = customer;
            customerAllocation.AnimationProductDetail = animationProductDetail;            

            return customerAllocation;
        }
Esempio n. 2
0
        protected CustomerGroupAllocation CreateCustomerGroupAllocation(CustomerGroup customerGroup, AnimationProductDetail animationProductDetail)
        {
            CustomerGroupAllocation groupAllocation = new CustomerGroupAllocation();
            groupAllocation.ID = Guid.NewGuid();
            groupAllocation.CustomerGroup = customerGroup;
            groupAllocation.AnimationProductDetail = animationProductDetail;
          

            return groupAllocation;
        }
Esempio n. 3
0
        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;

        }
Esempio n. 4
0
        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;
                }
            }
        }
Esempio n. 5
0
 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();
         }
     }
 }
Esempio n. 6
0
 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();
         }
     }
 }
Esempio n. 7
0
        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);
        }