Example #1
0
        private KitComponent InternalCopy()
        {
            //CREATE AN EXACT DUPLICATE OF THIS KIT COMPONENT
            KitComponent copiedComponent = KitComponentDataSource.Load(this.KitComponentId, false);

            //MAKE COPIES OF THE ASSOCIATED PRODUCTS
            foreach (KitProduct item in copiedComponent.KitProducts)
            {
                item.KitProductId = 0;
            }
            //RESET THE COMPONENTID
            copiedComponent.KitComponentId = 0;
            //SAVE THE NEW COMPONENT
            copiedComponent.Save();
            return(copiedComponent);
        }
Example #2
0
 public static KitComponent Load(Int32 kitComponentId)
 {
     return(KitComponentDataSource.Load(kitComponentId, true));
 }
Example #3
0
 public static KitComponentCollection LoadForProduct(Int32 productId, string sortExpression)
 {
     return(KitComponentDataSource.LoadForProduct(productId, 0, 0, sortExpression));
 }
Example #4
0
 public static KitComponentCollection LoadForProduct(Int32 productId, int maximumRows, int startRowIndex)
 {
     return(KitComponentDataSource.LoadForProduct(productId, maximumRows, startRowIndex, string.Empty));
 }
Example #5
0
 public static KitComponentCollection LoadForProduct(Int32 productId)
 {
     return(KitComponentDataSource.LoadForProduct(productId, 0, 0, string.Empty));
 }