Exemplo n.º 1
0
 public void Addtems(String nameTag, MCompanyPackage vw, MPackage cv)
 {
     if (PackageGroup.Equals("1"))
     {
         AddChildItems(groupingPackage, vw, cv);
     }
     else if (PackageGroup.Equals("2"))
     {
         AddChildItems(pricingPackages, vw, cv);
     }
     else if (PackageGroup.Equals("3"))
     {
         AddChildItems(discountPackages, vw, cv);
     }
     else if (PackageGroup.Equals("4"))
     {
         AddChildItems(finalDiscountPackages, vw, cv);
     }
     else if (PackageGroup.Equals("5"))
     {
         AddChildItems(postGiftPackages, vw, cv);
     }
     else if (PackageGroup.Equals("6"))
     {
         AddChildItems(trayPricePackages, vw, cv);
     }
     else if (PackageGroup.Equals("7"))
     {
         AddChildItems(trayGroupPackages, vw, cv);
     }
 }
Exemplo n.º 2
0
        public void AddChildItems(ObservableCollection <MCompanyPackage> items, MCompanyPackage vw, MPackage cv)
        {
            CTable t = new CTable("COMPANY_PACKAGE");

            t.CopyFrom(cv.GetDbObject());

            MCompanyPackage v = new MCompanyPackage(t);

            v.CompanyPackageID = "";
            v.CompanyID        = "1";
            v.SeqNo            = (v.GetMaxSeqNo((items)) + 1).ToString();

            CTable    o   = GetDbObject();
            ArrayList arr = o.GetChildArray("COMPANY_PACKAGE_ITEM");

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

            arr.Add(t);
            items.Add(v);

            v.ExtFlag = "A";
        }
Exemplo n.º 3
0
        public void InitChildItems(String groupNo, ObservableCollection <MCompanyPackage> items)
        {
            CTable o = GetDbObject();

            if (o == null)
            {
                return;
            }

            ArrayList arr = o.GetChildArray("COMPANY_PACKAGE_ITEM");

            if (arr == null)
            {
                return;
            }

            items.Clear();
            foreach (CTable t in arr)
            {
                MCompanyPackage v = new MCompanyPackage(t);
                if (v.PackageGroup.Equals(groupNo))
                {
                    items.Add(v);
                }

                v.ExtFlag = "I";
            }
        }
Exemplo n.º 4
0
 public void CopyPackageInfo(MCompanyPackage ip)
 {
     PackageID       = ip.PackageID;
     PackageCode     = ip.PackageCode;
     PackageName     = ip.PackageName;
     PackageType     = ip.PackageType;
     PackageTypeName = ip.PackageTypeName;
     PackageGroup    = ip.PackageType; //PackageType same PackageGroup
 }