1

我尝试使用 ApproveNonProjectTime 方法(http://msdn.microsoft.com/en-us/library/websvctimesheet.timesheet.approvenonprojecttime%28v=office.12%29.aspx)在控制台应用程序中批准非项目时间。

我的代码很简单:

class Program
{
    const string projectServerUri = "http://morpheus-sp/pwa/";
    const string resourceServicePath = "_vti_bin/psi/Timesheet.asmx";

    static void Main(string[] args)
    {
        TimesheetWebSvc.TimeSheet timesheetSvc = new TimesheetWebSvc.TimeSheet();
        timesheetSvc.Url = projectServerUri + resourceServicePath;
        timesheetSvc.Credentials = CredentialCache.DefaultCredentials;

        timesheetSvc.ApproveNonProjectTime(new Guid[] { new Guid("D6909043-18A7-4FF6-83BB-67EFDF17A279")}, null);        
    }
}

当我执行它时,我有这个错误消息:

System.Web.Services.Protocols.SoapException: ProjectServerError(s) LastError=GeneralItemDoesNotExis

但是,我直接在我的数据库中获取了 TS_LINE_UID,它的状态是 Pending Approval。

你有解决办法吗?

谢谢你,贾斯汀

4

0 回答 0