/// <summary> /// Creates a copy of the given ProductTemplate /// </summary> /// <param name="productTemplateId">Id of the ProductTemplate object to create copy of</param> /// <param name="deepCopy">if <b>true</b> child collections are also copied</param> /// <returns>A copy of the given ProductTemplate</returns> public static ProductTemplate Copy(int productTemplateId, bool deepCopy) { ProductTemplate copy = ProductTemplateDataSource.Load(productTemplateId); if (copy != null) { if (deepCopy) { //LOAD THE CHILD COLLECTIONS AND RESET foreach (InputField field in copy.InputFields) { //LOAD THE CHILD COLLECTIONS AND RESET foreach (InputChoice choice in field.InputChoices) { choice.InputChoiceId = 0; } field.InputFieldId = 0; } } copy.ProductTemplateId = 0; return(copy); } return(null); }
public static ProductTemplate Load(Int32 productTemplateId) { return(ProductTemplateDataSource.Load(productTemplateId, true)); }
public static ProductTemplateCollection LoadForProduct(Int32 productId, int maximumRows, int startRowIndex) { return(ProductTemplateDataSource.LoadForProduct(productId, maximumRows, startRowIndex, string.Empty)); }
public static ProductTemplateCollection LoadForProduct(Int32 productId, string sortExpression) { return(ProductTemplateDataSource.LoadForProduct(productId, 0, 0, sortExpression)); }
public static ProductTemplateCollection LoadForProduct(Int32 productId) { return(ProductTemplateDataSource.LoadForProduct(productId, 0, 0, string.Empty)); }