Dynamicweb 8 Documentation
UpdateDefault(Int32,Boolean,String) Method
Example 

Order flow ID.
if set to true set default to true.
DB feild name is OrderStateID.
Updates default.
Syntax
'Declaration
 
Public Overloads Sub UpdateDefault( _ 
   ByVal orderFlowId As Integer, _ 
   ByVal SetDefaultTo As Boolean, _ 
   Optional ByVal IDStr As String _ 
) 
public void UpdateDefault( 
   int orderFlowId,
   bool SetDefaultTo,
   string IDStr 
)

Parameters

orderFlowId
Order flow ID.
SetDefaultTo
if set to true set default to true.
IDStr
DB feild name is OrderStateID.
Example
class MyPage : System.Web.UI.Page
{
   private void SaveButton_Click(System.Object sender, System.EventArgs e) 
   {
       String  osID = Base.ChkString(HttpContext.Current.Request.QueryString("StateID"));
       OrderState os = new OrderState(osID);
 
       if( IsDefault.Checked )
          os.UpdateDefault(False)

       os.Name = NameStr.Text;
       os.Description = DescrStr.Text;
       os.IsDefault = IsDefault.Checked;
       os.DontUseInstatistics = DontUseInstatistics.Checked;
       os.Save(os.ID);
   }
}
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

OrderState Class
OrderState Members
Overload List

Send Feedback