다음을 통해 공유


Save Method

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Saves the current order template instance to the underlying database, optionally with a specified name.

Overload List

  Name Description
Aa530593.pubmethod(en-US,CS.70).gif Save()()() Saves the current order template instance to the underlying database. (Overrides OrderGroup..::.Save()()().)
Aa530593.pubmethod(en-US,CS.70).gif Save(String) Saves the order template to the database using the specified order template name.

Top

Remarks

Saves the current order template instance to the underlying database. Save will update LastModified and store data in the database regardless of whether the OrderTemplate has been modified in any other way. This ensures that the LastModified time reflects the last time any code explicitly called Save.

PurchaseOrder will write to the database only if a property has been modified for the object and the instance has been SetDirty. PurchaseOrder does this as an optimization to cut down on the number of writes to the database.

When a OrderTemplate is serialized and saved to the database, the LastModified field is automatically updated even if no recent changes have been made to the OrderTemplate. Created and LastModified are system properties that are written by the Commerce Server system. If you want to preserve OrderTemplate properties that reflect historical Created and LastModified values, you should create a set of custom properties that are not overridden by the system.

See Also

Reference

OrderTemplate Class

OrderTemplate Members

Microsoft.CommerceServer.Runtime.Orders Namespace