B
Bridou
Hi,
I'm developing a plugin for MS Project 2003 and I have an error that I don't
understand.
I get task's data from external tool which is :
Start date : 27 March 2007
End date : 04 April 2007
Constraint type : ASAP
And now it depend how I write the code but some data is always changed, eg :
Example 1 :
tacheProject.ConstraintType =
Microsoft.Office.Interop.MSProject.PjConstraint.pjASAP;
tacheProject.Start = new DateTime(1970, 1, 1, 0, 0, 0,
0).AddSeconds(Tache.start_date);
tacheProject.Finish = new DateTime(1970, 1, 1, 0, 0, 0,
0).AddSeconds(Tache.end_date);
It results :
Start date : 27 March 2007
End date : 04 April 2007
Constraint type is equal to 6 which is NET I think
Now example 2 :
tacheProject.Start = new DateTime(1970, 1, 1, 0, 0, 0,
0).AddSeconds(Tache.start_date);
tacheProject.Finish = new DateTime(1970, 1, 1, 0, 0, 0,
0).AddSeconds(Tache.end_date);
tacheProject.ConstraintType =
Microsoft.Office.Interop.MSProject.PjConstraint.pjASAP;
It results :
Start date : 23 April 2007 (Current date in fact)
End date : 01 May 2007
Constraint type : ASAP
If I put the constraint before the dates, the constraint is modified.
If I put it after the dates, then it modifies the dates.
How can I fix the value I want without MS Project modifiy them ?
Thanks by advance,
Bridou
I'm developing a plugin for MS Project 2003 and I have an error that I don't
understand.
I get task's data from external tool which is :
Start date : 27 March 2007
End date : 04 April 2007
Constraint type : ASAP
And now it depend how I write the code but some data is always changed, eg :
Example 1 :
tacheProject.ConstraintType =
Microsoft.Office.Interop.MSProject.PjConstraint.pjASAP;
tacheProject.Start = new DateTime(1970, 1, 1, 0, 0, 0,
0).AddSeconds(Tache.start_date);
tacheProject.Finish = new DateTime(1970, 1, 1, 0, 0, 0,
0).AddSeconds(Tache.end_date);
It results :
Start date : 27 March 2007
End date : 04 April 2007
Constraint type is equal to 6 which is NET I think
Now example 2 :
tacheProject.Start = new DateTime(1970, 1, 1, 0, 0, 0,
0).AddSeconds(Tache.start_date);
tacheProject.Finish = new DateTime(1970, 1, 1, 0, 0, 0,
0).AddSeconds(Tache.end_date);
tacheProject.ConstraintType =
Microsoft.Office.Interop.MSProject.PjConstraint.pjASAP;
It results :
Start date : 23 April 2007 (Current date in fact)
End date : 01 May 2007
Constraint type : ASAP
If I put the constraint before the dates, the constraint is modified.
If I put it after the dates, then it modifies the dates.
How can I fix the value I want without MS Project modifiy them ?
Thanks by advance,
Bridou