Hello Virsharma. If you have not done so already, download the Project Server
SDK and take a look at the ProjTool solution sample code. Take a look at the
CreateProjects.cs form and in particular a method called "btnCreate_Click"
and "CreateTask" which i hope will at least point you in the right direction.
Sample of the CreateTask method :
public static void CreateTask(ProjectWebSvc.ProjectDataSet dataset,
string name, Guid taskGuid)
{
ProjectWebSvc.ProjectDataSet.TaskRow taskRow =
dataset.Task.NewTaskRow();
taskRow.PROJ_UID = dataset.Project[0].PROJ_UID;
taskRow.TASK_UID = taskGuid;
// Specify TASK_DUR_FMT to avoid potential problems
// when you open the project with Project Professional.
taskRow.TASK_DUR_FMT = (int)PSLib.Task.DurationFormat.Day;
taskRow.TASK_NAME = name;
dataset.Task.AddTaskRow(taskRow);
//Assign the work hours
taskRow.TASK_WORK = 6;
//Or alternatively assign a value to duration
taskRow.TASK_DUR = 6;
}
Piet Remen
Solutioin Specialist
Strategic Data Management