Save

 

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

 

 

Function Overview:

Saves TEMPTRANS information (typically entered from timesheet entry tools). The format for the information should be temptrans.xsd. Note that START/STOP times can be empty strings if a TOTAL is specified. In this case a "Start From Last" type functionality will be determined for start and stop times.

 

 

Parameter List:

sXml - string - string of xml in the format

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 insert a new unsubmitted time entry into the database

// (this time entry will not show up in pro reports until submitted and approved)

// Note that no start or stop times are specified. When these two are left blank

// the time entry is given start and stop times based on its most appropriate fit

// in the day (start from last etc.)

string sXml = "<TempTrans:TEMPTRANS xmlns:TempTrans=\"http://www.dovico.com/schemas/temptrans.xsd\">";

sXml += "<TEMPTRAN ID=\"FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF\" PROJECT=\"100\" TASK=\"100\" ";

sXml += "EMPLOYEE=\"100\" DATE=\"2004-05-10T00:00:00\" START=\"\" STOP=\"\" TOTAL=\"1.67\" ";

sXml += "OTCOSTID=\"0\" OTRATEID=\"0\" DESC=\"Example\"/></TempTrans:TEMPTRANS>";

// call the method to add the new time entry

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