Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ASP.NET Core/ASP.NET Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</Target>

<ItemGroup>
<PackageReference Include="DevExtreme.AspNet.Core" Version="25.1.*" />
<PackageReference Include="DevExtreme.AspNet.Core" Version="25.1.3" />
</ItemGroup>

</Project>
18 changes: 18 additions & 0 deletions ASP.NET Core/Controllers/SampleDataController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,22 @@ public object Get(DataSourceLoadOptions loadOptions) {
return DataSourceLoader.Load(SampleData.Orders, loadOptions);
}

[HttpGet]
[Route("GetTasks")]
public object GetTasks(DataSourceLoadOptions loadOptions) {
return DataSourceLoader.Load(TaskData.Tasks, loadOptions);
}

[HttpGet]
[Route("GetEmployees")]
public object GetEmployees(DataSourceLoadOptions loadOptions) {
return DataSourceLoader.Load(TaskData.Employees, loadOptions);
}

[HttpGet]
[Route("GetPriorities")]
public object GetPriorities(DataSourceLoadOptions loadOptions) {
return DataSourceLoader.Load(TaskData.Priorities, loadOptions);
}

}
20 changes: 0 additions & 20 deletions ASP.NET Core/Controllers/orig_PriorityController.cs

This file was deleted.

42 changes: 0 additions & 42 deletions ASP.NET Core/Controllers/orig_SampleDataController.cs

This file was deleted.

164 changes: 164 additions & 0 deletions ASP.NET Core/Models/TaskModels.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
using System;
using System.Collections.Generic;

namespace ASP_NET_Core.Models;

public class TaskItem
{
public int Task_ID { get; set; }
public int Task_Parent_ID { get; set; }
public int Task_Assigned_Employee_ID { get; set; }
public int Task_Completion { get; set; }
public int Task_Priority { get; set; }
public string Task_Status { get; set; } = string.Empty;
public string Task_Subject { get; set; } = string.Empty;
public DateTime Task_Start_Date { get; set; }
public DateTime Task_Due_Date { get; set; }
}

public class Employee
{
public int ID { get; set; }
public string Name { get; set; } = string.Empty;
public string Picture { get; set; } = string.Empty;
}

public class Priority
{
public int id { get; set; }
public string value { get; set; } = string.Empty;
}

public static class TaskData
{
public static List<TaskItem> Tasks = new List<TaskItem>
{
new TaskItem
{
Task_ID = 1,
Task_Assigned_Employee_ID = 1,
Task_Subject = "Plans 2015",
Task_Start_Date = new DateTime(2015, 1, 1),
Task_Due_Date = new DateTime(2015, 4, 1),
Task_Status = "Completed",
Task_Priority = 4,
Task_Completion = 100,
Task_Parent_ID = 0
},
new TaskItem
{
Task_ID = 2,
Task_Assigned_Employee_ID = 2,
Task_Subject = "Health Insurance",
Task_Start_Date = new DateTime(2015, 2, 12),
Task_Due_Date = new DateTime(2015, 5, 30),
Task_Status = "In Progress",
Task_Priority = 4,
Task_Completion = 75,
Task_Parent_ID = 0
},
new TaskItem
{
Task_ID = 3,
Task_Assigned_Employee_ID = 4,
Task_Subject = "New Brochures",
Task_Start_Date = new DateTime(2015, 2, 17),
Task_Due_Date = new DateTime(2015, 3, 1),
Task_Status = "Completed",
Task_Priority = 3,
Task_Completion = 100,
Task_Parent_ID = 0
},
new TaskItem
{
Task_ID = 4,
Task_Assigned_Employee_ID = 31,
Task_Subject = "Training",
Task_Start_Date = new DateTime(2015, 3, 2),
Task_Due_Date = new DateTime(2015, 6, 29),
Task_Status = "Completed",
Task_Priority = 3,
Task_Completion = 100,
Task_Parent_ID = 0
},
new TaskItem
{
Task_ID = 5,
Task_Assigned_Employee_ID = 5,
Task_Subject = "NDA",
Task_Start_Date = new DateTime(2015, 3, 12),
Task_Due_Date = new DateTime(2015, 5, 1),
Task_Status = "In Progress",
Task_Priority = 3,
Task_Completion = 90,
Task_Parent_ID = 0
},
new TaskItem
{
Task_ID = 28,
Task_Assigned_Employee_ID = 7,
Task_Subject = "Prepare 2015 Financial",
Task_Start_Date = new DateTime(2015, 1, 15),
Task_Due_Date = new DateTime(2015, 1, 31),
Task_Status = "Completed",
Task_Priority = 4,
Task_Completion = 100,
Task_Parent_ID = 1
},
new TaskItem
{
Task_ID = 29,
Task_Assigned_Employee_ID = 4,
Task_Subject = "Prepare 2015 Marketing Plan",
Task_Start_Date = new DateTime(2015, 1, 1),
Task_Due_Date = new DateTime(2015, 1, 31),
Task_Status = "Completed",
Task_Priority = 4,
Task_Completion = 100,
Task_Parent_ID = 1
},
new TaskItem
{
Task_ID = 30,
Task_Assigned_Employee_ID = 2,
Task_Subject = "Review Health Insurance Options Under the Affordable Care Act",
Task_Start_Date = new DateTime(2015, 2, 12),
Task_Due_Date = new DateTime(2015, 4, 25),
Task_Status = "In Progress",
Task_Priority = 4,
Task_Completion = 50,
Task_Parent_ID = 2
},
new TaskItem
{
Task_ID = 31,
Task_Assigned_Employee_ID = 1,
Task_Subject = "Choose between PPO and HMO Health Plan",
Task_Start_Date = new DateTime(2015, 2, 15),
Task_Due_Date = new DateTime(2015, 4, 15),
Task_Status = "In Progress",
Task_Priority = 4,
Task_Completion = 75,
Task_Parent_ID = 2
}
};

public static List<Employee> Employees = new List<Employee>
{
new Employee { ID = 1, Name = "John Heart", Picture = "images/employees/01.png" },
new Employee { ID = 2, Name = "Samantha Bright", Picture = "images/employees/04.png" },
new Employee { ID = 3, Name = "Arthur Miller", Picture = "images/employees/02.png" },
new Employee { ID = 4, Name = "Robert Reagan", Picture = "images/employees/03.png" },
new Employee { ID = 5, Name = "Greta Sims", Picture = "images/employees/06.png" },
new Employee { ID = 7, Name = "Sandra Johnson", Picture = "images/employees/08.png" },
new Employee { ID = 31, Name = "Nat Maguiree", Picture = "images/employees/34.png" }
};

public static List<Priority> Priorities = new List<Priority>
{
new Priority { id = 1, value = "Low" },
new Priority { id = 2, value = "Normal" },
new Priority { id = 3, value = "High" },
new Priority { id = 4, value = "Urgent" }
};
}
14 changes: 0 additions & 14 deletions ASP.NET Core/Models/orig_Employee.cs

This file was deleted.

Loading
Loading