Raporlarda Türkçe karakter parametresi düzeltildi.
This commit is contained in:
parent
63951b8b7e
commit
9e76ab5b4e
4 changed files with 30 additions and 25 deletions
|
|
@ -1436,11 +1436,6 @@
|
|||
"Name": "Finans",
|
||||
"ParentName": "Yönetim"
|
||||
},
|
||||
{
|
||||
"Id": "63dc7ed1-81f2-4c5a-9d8b-0a1b2c3d4e5f",
|
||||
"Name": "Muhasebe",
|
||||
"ParentName": "Finans"
|
||||
},
|
||||
{
|
||||
"Id": "3cd38ab3-7e6f-4b8d-9c0a-5f4e3d2c1b0a",
|
||||
"Name": "Bilgi İşlem",
|
||||
|
|
@ -1453,30 +1448,12 @@
|
|||
"DepartmentName": "Yönetim",
|
||||
"Name": "Genel Müdür"
|
||||
},
|
||||
{
|
||||
"Id": "b7c8d9e0-f1a2-4b3c-8d9e-0f1a2b3c4d5e",
|
||||
"DepartmentName": "Muhasebe",
|
||||
"Name": "Muhasebe Müdürü",
|
||||
"ParentName": "Genel Müdür"
|
||||
},
|
||||
{
|
||||
"Id": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f",
|
||||
"DepartmentName": "Muhasebe",
|
||||
"Name": "Muhasebe Şefi",
|
||||
"ParentName": "Muhasebe Müdürü"
|
||||
},
|
||||
{
|
||||
"Id": "b7c8d9e0-f1a2-4b3c-8d9e-0f1a2b3c4d2e",
|
||||
"DepartmentName": "Bilgi İşlem",
|
||||
"Name": "Bilgi İşlem Müdürü",
|
||||
"ParentName": "Genel Müdür"
|
||||
},
|
||||
{
|
||||
"Id": "b7c8d9e0-f1a2-4b3c-1d9e-0f1a2b3c4d2e",
|
||||
"DepartmentName": "Finans",
|
||||
"Name": "Finans Müdürü",
|
||||
"ParentName": "Genel Müdür"
|
||||
},
|
||||
{
|
||||
"Id": "b7c8d9e0-f1b2-4b3c-1d9e-0f1a2b3c4d2e",
|
||||
"DepartmentName": "Satış",
|
||||
|
|
@ -1494,6 +1471,24 @@
|
|||
"DepartmentName": "Üretim",
|
||||
"Name": "Üretim Müdürü",
|
||||
"ParentName": "Genel Müdür"
|
||||
},
|
||||
{
|
||||
"Id": "b7c8d9e0-f1a2-4b3c-1d9e-0f1a2b3c4d2e",
|
||||
"DepartmentName": "Finans",
|
||||
"Name": "Finans Müdürü",
|
||||
"ParentName": "Genel Müdür"
|
||||
},
|
||||
{
|
||||
"Id": "b7c8d9e0-f1a2-4b3c-8d9e-0f1a2b3c4d5e",
|
||||
"DepartmentName": "Finans",
|
||||
"Name": "Muhasebe Müdürü",
|
||||
"ParentName": "Finans Müdürü"
|
||||
},
|
||||
{
|
||||
"Id": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f",
|
||||
"DepartmentName": "Finans",
|
||||
"Name": "Muhasebe Şefi",
|
||||
"ParentName": "Muhasebe Müdürü"
|
||||
}
|
||||
],
|
||||
"Announcements": [
|
||||
|
|
|
|||
|
|
@ -720,7 +720,7 @@ public class DynamicFormReport : XtraReport
|
|||
|
||||
private static string CreateFilter(string fieldName, string op, object value)
|
||||
{
|
||||
return JsonSerializer.Serialize(new object[] { fieldName, op, value });
|
||||
return DynamicReportImageHelper.SerializeJson(new object[] { fieldName, op, value });
|
||||
}
|
||||
|
||||
private static IDictionary<string, object> GetFirstRow(IEnumerable<dynamic> rows)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.Data;
|
|||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -37,6 +38,10 @@ internal static class DynamicReportImageHelper
|
|||
private static readonly Regex ReportPagingRegex = new(
|
||||
@"\s+OFFSET\s+\d+\s+ROWS(?:\s+FETCH\s+NEXT\s+\d+\s+ROWS\s+ONLY)?\s*$",
|
||||
RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.Compiled);
|
||||
private static readonly JsonSerializerOptions ReportJsonSerializerOptions = new()
|
||||
{
|
||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
||||
};
|
||||
private static readonly HttpClient HttpClient = new(new HttpClientHandler
|
||||
{
|
||||
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
|
||||
|
|
@ -402,6 +407,11 @@ internal static class DynamicReportImageHelper
|
|||
string.Equals(value, "1", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public static string SerializeJson<T>(T value)
|
||||
{
|
||||
return JsonSerializer.Serialize(value, ReportJsonSerializerOptions);
|
||||
}
|
||||
|
||||
public static string GetImageBaseUrl(IConfiguration configuration)
|
||||
{
|
||||
return configuration["App:CdnUrl"] ?? configuration["App:SelfUrl"];
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ public class DynamicTreeReport : XtraReport
|
|||
var dataSource = new JsonDataSource
|
||||
{
|
||||
Name = TreeDataSourceName,
|
||||
JsonSource = new CustomJsonSource(JsonSerializer.Serialize(normalizedRows))
|
||||
JsonSource = new CustomJsonSource(DynamicReportImageHelper.SerializeJson(normalizedRows))
|
||||
};
|
||||
dataSource.Fill();
|
||||
ComponentStorage.Add(dataSource);
|
||||
|
|
|
|||
Loading…
Reference in a new issue