Skip to content

Commit 4776ca1

Browse files
Update to 25.1.3+
1 parent ceeac84 commit 4776ca1

31 files changed

+58895
-24
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29911.84
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PivotGrid - Editing using DataGrid", "PivotGrid - Editing using DataGrid\PivotGrid - Editing using DataGrid.csproj", "{21607891-4FB3-4902-99B6-BE0812F2DD2E}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DevExtreme NuGet.config", "DevExtreme NuGet.config", "{73C29BE6-BF40-4A30-8B64-70B2D7E4AEC0}"
9+
ProjectSection(SolutionItems) = preProject
10+
NuGet.config = NuGet.config
11+
EndProjectSection
12+
EndProject
13+
Global
14+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
15+
Debug|Any CPU = Debug|Any CPU
16+
Release|Any CPU = Release|Any CPU
17+
EndGlobalSection
18+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19+
{21607891-4FB3-4902-99B6-BE0812F2DD2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{21607891-4FB3-4902-99B6-BE0812F2DD2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{21607891-4FB3-4902-99B6-BE0812F2DD2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{21607891-4FB3-4902-99B6-BE0812F2DD2E}.Release|Any CPU.Build.0 = Release|Any CPU
23+
EndGlobalSection
24+
GlobalSection(SolutionProperties) = preSolution
25+
HideSolutionNode = FALSE
26+
EndGlobalSection
27+
GlobalSection(ExtensibilityGlobals) = postSolution
28+
SolutionGuid = {D5AD80B3-BA94-4A96-AE29-1AE742E0DB17}
29+
EndGlobalSection
30+
EndGlobal
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
namespace PivotGrid___Editing_using_DataGrid.Controllers
8+
{
9+
public class HomeController : Controller
10+
{
11+
public IActionResult Index()
12+
{
13+
return View();
14+
}
15+
16+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
17+
public IActionResult Error() {
18+
return View();
19+
}
20+
}
21+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Net;
5+
using System.Net.Http;
6+
using PivotGrid___Editing_using_DataGrid.Models;
7+
using DevExtreme.AspNet.Data;
8+
using DevExtreme.AspNet.Mvc;
9+
using Microsoft.AspNetCore.Mvc;
10+
using Newtonsoft.Json;
11+
12+
namespace PivotGrid___Editing_using_DataGrid.Controllers {
13+
14+
[Route("api/[controller]/[action]")]
15+
public class SampleDataController : Controller {
16+
17+
[HttpGet]
18+
public object Get(DataSourceLoadOptions loadOptions) {
19+
return DataSourceLoader.Load(SampleData.Sales, loadOptions);
20+
}
21+
22+
[HttpPost]
23+
public ActionResult InsertSale(string values) {
24+
var newSale = new Sale();
25+
JsonConvert.PopulateObject(values, newSale);
26+
27+
SampleData.Sales.Add(newSale);
28+
29+
return Ok(true);
30+
}
31+
32+
[HttpPut]
33+
public ActionResult UpdateSale(int key, string values) {
34+
var sale = SampleData.Sales.Find(s => s.OrderId == key);
35+
JsonConvert.PopulateObject(values, sale);
36+
37+
return Ok(true);
38+
}
39+
40+
[HttpDelete]
41+
public ActionResult DeleteSale(int key) {
42+
Sale sale = SampleData.Sales.Find(s => s.OrderId == key);
43+
44+
SampleData.Sales.Remove(sale);
45+
46+
return Ok(true);
47+
}
48+
}
49+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
6+
namespace PivotGrid___Editing_using_DataGrid.Models
7+
{
8+
public class Sale
9+
{
10+
public int OrderId { get; set; }
11+
public string Region { get; set; }
12+
public string Country { get; set; }
13+
public string City { get; set; }
14+
public int Amount { get; set; }
15+
public DateTime Date { get; set; }
16+
}
17+
}

0 commit comments

Comments
 (0)