예제 #1
0
        public void InitPackageBonusFilters()
        {
            CTable    o   = GetDbObject();
            ArrayList arr = o.GetChildArray("PACKAGE_BONUS_ITEM");

            if (arr == null)
            {
                arr = new ArrayList();
                o.AddChildArray("PACKAGE_BONUS_ITEM", arr);
            }

            int cntBuy = 0, cntFree = 0;

            foreach (CTable t in arr)
            {
                MPackageBonus v = new MPackageBonus(t);
                if (v.QuantityType.Equals("1"))
                {
                    package_bonusFilterBuy.Add(v);
                    cntBuy++;
                }
                else if (v.QuantityType.Equals("2"))
                {
                    package_bonusFilterFree.Add(v);
                    cntFree++;
                }
                v.ExtFlag = "I";

                v.Seq = bonusItemSeq;
                bonusItemSeq++;
            }
        }
예제 #2
0
        public void AddBonusItemFree(MPackageBonus vp)
        {
            CTable    o   = GetDbObject();
            ArrayList arr = o.GetChildArray("PACKAGE_BONUS_ITEM");

            if (arr == null)
            {
                arr = new ArrayList();
                o.AddChildArray("PACKAGE_BONUS_ITEM", arr);
            }

            arr.Add(vp.GetDbObject());
            package_bonusFilterFree.Add(vp);

            vp.Seq          = bonusItemSeq;
            vp.QuantityType = "2";
            bonusItemSeq++;

            vp.ExtFlag = "A";
        }
예제 #3
0
 public void RemoveBonusFreeItem(MPackageBonus vp)
 {
     removeAssociateItems(vp, "PACKAGE_BONUS_ITEM", "INTERNAL_SEQ", "PACKAGE_BONUS_ID");
     package_bonusFilterFree.Remove(vp);
 }