PublicAPI.Projects.ProjectTaskBase.ProjectTask.CreateNormalTask ELMA API Documentation
Create a task, included in the plan. Creates an object, without saving in the database
 
 
Syntax

[BrowsableAttribute(false)]
[ObsoleteAttribute("Этот метод вскоре будет удалён", true)]
public ProjectTask CreateNormalTask(
	Project project,
	string subject,
	User executor,
	DateTime startDate,
	DateTime endDate
)

Parameters

project
Type: Project
Project. Object. Access path: PublicAPI.Projects.Project
subject
Type: System String
Task subject
executor
Type: User
Executor. Object. Access path: PublicAPI.Portal.Security.User
startDate
Type: System DateTime
Start date
endDate
Type: System DateTime
End date

Return Value

Type: ProjectTask
Project task (included in the plan)
Examples

//load the necessary data 
var project = PublicAPI.Projects.Project.Load(3); //load the project by ID 
var subject = "Task name"; //task subject 
var executor = PublicAPI.Portal.Security.User.Load(3); //load the user by ID 
var startDate = DateTime.Now; //task start date 
var endDate = DateTime.Now.AddDays(3); //task end date 

//create a task, included in the plan 
var projectTask = PublicAPI.Projects.ProjectTask.CreateNormalTask(project, subject, executor, startDate, endDate);

//projectTask - created project task, included in the plan, not saved in the database
See Also