Dynamicweb 8 Documentation
Delete(ProductCollection,Boolean) Method
Example 

The products.
if set to true to delete.
Deletes the specified instances from DB.
Syntax
'Declaration
 
Public Overloads Function Delete( _ 
   ByVal products As ProductCollection, _ 
   ByVal run As Boolean _ 
) As String
public string Delete( 
   ProductCollection products,
   bool run 
)

Parameters

products
The products.
run
if set to true to delete.

Return Value

The SQL query.
Example
class MyPage : System.Web.UI.Page
{
    public void DoDelete()
    {
        Product prod = new Product();
        prod = (Product)Session["Ecom.Backend.Product"];

        Dynamicweb.eCommerce.Prices.Price prs = new Dynamicweb.eCommerce.Prices.Price();
        prs.Delete(Product.getActiveProducts(), true);
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Price Class
Price Members
Overload List

Send Feedback