Save

 

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

 

 

Function Overview:

This Method is capable of saving Employee xml in the form of http://www.dovico.com/schemas/employee.xsd to the database. Note that EFFDATE for each employee is optional, and if included it means the employee has changed teams, and the time entries for the employee from EFFDATE forward will be rolled ahead to new team.

 

 

Parameter List:

sXml - string - employee xml in the format specified by the .xsd schema

siState - CStateInfo - State information needed to carry out transaction

 

Returns

A string of xml containing the ids of items that have been inserted and updated.

 

Example:

// build up xml to update an existing employee of ID 100

string sXml = "<Employee:EMPLOYEES xmlns:Employee=\"http://www.dovico.com/schemas/employee.xsd\">";

sXml += "<EMPLOYEE ID=\"100\" TRAWORKFLOW=\"0\" EXPWORKFLOW=\"0\" TIMATT=\"0\" FIRST=\"First Name\" ";

sXml += "LAST=\"Last Name\" GROUP=\"100\" SOFTWARE=\"B\" WAGE=\"101\" CHARGE=\"100\" ";

sXml += "START=\"2003-02-02T00:00:00\" END=\"2004-02-02T00:00:00\" SECURITY=\"96\" ";

sXml += "USERID=\"MNISLOGTIFEHLUHRMHHMFNBDIJEE\" PASSWORD=\"MNISLOGTIFEHLUHRMHHMFNBDIJEE\" ";

sXml += "NUMBER=\"\" EMAIL=\"\" AUTEMAIL=\"\" DAYS=\"5\" HOURS=\"7.5\" ARCHIVE=\"F\" ";

sXml += "OUTSIDE=\"\" INTEGRATE=\"\"/>";

sXml += "</Employee:EMPLOYEES>";

// call the EmployeeSave method to update employee information

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