Dynamicweb.eCommerce.Orders Namespace > OrderField Class > Delete Method : Delete(String) Method |
'Declaration
Public Overloads Sub Delete( _ ByVal fieldIdStr As String _ )
public void Delete( string fieldIdStr )
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(); } }
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