Repository navigation
Expand file tree
/
Copy pathTask.cs
More file actions
216 lines (188 loc) · 5.53 KB
/
Copy pathTask.cs
File metadata and controls
216 lines (188 loc) · 5.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Nimble
{
public class Task
{
private int taskId;
private string taskDesc;
private int projectId;
private int category;
private int assignmentId;
private int userId;
//private int[] userID = new int[10];
private double estEffort = 0;
private double actEffort = 0;
private DateTime startDate;
private DateTime endDate;
private DateTime dueDate;
private int status = 0;
//startDate.CustomFormat = "MM/dd/yyyy";
public Task()
{
}
public Task(int taskId, string taskDesc, int projectID, int category, int userID, DateTime startDate, DateTime dueDate)
{
this.taskId = taskId;
this.taskDesc = taskDesc;
this.projectId = projectID;
this.category = category;
//this.assignmentID = assignmentID;
//this.userID = new int[10];
this.startDate = startDate;
this.dueDate = dueDate;
TimeSpan days = dueDate - startDate;
int effortHours = ((int)days.TotalDays) * 5;
this.estEffort = effortHours;
this.actEffort = 0;
//this.endDate = null;
}
public Task(int taskId, string taskDesc, DateTime startDate, DateTime dueDate)
{
this.taskId = taskId;
this.taskDesc = taskDesc;
//this.projectID = projectID;
//this.category = category;
//this.assignmentID = assignmentID;
//this.userID = new int[10];
this.startDate = startDate;
this.dueDate = dueDate;
TimeSpan days = dueDate - startDate;
int effortHours = ((int)days.TotalDays) * 5;
this.estEffort = effortHours;
this.actEffort = 0;
//this.endDate = null;
}
public int TaskId
{
get { return taskId; }
set { this.taskId = value; }
}
public int UserId
{
get { return userId; }
set { this.userId = value; }
}
public int ProjectID
{
get { return projectId; }
set { this.projectId = value; }
}
public string TaskDesc
{
get { return taskDesc; }
set { this.taskDesc = value; }
}
public int Category
{
get { return category; }
set { this.category = value; }
}
public int Status{
get { return status; }
set { this.status = value; }
}
public int AssignmentID
{
get { return assignmentId; }
set { this.assignmentId = value; }
}
public double EstEffort
{
get { return estEffort; }
set { this.estEffort = value; }
}
public double ActEffort
{
get { return actEffort; }
set { this.actEffort = value; }
}
public DateTime StartDate
{
get { return startDate; }
set { this.startDate = value; }
}
public DateTime EndDate
{
get { return endDate; }
set { this.endDate = value; }
}
public DateTime DueDate
{
get { return dueDate; }
set { this.dueDate = value; }
}
public String CatString()
{
string cat = string.Empty;
if (this.category == 0)
{
cat = "Requirements Analysis";
}
else if (this.category == 1)
{
cat = "Design";
}
else if (this.category == 2)
{
cat = "Coding";
}
else if (this.category == 3)
{
cat = "Testing";
}
else if (this.category == 4)
{
cat = "Project Management";
}
return cat;
}
public int calcEffort()
{
int eff = 0;
return eff;
}
public String getStatus()
{
string cat = string.Empty;
if (this.status == 0)
{
cat = "Incomplete";
}
else if (this.status == 1)
{
cat = "Complete";
}
else if (this.status == 2)
{
cat = "Pending";
}
else if (this.status == 3)
{
cat = "Removed";
}
else if (this.status == 4)
{
cat = "Archived";
}
return cat;
}
/*
public int getTaskId() { return taskId; }
public string getTaskDesc() { return taskDesc; }
public int getProjectID() { return projectID; }
public int getCategory() { return category; }
public int getAssignmentID() { return assignmentID; }
//public int getUserID() { return userID; }
public DateTime? getStartDate() { return startDate; }
public DateTime? getEndtDate() { return endDate; }
public DateTime? getDueDate() { return dueDate; }
public int getEffortHours() { return estEffort; }
public int getActEffort() { return actEffort; }
*/
}
}