예제 #1
0
파일: TestBase.cs 프로젝트: ddksaku/loreal
        protected CustomerAllocation CreateCustomerAllocation(Customer customer, AnimationProductDetail animationProductDetail)
        {
            CustomerAllocation customerAllocation = new CustomerAllocation();
            customerAllocation.ID = Guid.NewGuid();
            customerAllocation.Customer = customer;
            customerAllocation.AnimationProductDetail = animationProductDetail;            

            return customerAllocation;
        }
예제 #2
0
파일: TestBase.cs 프로젝트: ddksaku/loreal
        protected CustomerGroupAllocation CreateCustomerGroupAllocation(CustomerGroup customerGroup, AnimationProductDetail animationProductDetail)
        {
            CustomerGroupAllocation groupAllocation = new CustomerGroupAllocation();
            groupAllocation.ID = Guid.NewGuid();
            groupAllocation.CustomerGroup = customerGroup;
            groupAllocation.AnimationProductDetail = animationProductDetail;
          

            return groupAllocation;
        }
예제 #3
0
파일: TestBase.cs 프로젝트: ddksaku/loreal
        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;

        }
예제 #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;
                }
            }
        }
예제 #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();
         }
     }
 }
예제 #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();
         }
     }
 }
예제 #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);
        }