Skip to content

Commit 4a58993

Browse files
Merge pull request #7 from Parthiban-palanivel/BLAZ-30829-repo
feature(BLAZ-30829):save and load report from SQL database to pivot table blazor sample changes added.
2 parents c20fcfa + 1526662 commit 4a58993

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Blazor/MyBlazorServerApp/MyBlazorServerApp/Pages/Index.razor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
public async Task SaveReport(SaveReportArgs args)
5656
{
5757
string url = "https://localhost:44313/Pivot/SaveReport";
58-
var data = new { ReportName = args.ReportName, Report = args.Report };
58+
var data = new { reportName = args.ReportName, report = args.Report };
5959
HttpContent content = new StringContent(JsonSerializer.Serialize(data), System.Text.Encoding.UTF8, "application/json");
6060

6161
using (HttpClient httpClient = new HttpClient())
@@ -67,7 +67,7 @@
6767
public async Task FetchReport(FetchReportArgs args)
6868
{
6969
string url = "https://localhost:44313/Pivot/FetchReport";
70-
var data = new { ReportName = args.ReportName };
70+
var data = new { reportName = args.ReportName };
7171
HttpContent content = new StringContent(JsonSerializer.Serialize(data), System.Text.Encoding.UTF8, "application/json");
7272
List<string> reportNames = new List<string>();
7373
using (HttpClient httpClient = new HttpClient())
@@ -86,7 +86,7 @@
8686
public async Task LoadReport(LoadReportArgs args)
8787
{
8888
string url = "https://localhost:44313/Pivot/LoadReport";
89-
var data = new { ReportName = args.ReportName };
89+
var data = new { reportName = args.ReportName };
9090
HttpContent content = new StringContent(JsonSerializer.Serialize(data), System.Text.Encoding.UTF8, "application/json");
9191
string responseText = string.Empty;
9292
using (HttpClient httpClient = new HttpClient())
@@ -105,7 +105,7 @@
105105
public async Task RemoveReport(RemoveReportArgs args)
106106
{
107107
string url = "https://localhost:44313/Pivot/RemoveReport";
108-
var data = new { ReportName = args.ReportName };
108+
var data = new { reportName = args.ReportName };
109109
HttpContent content = new StringContent(JsonSerializer.Serialize(data), System.Text.Encoding.UTF8, "application/json");
110110

111111
using (HttpClient httpClient = new HttpClient())

MyWebService/Controllers/PivotController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void RemoveReport([FromBody] Dictionary<string, string> reportArgs)
3131
[Route("Pivot/RenameReport")]
3232
public void RenameReport([FromBody] RenameReportDB reportArgs)
3333
{
34-
RenameReportInDB(reportArgs.ReportName, reportArgs.RenameReport, reportArgs.isReportExists);
34+
RenameReportInDB(reportArgs.ReportName, reportArgs.RenameReport, reportArgs.IsReportExists);
3535
}
3636

3737
[HttpPost]
@@ -45,7 +45,7 @@ public class RenameReportDB
4545
{
4646
public string ReportName { get; set; }
4747
public string RenameReport { get; set; }
48-
public bool isReportExists { get; set; }
48+
public bool IsReportExists { get; set; }
4949
}
5050

5151
private void SaveReportToDB(string reportName, string report)

0 commit comments

Comments
 (0)