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