Save

 

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

 

 

Function Overview:

Saves assignment information to the database. Assignment info should be in the format assignment.xsd

 

 

Parameter List:

sXml - string - xml in the format assignmnet.xsd that contains assignment information to be saved

siState - CStateInfo - State information needed to process a transaction

 

Returns

xml containing the IDs of the inserted and updated assignments

 

Example:

// initialize the string of xml that will make the assignments

// take note that in ASSIGNMENTS root tag you have to specify ASSIGNEMPLOYEE attribute

// set to T if the EMPLOYEE attribute will represent an employee ID

// set to F if the EMPLOYEE attribute will represent a team ID

// assigning by team will assign all employees under that team

// also note you can assign client and company overtimes

// by nesting the <OTRATE> and <OTCOST> elements within the assignment element

string sXml;

sXml = "<Assignment:ASSIGNMENTS xmlns:Assignment=\"http://www.dovico.com/schemas/assignment.xsd\" ASSIGNEMPLOYEE=\"T\">";

sXml += "<ASSIGNMENT ID=\"-1\" PROJECT=\"100\" TASK=\"100\" EMPLOYEE=\"100\" GROUP=\"0\" ";

sXml += "GPAR=\"0\" EST=\"T\" HOURS=\"0\" ADJHOURS=\"0\" EMPRATE=\"100\" EMPCOST=\"25\" ";

sXml += "PRORATE=\"1\" RATEID=\"100\" COSTID=\"100\" HIDE=\"F\" ETC=\"0\" START=\"2003-01-01T00:00:00\" ";

sXml += "FINISH=\"2003-12-31T00:00:00\" WBS=\"example\">";

sXml += "<OTRATE><ID>100</ID></OTRATE><OTCOST><ID>100</ID></OTCOST></ASSIGNMENT>";

sXml += "</Assignment:ASSIGNMENTS>";

// call the method to save assignments

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