-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTasksData.cs
24 lines (22 loc) · 1.08 KB
/
TasksData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
namespace AspNetCoreDashboardBackend {
public class TasksData {
public static DataTable GetTasksData() {
DataTable table = new DataTable();
DataColumn id = new DataColumn("ID", typeof(int));
DataColumn parentId = new DataColumn("ParentID", typeof(int));
DataColumn text = new DataColumn("Text", typeof(string));
DataColumn start = new DataColumn("StartDate", typeof(DateTime));
DataColumn finish = new DataColumn("FinishDate", typeof(DateTime));
table.Columns.AddRange(new DataColumn[] { id, parentId, text, start, finish });
table.Rows.Add(new object[] { 1, 0, "Task 1", DateTime.Now, DateTime.Now.AddDays(1) });
table.Rows.Add(new object[] { 2, 1, "Task 2", DateTime.Now.AddDays(1), DateTime.Now.AddDays(2) });
table.Rows.Add(new object[] { 3, 1, "Task 3", DateTime.Now.AddDays(2), DateTime.Now.AddDays(3) });
return table;
}
}
}