PHPでタスクのタイムファーブデータを読んでください
Contents
[
Hide
Show
]Aspose.Tasks -タスクのタイムファーブデータを読む
Aspose.Tasks java for phpを使用してタスクのタイムファーブデータを読み取るには、gettasktimephaseddataモジュールを呼び出します。ここでは、サンプルコードを見ることができます。
PHPコード
1$ project = new Project( 'test_tasks.mpp');
2
3$ prj = new Prj();
4
5$ tsk = new tsk();
6
7$ cal = new Calendar();
8
9$ cal = $ cal-> getInstance();
10
11$ cal-> set(2013,7,17,8,0,0);
12
13$ project-> set($ prj-> start_date、$ cal-> getTime());
14
15$ project-> set($ prj-> new_tasks_are_manual、new NullableBool(false));
16
17$ task = $ project-> getroottask() - > getChildren() - > add( "task");
18
19$ rsc = $ project-> getResources() - > add( "rsc");
20
21$ resource = new rsc();
22
23$ bigdecimal = new bigdecimal();
24
25$ rsc-> set($ resource-> standard_rate、$ bigdecimal-> valueof(10));
26
27$ rsc-> set($ resource-> overtime_rate、$ bigdecimal-> valueof(15));
28
29$ task-> set($ tsk-> duration、$ project-> getDuration(6));
30
31$ assignment = $ project-> getResourceasSignments() - > add($ task、$ rsc);
32
33$ d = new Date(0);
34
35$ assignment = new asn();
36
37$ assignment-> set($ assignment-> stop、new Date(0));
38
39$ assignment-> set($ assignment-> resume、new Date(0));
40
41$ workcontourtype = new workcontourtype();
42
43$ assignment-> set($ assignment-> work_contour、$ workcontourtype-> backloaded);
44
45$ baselineType = new BaselineType();
46
47$ project-> setBaseLine($ baselineType->ベースライン);
48
49$ task-> set($ tsk-> percent_complete、50);
50
51$ timephasedDatatype = new TimephasedDatatype();
52
53$ td = $ assignment-> getTimePhasedData($ assignment-> get($ assignment-> start)、
54
55$ assignment-> get($ assignment-> finish)、
56
57$ timephasedDatatype-> assignmentRemainingWork) - > tolist();
58
59「サイズ:」を印刷します。 (string)$ td-> size();
60
61"\ nvalue:"を印刷します。 (string)$ td-> get(0) - > getValue();
実行中のコードをダウンロード
ダウンロード**タスクのTimephasedデータ(Aspose.Tasks)**は、下記のソーシャルコーディングサイトのいずれかから読み取ります。