B
Bill Busby
We're having trouble with a piece of code that, if successful, will be used
to set a trigger on the submit event of a timesheet to automate the import of
the timesheet data into the project tasks. The code below is very rough poc
code that we're running as an application and is only a segment that
demonstrates the calls made to do the import. We don't get any error codes
but the import doesn't happen. Does anyone have any insight on coding this
process? We're clearly missing something but the documentation is rather
sparse on some of these calls.
Dim timesheet As New TimesheetWebSrv.TimeSheet
Dim resource As New ResourceWebSrv.Resource
Dim adminsvc As New AdminWebSvr.Admin
Dim statusingSvc As New StatusingWebSrv.Statusing
resource.Url = PROJECT_SERVER_URI & RESOURCE_SERVICE_PATH
resource.UseDefaultCredentials = True
timesheet.Url = PROJECT_SERVER_URI & TIMESHEET_SERVICE_PATH
timesheet.UseDefaultCredentials = True
adminsvc.Url = PROJECT_SERVER_URI & ADMIN_SERVICE_PATH
adminsvc.UseDefaultCredentials = True
statusingSvc.Url = PROJECT_SERVER_URI + STATUSING_SERVICE_PATH
statusingSvc.UseDefaultCredentials = True
Dim tsUID As New Guid("70ce58c2-fedf-4a60-a837-fc842396ee20")
Dim timesheetDS As TimesheetDataSet = timesheet.ReadTimesheet(tsUID)
'Dim headerrow As TimesheetDataSet.HeadersRow
'MsgBox(timesheetDS.Headers(0).WPRD_UID.ToString)
'headerrow.WPRD_UID
'MsgBox(timesheetDS.HeadersRow("WPRD_UID"))
Dim chadguid As New Guid("63834d01-68ce-47dd-93fd-d6662ddfb3e5")
'timesheetds.Headers.
'timesheetDS.Headers.per()
Dim importTimeSheetDS As StatusingWebSrv.ImportTimesheetDataSet =
statusingSvc.ReadImportTimesheetData(timesheetDS.Headers(0).WPRD_UID)
'Dim asdfasdf
statusingSvc.ImportTimesheet(timesheetDS.Headers(0).WPRD_UID)
MsgBox("wait")
Label1.Text = "Updated on " & Now()
to set a trigger on the submit event of a timesheet to automate the import of
the timesheet data into the project tasks. The code below is very rough poc
code that we're running as an application and is only a segment that
demonstrates the calls made to do the import. We don't get any error codes
but the import doesn't happen. Does anyone have any insight on coding this
process? We're clearly missing something but the documentation is rather
sparse on some of these calls.
Dim timesheet As New TimesheetWebSrv.TimeSheet
Dim resource As New ResourceWebSrv.Resource
Dim adminsvc As New AdminWebSvr.Admin
Dim statusingSvc As New StatusingWebSrv.Statusing
resource.Url = PROJECT_SERVER_URI & RESOURCE_SERVICE_PATH
resource.UseDefaultCredentials = True
timesheet.Url = PROJECT_SERVER_URI & TIMESHEET_SERVICE_PATH
timesheet.UseDefaultCredentials = True
adminsvc.Url = PROJECT_SERVER_URI & ADMIN_SERVICE_PATH
adminsvc.UseDefaultCredentials = True
statusingSvc.Url = PROJECT_SERVER_URI + STATUSING_SERVICE_PATH
statusingSvc.UseDefaultCredentials = True
Dim tsUID As New Guid("70ce58c2-fedf-4a60-a837-fc842396ee20")
Dim timesheetDS As TimesheetDataSet = timesheet.ReadTimesheet(tsUID)
'Dim headerrow As TimesheetDataSet.HeadersRow
'MsgBox(timesheetDS.Headers(0).WPRD_UID.ToString)
'headerrow.WPRD_UID
'MsgBox(timesheetDS.HeadersRow("WPRD_UID"))
Dim chadguid As New Guid("63834d01-68ce-47dd-93fd-d6662ddfb3e5")
'timesheetds.Headers.
'timesheetDS.Headers.per()
Dim importTimeSheetDS As StatusingWebSrv.ImportTimesheetDataSet =
statusingSvc.ReadImportTimesheetData(timesheetDS.Headers(0).WPRD_UID)
'Dim asdfasdf
statusingSvc.ImportTimesheet(timesheetDS.Headers(0).WPRD_UID)
MsgBox("wait")
Label1.Text = "Updated on " & Now()