root/TaskScheduler/TaskScheduler/TaskScheduler/Default.aspx.cs
| 4 | 5 | ||
|---|---|---|---|
15 | 15 | ||
16 | protected void Page_Load(object sender, EventArgs e) | 16 | protected void Page_Load(object sender, EventArgs e) |
17 | { | 17 | { |
18 | var printTask = taskManager.TaskList.Find(t => t.Id.GetValueOrDefault() == 1); | 18 | Task printTask = taskManager.TaskList.Find(t => t.Id.GetValueOrDefault() == 1); |
19 | 19 | ||
20 | lblStatus.Text = printTask != null ? (printTask.Active ? "Active" : "InActive") : "Task not found"; | 20 | lblStatus.Text = printTask != null ? (printTask.Active ? "Active" : "InActive") : "Task not found"; |
21 | } | 21 | } |
... | ... | ||
24 | { | 24 | { |
25 | taskManager.TaskList.Add(new PrintTask {Active = true, Id = 1, Name = "PrintTask1"}); | 25 | taskManager.TaskList.Add(new PrintTask {Active = true, Id = 1, Name = "PrintTask1"}); |
26 | taskManager.TaskList.Add(new PrintTaskOther {Active = true, Id = 2, Name = "PrintTaskOther2"}); | 26 | taskManager.TaskList.Add(new PrintTaskOther {Active = true, Id = 2, Name = "PrintTaskOther2"}); |
27 | taskManager.TaskList.Add(new PrintTask {Active = true, Id = 3, Name = "PrintTask3"}); | 27 | //taskManager.TaskList.Add(new PrintTask {Active = true, Id = 3, Name = "PrintTask3"}); |
28 | taskManager.TaskList.Add(new PrintTask {Active = true, Id = 4, Name = "PrintTask4"}); | 28 | //taskManager.TaskList.Add(new PrintTask {Active = true, Id = 4, Name = "PrintTask4"}); |
29 | taskManager.TaskList.Add(new PrintTaskOther {Active = true, Id = 5, Name = "PrintTaskOther5"}); | 29 | //taskManager.TaskList.Add(new PrintTaskOther {Active = true, Id = 5, Name = "PrintTaskOther5"}); |
30 | |||
31 | taskManager.TaskList.Add(new ServiceUpTask {Active = true, Id = 5, Name = "UnitTestServiceUpTask", ServiceName = "Telnet"}); | ||
30 | } | 32 | } |
31 | } | 33 | } |
32 | } | 34 | } |
Download diff