Save

 

Dovico.TrackITAPI.CRate.Save(System.String,Dovico.TrackITAPI.CStateInfo)

 

 

Function Overview:

Saves rate information from xml specified in the format rate.xsd. Overtime assignments are in id.xsd format within rate. To change a rate amount utilize the RATECHANGE element in the form ratechange.xsd with a key of "RATE.AMOUNT".

 

 

Parameter List:

sXml - string - string of xml for saving rates in the format rate.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 to update an existing rate

string sXml = "<Rate:RATES xmlns:Rate=\"http://www.dovico.com/schemas/rate.xsd\">";

sXml += "<RATE ID=\"500\" NAME=\"Example Rate\" AMOUNT=\"1225\" DESC=\"example description\" ";

sXml += "ARCHIVE=\"F\" OUTSIDE=\"\" HIDE=\"F\">";

sXml += "<OVERTIMES><ID>100</ID><ID>101</ID></OVERTIMES>";

// also build up xml to update all budgets and actuals with this rate since January 1, 2003

sXml += "<RATECHANGES><RATECHANGE ID=\"RATE.AMOUNT\" TYPE=\"2\" PREVIOUSRATE=\"0\" ";

sXml += "EFFDATE=\"2003-01-01T00:00:00\"/></RATECHANGES></RATE></Rate:RATES>";

// call the PhoneSave method

wsapi.MethodInvoke("RateSave", sXml, stToken);