Dovico.TrackITAPI.CTask.Save(System.String,Dovico.TrackITAPI.CStateInfo)
Function Overview:
Save task information to the database specified in the format task.xsd. Rate change information can be applied by using the ratechange tag. The key for the rate change is TASK.PRORATE.
Parameter List:
sXml - string - string of xml containing task information in the format task.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 insert a new task into the database
// note that a rate change example is also included even though
// it really has no effect on a new item
string sXml = "<Task:TASKS xmlns:Task=\"http://www.dovico.com/schemas/task.xsd\">";
sXml += "<TASK ID=\"-1\" GROUP=\"0\" LEADER=\"0\" NAME=\"Example Task\" ";
sXml += "DESC=\"Example description\" GLOBAL=\"T\" PRORATE=\"1.0\" TARGET=\"0\" ";
sXml += "ARCHIVE=\"F\" OUTSIDE=\"\" HIDE=\"F\" INTEGRATE=\"\">";
sXml += "<RATECHANGES><RATECHANGE ID=\"TASK.PRORATE\" TYPE=\"0\" ";
sXml += "EFFDATE=\"2003-01-01T00:00:00\" PREVIOUSRATE=\"2.0\"/>";
sXml += "</RATECHANGES></TASK></Task:TASKS>";
// call the method to add the task to the database
wsapi.MethodInvoke("TaskSave", sXml, stToken);