M
Mike
Having some difficulty doing this - I get an ever-so-helpful
"GeneralUnhandledException".
tried two methods so far, a)using the statusing.updateStatus(xml) method,
and b) creating timesheets via the resource WS ... Making sure I'm doing
that right - however, when I create the timesheets, I need to create lines
that correspond to an assignment(it did not autopopulate). trying to create
the lines fails though - I get another "GeneralUnhandledException" using the
prepareTimesheetLine method, if I leave that out I get a
GeneralQueueUpdatedfailed error, neither of which are terribly forthcoming
about where it's failing. Haven't even gotten to the actual hours here until
I can get the lines in.
AdminWS.TimesheetLineClassDataSet tsLineClassDs =
adminSvc.ReadLineClasses(AdminWS.LineClassType.Regular,
AdminWS.LineClassState.Enabled);
MSP_TimesheetWS.TimesheetDataSet timesheetDs =
timeSvc.ReadTimesheet(timeSheetUid);
MSP_TimesheetWS.TimesheetDataSet.LinesRow line =
timesheetDs.Lines.NewLinesRow();
Guid lineGuid = Guid.NewGuid();
line.TS_LINE_UID = lineGuid;
line.TS_UID = timeSheetUid;
line.ASSN_UID = assnUID;
line.PROJ_UID = ProjGuid;
line.TS_LINE_CLASS_UID =
PSLibrary.TimesheetConst.const_StandardLineClassGuid;
line.TS_LINE_VALIDATION_TYPE =
(byte)PSLibrary.TimesheetEnum.ValidationType.Unverified;
line.TS_LINE_CACHED_ASSIGN_NAME =
tsLineClassDs.LineClasses[0].TS_LINE_CLASS_DESC;
timesheetDs.Lines.AddLinesRow(line);
Guid jobGuid = Guid.NewGuid();
timeSvc.PrepareTimesheetLine(timeSheetUid, ref timesheetDs, new
Guid[] { line.TS_UID });
timeSvc.QueueUpdateTimesheet(jobGuid, timeSheetUid, timesheetDs);
"GeneralUnhandledException".
tried two methods so far, a)using the statusing.updateStatus(xml) method,
and b) creating timesheets via the resource WS ... Making sure I'm doing
that right - however, when I create the timesheets, I need to create lines
that correspond to an assignment(it did not autopopulate). trying to create
the lines fails though - I get another "GeneralUnhandledException" using the
prepareTimesheetLine method, if I leave that out I get a
GeneralQueueUpdatedfailed error, neither of which are terribly forthcoming
about where it's failing. Haven't even gotten to the actual hours here until
I can get the lines in.
AdminWS.TimesheetLineClassDataSet tsLineClassDs =
adminSvc.ReadLineClasses(AdminWS.LineClassType.Regular,
AdminWS.LineClassState.Enabled);
MSP_TimesheetWS.TimesheetDataSet timesheetDs =
timeSvc.ReadTimesheet(timeSheetUid);
MSP_TimesheetWS.TimesheetDataSet.LinesRow line =
timesheetDs.Lines.NewLinesRow();
Guid lineGuid = Guid.NewGuid();
line.TS_LINE_UID = lineGuid;
line.TS_UID = timeSheetUid;
line.ASSN_UID = assnUID;
line.PROJ_UID = ProjGuid;
line.TS_LINE_CLASS_UID =
PSLibrary.TimesheetConst.const_StandardLineClassGuid;
line.TS_LINE_VALIDATION_TYPE =
(byte)PSLibrary.TimesheetEnum.ValidationType.Unverified;
line.TS_LINE_CACHED_ASSIGN_NAME =
tsLineClassDs.LineClasses[0].TS_LINE_CLASS_DESC;
timesheetDs.Lines.AddLinesRow(line);
Guid jobGuid = Guid.NewGuid();
timeSvc.PrepareTimesheetLine(timeSheetUid, ref timesheetDs, new
Guid[] { line.TS_UID });
timeSvc.QueueUpdateTimesheet(jobGuid, timeSheetUid, timesheetDs);