Esempio n. 1
0
        }       //	setItems

        /// <summary>
        /// Copy Items
        /// </summary>
        /// <param name="fromFormat">from print format</param>
        /// <param name="toFormat">to print format (client, id)</param>
        /// <returns>items</returns>
        static private MPrintFormatItem[] CopyItems(MPrintFormat fromFormat, MPrintFormat toFormat)
        {
            List <MPrintFormatItem> list = new List <MPrintFormatItem>();

            MPrintFormatItem[] items = fromFormat.GetItems();
            for (int i = 0; i < items.Length; i++)
            {
                MPrintFormatItem pfi = items[i].CopyToClient(toFormat.GetAD_Client_ID(), toFormat.Get_ID());
                if (pfi != null)
                {
                    list.Add(pfi);
                }
            }
            //
            MPrintFormatItem[] retValue = new MPrintFormatItem[list.Count];
            retValue = list.ToArray();
            CopyTranslationItems(items, retValue); //	JTP fix
            return(retValue);
        }                                          //	copyItems