예제 #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);
        }
예제 #2
0
 public static KitComponent Load(Int32 kitComponentId)
 {
     return(KitComponentDataSource.Load(kitComponentId, true));
 }
예제 #3
0
 public static KitComponentCollection LoadForProduct(Int32 productId, string sortExpression)
 {
     return(KitComponentDataSource.LoadForProduct(productId, 0, 0, sortExpression));
 }
예제 #4
0
 public static KitComponentCollection LoadForProduct(Int32 productId, int maximumRows, int startRowIndex)
 {
     return(KitComponentDataSource.LoadForProduct(productId, maximumRows, startRowIndex, string.Empty));
 }
예제 #5
0
 public static KitComponentCollection LoadForProduct(Int32 productId)
 {
     return(KitComponentDataSource.LoadForProduct(productId, 0, 0, string.Empty));
 }