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

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

Parameters

priceID
DB field name is PriceID.
prodID
DB field name is PriceProductID.
CurrencyID
DB field name is CurrencyID.
quantity
DB field name is PriceQuantity.
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"];
        double quantity = Double.Parse(HttpContext.Current.Request.QueryString["quantity"]);

        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, quantity);
        }
    }
}
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