DynamicReport düzenlemesi
This commit is contained in:
parent
16036ce7f9
commit
62118406c2
4 changed files with 28 additions and 10 deletions
|
|
@ -4288,7 +4288,25 @@
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.ListFormField.Filter",
|
"key": "ListForms.ListFormField.Filter",
|
||||||
"en": "Filter",
|
"en": "Filter",
|
||||||
"tr": "Filtrele"
|
"tr": "Filtre"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.ListFormField.Sorting",
|
||||||
|
"en": "Sorting",
|
||||||
|
"tr": "Sıralama"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.ListFormField.Sorting_Ascending",
|
||||||
|
"en": "Ascending",
|
||||||
|
"tr": "Artan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.ListFormField.Sorting_Descending",
|
||||||
|
"en": "Descending",
|
||||||
|
"tr": "Azalan"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
|
||||||
|
|
@ -1664,7 +1664,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.Guid,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "CategoryId",
|
FieldName = "CategoryId",
|
||||||
CaptionName = "App.Listform.ListformField.CategoryId",
|
CaptionName = "App.Listform.ListformField.CategoryId",
|
||||||
Width = 0,
|
Width = 0,
|
||||||
|
|
|
||||||
|
|
@ -345,16 +345,16 @@ internal static class DynamicReportImageHelper
|
||||||
var parts = new List<string>();
|
var parts = new List<string>();
|
||||||
var fieldCaptions = CreateFieldCaptionMap(fields, localizer);
|
var fieldCaptions = CreateFieldCaptionMap(fields, localizer);
|
||||||
var filterText = FormatFilterText(filter, fieldCaptions);
|
var filterText = FormatFilterText(filter, fieldCaptions);
|
||||||
var sortText = FormatSortText(sort, fieldCaptions);
|
var sortText = FormatSortText(sort, fieldCaptions, localizer);
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(filterText))
|
if (!string.IsNullOrWhiteSpace(filterText))
|
||||||
{
|
{
|
||||||
parts.Add("Filtre: " + filterText);
|
parts.Add(localizer["ListForms.ListFormField.Filter"] + ": " + filterText);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(sortText))
|
if (!string.IsNullOrWhiteSpace(sortText))
|
||||||
{
|
{
|
||||||
parts.Add("Sıralama: " + sortText);
|
parts.Add(localizer["ListForms.ListFormField.Sorting"] + ": " + sortText);
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Join(" | ", parts);
|
return string.Join(" | ", parts);
|
||||||
|
|
@ -736,7 +736,7 @@ internal static class DynamicReportImageHelper
|
||||||
StringComparer.OrdinalIgnoreCase);
|
StringComparer.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string FormatSortText(string sort, IReadOnlyDictionary<string, string> fieldCaptions)
|
private static string FormatSortText(string sort, IReadOnlyDictionary<string, string> fieldCaptions, IStringLocalizer<PlatformResource> localizer)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(sort))
|
if (string.IsNullOrWhiteSpace(sort))
|
||||||
{
|
{
|
||||||
|
|
@ -756,8 +756,8 @@ internal static class DynamicReportImageHelper
|
||||||
var fieldName = parts[0].Trim('"');
|
var fieldName = parts[0].Trim('"');
|
||||||
var direction = parts.Length > 1 ? parts[1] : "asc";
|
var direction = parts.Length > 1 ? parts[1] : "asc";
|
||||||
var directionText = string.Equals(direction, "desc", StringComparison.OrdinalIgnoreCase)
|
var directionText = string.Equals(direction, "desc", StringComparison.OrdinalIgnoreCase)
|
||||||
? "azalan"
|
? localizer["ListForms.ListFormField.Sorting_Descending"]
|
||||||
: "artan";
|
: localizer["ListForms.ListFormField.Sorting_Ascending"];
|
||||||
|
|
||||||
return $"{GetFieldCaption(fieldName, fieldCaptions)} {directionText}";
|
return $"{GetFieldCaption(fieldName, fieldCaptions)} {directionText}";
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,7 @@ public class CustomReportStorageWebExtension : DevExpress.XtraReports.Web.Extens
|
||||||
|
|
||||||
using var scope = _serviceProvider.CreateScope();
|
using var scope = _serviceProvider.CreateScope();
|
||||||
var currentUser = scope.ServiceProvider.GetService<ICurrentUser>();
|
var currentUser = scope.ServiceProvider.GetService<ICurrentUser>();
|
||||||
userNameLabel.Text = currentUser?.Name ?? currentUser?.UserName ?? string.Empty;
|
userNameLabel.Text = currentUser?.UserName ?? string.Empty;
|
||||||
userNameLabel.BoundsF = new System.Drawing.RectangleF(0, 8, pageWidth / 2, 18);
|
userNameLabel.BoundsF = new System.Drawing.RectangleF(0, 8, pageWidth / 2, 18);
|
||||||
userNameLabel.Font = new DevExpress.Drawing.DXFont("Arial", 7.5F);
|
userNameLabel.Font = new DevExpress.Drawing.DXFont("Arial", 7.5F);
|
||||||
userNameLabel.TextAlignment = TextAlignment.MiddleLeft;
|
userNameLabel.TextAlignment = TextAlignment.MiddleLeft;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue