Dynamicweb 8 Documentation
OrderField Property (OrderFieldValue)
Example 

Gets or sets the order field.
Syntax
'Declaration
 
Public Property OrderField As OrderField
public OrderField OrderField {get; set;}

Property Value

The order field.
Example
class MyPage : System.Web.UI.Page
{
   public void CustomOrderFields(Order order)
   {
       FieldTypeCollection fieldTypes = FieldType.getFieldTypes();
       foreach (OrderFieldValue ofv in order.OrderFieldValues)
       {
           FieldType ft = fieldTypes.GetFieldType(ofv.OrderField.TypeID);

           string reqValue = Base.ChkString(Base.Request(ofv.OrderField.SystemName));
           switch (ft.DWName.ToLower())
           {
               case "text":
               case "largetext":
               case "integer":
               case "double":
                   ofv.Value = Base.ChkString(Base.Request(ofv.OrderField.SystemName, false));
                   break;
               case "checkbox":
                   ofv.Value = !string.IsNullOrEmpty(reqValue);
                   break;
               case "date":
               case "datetime":
                   ofv.Value = Dates.ParseAsDate(ofv.OrderField.SystemName);
                   break;
               case "link":
                   ofv.Value = reqValue;
                   break;
               case "filemanager":
                   ofv.Value = reqValue;
                   break;
               default:
                   break;
           }
       }
   }
}
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

OrderFieldValue Class
OrderFieldValue Members

Send Feedback