Dynamicweb 8 Documentation
Delete(String,String,String) Method
Example 

DB field name is PriceID.
DB field name is PriceProductID.
DB field name is PriceCurrency.
Deletes the specified instance from DB.
Syntax
'Declaration
 
Public Overloads Sub Delete( _ 
   ByVal priceID As String, _ 
   ByVal prodID As String, _ 
   ByVal CurrencyID As String _ 
) 
public void Delete( 
   string priceID,
   string prodID,
   string CurrencyID 
)

Parameters

priceID
DB field name is PriceID.
prodID
DB field name is PriceProductID.
CurrencyID
DB field name is PriceCurrency.
Example
class MyPage : System.Web.UI.Page
{
    public void DoDelete()
    {
        Product prod = new Product();
        prod = (Product)Session["Ecom.Backend.Product"];

        string priceID = HttpContext.Current.Request.QueryString["priceID"];
        string currID = HttpContext.Current.Request.QueryString["currID"];

        Dynamicweb.eCommerce.Prices.Price prs = new Dynamicweb.eCommerce.Prices.Price();
        if (string.IsNullOrEmpty(currID))
        {
            prs.Delete(priceID, prod.ID);
        }
        else
        {
            prs.Delete(priceID, prod.ID, currID);
        }
    }
}
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