Dynamicweb 8 Documentation
Delete(String) Method
Example 

DB field name is OrderFieldID.
Deletes the instance.
Syntax
'Declaration
 
Public Overloads Sub Delete( _ 
   ByVal fieldIdStr As String _ 
) 
public void Delete( 
   string fieldIdStr 
)

Parameters

fieldIdStr
DB field name is OrderFieldID.
Example
class MyPage : System.Web.UI.Page
{
   public void DoDeleteAll()
   {
       foreach (OrderField orderField in OrderField.getOrderFields())
       {
           orderField.Delete(orderField.ID);
       }
   }
}
class OrderField_EditPage : System.Web.UI.Page
{
    private void DeleteOrderField( OrderField fld )
    {
       If FieldExists(orderField.SystemName) {
           Database.ExecuteNonQuery("ALTER TABLE [EcomOrders] DROP COLUMN [" + orderField.SystemName + "]", "Ecom.mdb")
       }
 
        fld.Delete( fld.ID );
        Dynamicweb.eCommerce.Common.Application.KillOrderLineFields();
    }
}
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

OrderField Class
OrderField Members
Overload List

Send Feedback