Пример #1
0
        protected override object CreateInstance(Type itemType)
        {
            DBFormItemBase dbItem = null;
            DBForm         dbForm = FindDBForm();

            if (dbForm != null)
            {
                dbItem = dbForm.CreateInstance();
            }

            return(dbItem);
        }
Пример #2
0
        /// <summary>
        /// Автоматическое создание элемента коллекции.
        /// </summary>
        public DBFormItemBase CreateInstance(ViewMemberInfo info = null)
        {
            DBFormItemBase item = null;

            if (info == null)
            {
                item = DBForm.CreateInstance(treeList: treeExist, memberExists: MemberExists);
            }
            else if (MemberExists.FindInfo(info) == null)
            {
                item = DBForm.CreateInstance(info, treeExist, MemberExists);
            }
            return(item);
        }