Project Server 2007

A

Arun

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
 
M

Martin Winzig

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.
 
A

Arun

Hi Martin,
Thanks for your reply. I think my question may be wrong.Here I reframe
my question. Whenever I assign a issue/risk to a particular person, he will
receive a email alert about the issue/risk. I want to customize that email
alert, i.e. I want to add two lines to that alert messages. How can I do
that...

Thanks,
Arun

Martin Winzig said:
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
 
G

Guidho

To retreive the stored procedures used, you need to run SQL Profiler on your
SQL server.
All you have to do is setup and run the profiler and open the page.

Remark however that the profiler might return many lines if your sql server
is busy, which makes it difficult to identify which stored procedures are
used for opening the page. But you can filter on database/application/...
 
M

Martin Winzig

http://msdn2.microsoft.com/en-us/library/bb968451.aspx


Arun said:
Hi Martin,
Thanks for your reply. I think my question may be wrong.Here I reframe
my question. Whenever I assign a issue/risk to a particular person, he will
receive a email alert about the issue/risk. I want to customize that email
alert, i.e. I want to add two lines to that alert messages. How can I do
that...

Thanks,
Arun

Martin Winzig said:
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
 
C

Chris Boyd

Changing the stored procs will put your project server into an unsupported
state. Also, you will lose any changes after a service pack install because
as part of the upgrade process we delete all stored procedures and recreate
them.
--
Chris Boyd
MS Project
Program Manager

Blog: http://blogs.msdn.com/project_programmability/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top