Task are stored in project server. - To add task you have to use webservice
project.asmx and methos queueaddtoproject.
for(int c = 0; c < dsResources.Resources.Count ; c++)
{
Guid taskUID=Guid.NewGuid();
Guid assnUID=Guid.NewGuid();
ProjectWebSvc.ProjectDataSet.TaskRow myTask=
dsProjectNewTasks.Task.NewTaskRow();
myTask.PROJ_UID =projUID;
myTask.TASK_DUR_FMT = (int)PSLib.Task.DurationFormat.Day;
myTask.TASK_DUR = 48000; //80 hodin
myTask.TASK_UID = taskUID;
myTask.TASK_NAME = dsResources.Resources[c].RES_NAME;
myTask.TASK_NOTES = dsResources.Resources[c].WRES_ACCOUNT;
dsProjectNewTasks.Task.AddTaskRow(myTask);
ProjectWebSvc.ProjectDataSet.AssignmentRow myAssgn =
dsProjectNewTasks.Assignment.NewAssignmentRow();
myAssgn.PROJ_UID = projUID;
myAssgn.ASSN_UID = assnUID;
myAssgn.TASK_UID = taskUID;
myAssgn.RES_UID = dsResources.Resources[c].RES_UID;
dsProjectNewTasks.Assignment.AddAssignmentRow(myAssgn);
}
MyProjectWebSvc.QueueAddToProject(jobId,sessionId,
dsProjectNewTasks,false );
MyProjectWebSvc.QueueCheckInProject(jobId,projUID,false,sessionId,"");
WaitForQueueJobCompletion(jobId);
MyProjectWebSvc.QueuePublish(jobId, projUID, true, "");
WaitForQueueJobCompletion(jobId);
Risk and Issues are stored in Project workspace in list. So using thw
WssInterop.asx
private SPWeb
findProjectWorkspace(Autocont.ProjectServer.Tools.ProjectWebSvc.ProjectDataSet.ProjectRow projectRow)
{
if (projectRow.IsWSTS_SERVER_UIDNull() ||
projectRow.IsWPROJ_STS_SUBWEB_NAMENull()) return null;
string url =
mPSI.WssInterop.GetWSSVServerURL(projectRow.WSTS_SERVER_UID) + "/" +
projectRow.WPROJ_STS_SUBWEB_NAME;
using (SPSite mySite = new SPSite(url))
{
SPWeb myWeb = mySite.OpenWeb("/" +
projectRow.WPROJ_STS_SUBWEB_NAME);
return myWeb;
}
}
then i't s sharepoint job.
Arun said:
Hi,
How can I Know what are the storedprocedures are used to list the items
on a particular page. And how can I add a line to the
alert(task/risks/issues) messages.
Thanks,
Arun