private ArrayList constructItems()
        {
            CTaxFormPageRv1Kor            page  = null;
            CTaxFormGroupByEmployeeRv1Kor group = null;
            ArrayList pages = new ArrayList();

            while (true)
            {
                MVTaxFormPRV1 m = fetchData();
                if (m == null)
                {
                    break;
                }

                if ((page == null) || (page.GroupCount >= 8))
                {
                    page = new CTaxFormPageRv1Kor();
                    pages.Add(page);
                }

                group = new CTaxFormGroupByEmployeeRv1Kor(m);
                page.AddGroup(group);

                group.AddWhItem(m);
                suppliers[m.SupplierName] = m.SupplierName;
            }

            if (pages.Count > 0)
            {
                int lastIdx = pages.Count - 1;

                CTaxFormPageRv1Kor lastPage = (CTaxFormPageRv1Kor)pages[lastIdx];
                if (lastPage.GroupCount == 0)
                {
                    //Blank page
                    pages.RemoveAt(lastIdx);
                }
            }

            return(pages);
        }
Пример #2
0
 public void AddGroup(CTaxFormGroupByEmployeeRv1Kor grp)
 {
     groups.Add(grp);
 }