Dovico.TrackITAPI.COvertime.Save(System.String,Dovico.TrackITAPI.CStateInfo)
Function Overview:
Saves overtime information to the database specified in overtime.xsd format. Overtime prorating effects on changes of prorating can be controlled by using the RATECHANGES tag with the key of OVERTIME.PRORATE.
Parameter List:
sXml - string - string of xml containing overtime information in the format overtime.xsd
siState - CStateInfo - State information needed to process the transaction
Returns
A string of xml containing the IDs of inserted and updated items.
Example:
// build up xml that will update an existing overtime in the database
string sXml = "<Overtime:OVERTIMES xmlns:Overtime=\"http://www.dovico.com/schemas/overtime.xsd\">";
sXml += "<OVERTIME ID=\"195\" NAME=\"Example Overtime\" PRORATE=\"2\" ";
sXml += "DESC=\"new overtime example\" ARCHIVE=\"F\" OUTSIDE=\"\" HIDE=\"F\">";
// build up rate change xml for changing last prorating only (in both estimates and actual)
sXml += "<RATECHANGES><RATECHANGE ID=\"OVERTIME.PRORATE\" TYPE=\"1\" ";
sXml += "PREVIOUSRATE=\"1\" EFFDATE=\"2003-01-01T00:00:00\"/></RATECHANGES></OVERTIME>";
sXml += "</Overtime:OVERTIMES>";
// call the OvertimeSave method
wsapi.MethodInvoke("OvertimeSave", sXml, stToken);