Dynamicweb.eCommerce.Orders Namespace > OrderFieldValue Class : Value Property |
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; } } } }
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