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