示例#1
0
        public void AddChildItems(ObservableCollection <MCompanyCommissionProfile> items, MCompanyCommissionProfile vw, MCommissionProfile cv)
        {
            CTable t = new CTable("COMPANY_COMM_PROFILE");

            t.CopyFrom(cv.GetDbObject());

            MCompanyCommissionProfile v = new MCompanyCommissionProfile(t);

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

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

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

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

            v.ExtFlag = "A";
        }
示例#2
0
 public void Addtems(String nameTag, MCompanyCommissionProfile vw, MCommissionProfile cv)
 {
     if (ProfileType.Equals("1"))
     {
         AddChildItems(commByItem, vw, cv);
     }
     else if (ProfileType.Equals("2"))
     {
         AddChildItems(commByGroup, vw, cv);
     }
 }
示例#3
0
        public void InitChildItems(String typeNo, ObservableCollection <MCompanyCommissionProfile> items)
        {
            CTable    o   = GetDbObject();
            ArrayList arr = o.GetChildArray("COMPANY_COMM_PROFILE_ITEM");

            if (arr == null)
            {
                return;
            }

            items.Clear();
            foreach (CTable t in arr)
            {
                MCompanyCommissionProfile v = new MCompanyCommissionProfile(t);
                if (v.ProfileType.Equals(typeNo))
                {
                    items.Add(v);
                }
                v.ExtFlag = "I";
            }
        }