예제 #1
0
        public new KitSuppliersRelation GetCopyUnsaved()
        {
            KitSuppliersRelation kitSuppliers = (KitSuppliersRelation)MemberwiseClone();

            kitSuppliers.ItemId = -1;
            kitSuppliers.UnSetEvents();

            return(kitSuppliers);
        }
예제 #2
0
        /// <summary>
        /// Создает воздушное судно без дополнительной информации
        /// </summary>
        public KitSuppliersRelation(KitSuppliersRelation toCopy)
            : this()
        {
            if (toCopy == null)
            {
                return;
            }

            KitId        = toCopy.ItemId;
            ParentTypeId = toCopy.SmartCoreObjectType.ItemId;
            Supplier     = toCopy.Supplier;
        }
예제 #3
0
        public new Product GetCopyUnsaved()
        {
            Product product = (Product)MemberwiseClone();

            product.ItemId = -1;
            product.Name  += " Copy";
            product.UnSetEvents();

            product.SupplierRelations = new CommonCollection <KitSuppliersRelation>();
            foreach (KitSuppliersRelation kitSuppliers in SupplierRelations)
            {
                KitSuppliersRelation newObject = kitSuppliers.GetCopyUnsaved();
                product.SupplierRelations.Add(newObject);
            }

            return(product);
        }