From 8fd2d58c0f629af466df87dd8b03a17d9c44ceb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Sun, 7 Dec 2025 01:03:53 +0300 Subject: [PATCH] =?UTF-8?q?Before=20ve=20After=20Command=20=C3=87al=C4=B1?= =?UTF-8?q?=C5=9Ft=C4=B1r=C4=B1ld=C4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GridOptionsDto/GridOptionsEditDto.cs | 12 ++--- .../Administration/ListFormsAppService.cs | 12 ++--- .../ListForms/ListFormDataAppService.cs | 18 +++++-- .../Seeds/LanguagesData.json | 12 ++--- .../Enums/OperationEnum.cs | 6 +++ .../Entities/Host/ListForm.cs | 12 ++--- .../Queries/QueryManager.cs | 51 ++++++++++++++++++- ....cs => 20251206210148_Initial.Designer.cs} | 38 +++++++------- ...9_Initial.cs => 20251206210148_Initial.cs} | 12 ++--- .../PlatformDbContextModelSnapshot.cs | 36 ++++++------- ui/src/proxy/form/models.ts | 12 ++--- .../listForm/edit/FormTabDatabaseDelete.tsx | 20 ++++---- .../listForm/edit/FormTabDatabaseInsert.tsx | 20 ++++---- .../listForm/edit/FormTabDatabaseUpdate.tsx | 22 ++++---- 14 files changed, 172 insertions(+), 111 deletions(-) rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251206194239_Initial.Designer.cs => 20251206210148_Initial.Designer.cs} (99%) rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251206194239_Initial.cs => 20251206210148_Initial.cs} (99%) diff --git a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsEditDto.cs b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsEditDto.cs index 94c44615..17958327 100644 --- a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsEditDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsEditDto.cs @@ -33,8 +33,8 @@ public class GridOptionsEditDto : GridOptionsDto } public string DeleteCommand { get; set; } - public string BeforeDeleteCommand { get; set; } - public string AfterDeleteCommand { get; set; } + public string DeleteBeforeCommand { get; set; } + public string DeleteAfterCommand { get; set; } [JsonIgnore] public string DeleteFieldsDefaultValueJson { get; set; } public List DeleteFieldsDefaultValueDto @@ -50,8 +50,8 @@ public class GridOptionsEditDto : GridOptionsDto } public string InsertCommand { get; set; } - public string BeforeInsertCommand { get; set; } - public string AfterInsertCommand { get; set; } + public string InsertBeforeCommand { get; set; } + public string InsertAfterCommand { get; set; } [JsonIgnore] public string InsertFieldsDefaultValueJson { get; set; } public List InsertFieldsDefaultValueDto @@ -67,8 +67,8 @@ public class GridOptionsEditDto : GridOptionsDto } public string UpdateCommand { get; set; } - public string BeforeUpdateCommand { get; set; } - public string AfterUpdateCommand { get; set; } + public string UpdateBeforeCommand { get; set; } + public string UpdateAfterCommand { get; set; } [JsonIgnore] public string UpdateFieldsDefaultValueJson { get; set; } public List UpdateFieldsDefaultValueDto diff --git a/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs b/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs index ada197fa..39c019ba 100644 --- a/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs +++ b/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs @@ -94,22 +94,22 @@ public class ListFormsAppService : CrudAppService< { item.InsertServiceAddress = input.InsertServiceAddress; item.InsertCommand = input.InsertCommand; - item.BeforeInsertCommand = input.BeforeInsertCommand; - item.AfterInsertCommand = input.AfterInsertCommand; + item.InsertBeforeCommand = input.InsertBeforeCommand; + item.InsertAfterCommand = input.InsertAfterCommand; } else if (input.EditType == ListFormEditTabs.Database.Update.UpdateForm) { item.UpdateServiceAddress = input.UpdateServiceAddress; item.UpdateCommand = input.UpdateCommand; - item.BeforeUpdateCommand = input.BeforeUpdateCommand; - item.AfterUpdateCommand = input.AfterUpdateCommand; + item.UpdateBeforeCommand = input.UpdateBeforeCommand; + item.UpdateAfterCommand = input.UpdateAfterCommand; } else if (input.EditType == ListFormEditTabs.Database.Delete.DeleteForm) { item.DeleteServiceAddress = input.DeleteServiceAddress; item.DeleteCommand = input.DeleteCommand; - item.BeforeDeleteCommand = input.BeforeDeleteCommand; - item.AfterDeleteCommand = input.AfterDeleteCommand; + item.DeleteBeforeCommand = input.DeleteBeforeCommand; + item.DeleteAfterCommand = input.DeleteAfterCommand; } else if (input.EditType == ListFormEditTabs.PermissionForm) { diff --git a/api/src/Erp.Platform.Application/ListForms/ListFormDataAppService.cs b/api/src/Erp.Platform.Application/ListForms/ListFormDataAppService.cs index bd362fdc..b9c23fae 100644 --- a/api/src/Erp.Platform.Application/ListForms/ListFormDataAppService.cs +++ b/api/src/Erp.Platform.Application/ListForms/ListFormDataAppService.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using System.Threading.Tasks; using Erp.Platform.Enums; using Erp.Platform.Localization; @@ -31,7 +32,10 @@ public class ListFormDataAppService : PlatformAppService if (!await authManager.CanAccess(input.ListFormCode, AuthorizationTypeEnum.Create)) throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.NoAuth]); - var queryParameters = httpContextAccessor.HttpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value); + var httpContext = httpContextAccessor.HttpContext + ?? throw new InvalidOperationException("HTTP Context bulunamadı."); + + var queryParameters = httpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value); return await qManager.GenerateAndRunQueryAsync(input.ListFormCode, OperationEnum.Insert, input.Data, queryParameters: queryParameters); } @@ -41,7 +45,10 @@ public class ListFormDataAppService : PlatformAppService if (!await authManager.CanAccess(input.ListFormCode, AuthorizationTypeEnum.Update)) throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.NoAuth]); - var queryParameters = httpContextAccessor.HttpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value); + var httpContext = httpContextAccessor.HttpContext + ?? throw new InvalidOperationException("HTTP Context bulunamadı."); + + var queryParameters = httpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value); return await qManager.GenerateAndRunQueryAsync(input.ListFormCode, OperationEnum.Update, input.Data, input.Keys, queryParameters); } @@ -51,7 +58,10 @@ public class ListFormDataAppService : PlatformAppService if (!await authManager.CanAccess(input.ListFormCode, AuthorizationTypeEnum.Delete)) throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.NoAuth]); - var queryParameters = httpContextAccessor.HttpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value); + var httpContext = httpContextAccessor.HttpContext + ?? throw new InvalidOperationException("HTTP Context bulunamadı."); + + var queryParameters = httpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value); return await qManager.GenerateAndRunQueryAsync(input.ListFormCode, OperationEnum.Delete, input.Data, input.Keys, queryParameters); } } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json index 56851b94..e5edaaf6 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json @@ -4035,13 +4035,13 @@ }, { "resourceName": "Platform", - "key": "ListForms.ListFormEdit.BeforeDatabaseInsertCommand", + "key": "ListForms.ListFormEdit.DatabaseInsertBeforeCommand", "en": "Before Insert Command", "tr": "Before Insert T-Sql" }, { "resourceName": "Platform", - "key": "ListForms.ListFormEdit.AfterDatabaseInsertCommand", + "key": "ListForms.ListFormEdit.DatabaseInsertAfterCommand", "en": "After Insert Command", "tr": "After Insert T-Sql" }, @@ -4107,13 +4107,13 @@ }, { "resourceName": "Platform", - "key": "ListForms.ListFormEdit.BeforeDatabaseUpdateCommand", + "key": "ListForms.ListFormEdit.DatabaseUpdateBeforeCommand", "en": "Before Update Command", "tr": "Before Update T-Sql" }, { "resourceName": "Platform", - "key": "ListForms.ListFormEdit.AfterDatabaseUpdateCommand", + "key": "ListForms.ListFormEdit.DatabaseUpdateAfterCommand", "en": "After Update Command", "tr": "After Update T-Sql" }, @@ -4143,13 +4143,13 @@ }, { "resourceName": "Platform", - "key": "ListForms.ListFormEdit.BeforeDatabaseDeleteCommand", + "key": "ListForms.ListFormEdit.DatabaseDeleteBeforeCommand", "en": "Before Delete Command", "tr": "Before Delete T-Sql" }, { "resourceName": "Platform", - "key": "ListForms.ListFormEdit.AfterDatabaseDeleteCommand", + "key": "ListForms.ListFormEdit.DatabaseDeleteAfterCommand", "en": "After Delete Command", "tr": "After Delete T-Sql" }, diff --git a/api/src/Erp.Platform.Domain.Shared/Enums/OperationEnum.cs b/api/src/Erp.Platform.Domain.Shared/Enums/OperationEnum.cs index 0733ac92..bfa055e8 100644 --- a/api/src/Erp.Platform.Domain.Shared/Enums/OperationEnum.cs +++ b/api/src/Erp.Platform.Domain.Shared/Enums/OperationEnum.cs @@ -3,8 +3,14 @@ public enum OperationEnum { Insert, + InsertBefore, + InsertAfter, Update, + UpdateBefore, + UpdateAfter, Delete, + DeleteBefore, + DeleteAfter, Select } diff --git a/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs b/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs index f18d5f87..62d41e91 100644 --- a/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs +++ b/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs @@ -67,24 +67,24 @@ public class ListForm : FullAuditedEntity /// Silme yapilacak harici sorgu. icerisinde @ID, @USERID, @USERNAME, @ROLES anahtarlari kullanilabilir. /// public string DeleteCommand { get; set; } - public string BeforeDeleteCommand { get; set; } - public string AfterDeleteCommand { get; set; } + public string DeleteBeforeCommand { get; set; } + public string DeleteAfterCommand { get; set; } /// Guncelleme yapilacak harici sorgu. /// icerisinde @ID, @USERID, @USERNAME, @ROLES ozel anahtarlari kullanilabilir. /// ilaveten tabloya ait butun alanlar icin FieldName onune @ isareti eklenerek guncellenebilir. /// ornegin tablodaki Ad alanini guncellemek icin '@Ad' yazildiginda bu kisim ekrandan gelen deger ile degistirilir /// public string UpdateCommand { get; set; } - public string BeforeUpdateCommand { get; set; } - public string AfterUpdateCommand { get; set; } + public string UpdateBeforeCommand { get; set; } + public string UpdateAfterCommand { get; set; } /// insert yapacak harici sorgu. /// icerisinde @USERID, @USERNAME ozel anahtarlari kullanilabilir. /// ilaveten tabloya ait butun alanlar icin FieldName onune @ isareti eklenerek guncellenebilir. /// ornegin tablodaki Ad alanini guncellemek icin '@Ad' yazildiginda bu kisim ekrandan gelen deger ile degistirilir /// public string InsertCommand { get; set; } - public string BeforeInsertCommand { get; set; } - public string AfterInsertCommand { get; set; } + public string InsertBeforeCommand { get; set; } + public string InsertAfterCommand { get; set; } /// Guncelleme islemini yapacak servis adresi /// diff --git a/api/src/Erp.Platform.Domain/Queries/QueryManager.cs b/api/src/Erp.Platform.Domain/Queries/QueryManager.cs index 013e8b6b..91d4ab8d 100644 --- a/api/src/Erp.Platform.Domain/Queries/QueryManager.cs +++ b/api/src/Erp.Platform.Domain/Queries/QueryManager.cs @@ -92,11 +92,52 @@ public class QueryManager : PlatformDomainService, IQueryManager // TODO: Log if (op == OperationEnum.Insert) { - return await dynamicDataRepository.ExecuteScalarAsync(sql, connectionString, parameters); + if (!string.IsNullOrEmpty(listForm.InsertBeforeCommand)) + { + var beforeSql = GenerateQuery(listForm, parameters, OperationEnum.InsertBefore, dataSourceType, keys); + await dynamicDataRepository.ExecuteAsync(beforeSql, connectionString, parameters); + } + + var result = await dynamicDataRepository.ExecuteScalarAsync(sql, connectionString, parameters); + + if (!string.IsNullOrEmpty(listForm.InsertAfterCommand)) + { + var afterSql = GenerateQuery(listForm, parameters, OperationEnum.InsertAfter, dataSourceType, keys); + await dynamicDataRepository.ExecuteAsync(afterSql, connectionString, parameters); + } + + return result; } else if (op == OperationEnum.Update || op == OperationEnum.Delete) { - return (T)(object)await dynamicDataRepository.ExecuteAsync(sql, connectionString, parameters); + // Before komutlari varsa calistir + if (op == OperationEnum.Update && !string.IsNullOrEmpty(listForm.UpdateBeforeCommand)) + { + var beforeSql = GenerateQuery(listForm, parameters, OperationEnum.UpdateBefore, dataSourceType, keys); + await dynamicDataRepository.ExecuteAsync(beforeSql, connectionString, parameters); + } + else if (op == OperationEnum.Delete && !string.IsNullOrEmpty(listForm.DeleteBeforeCommand)) + { + var beforeSql = GenerateQuery(listForm, parameters, OperationEnum.DeleteBefore, dataSourceType, keys); + await dynamicDataRepository.ExecuteAsync(beforeSql, connectionString, parameters); + } + + // Ana komutu calistir + var result = (T)(object)await dynamicDataRepository.ExecuteAsync(sql, connectionString, parameters); + + // After komutlari varsa calistir + if (op == OperationEnum.Update && !string.IsNullOrEmpty(listForm.UpdateAfterCommand)) + { + var afterSql = GenerateQuery(listForm, parameters, OperationEnum.UpdateAfter, dataSourceType, keys); + await dynamicDataRepository.ExecuteAsync(afterSql, connectionString, parameters); + } + else if (op == OperationEnum.Delete && !string.IsNullOrEmpty(listForm.DeleteAfterCommand)) + { + var afterSql = GenerateQuery(listForm, parameters, OperationEnum.DeleteAfter, dataSourceType, keys); + await dynamicDataRepository.ExecuteAsync(afterSql, connectionString, parameters); + } + + return result; } } @@ -113,8 +154,14 @@ public class QueryManager : PlatformDomainService, IQueryManager var command = op switch { OperationEnum.Insert => listForm.InsertCommand, + OperationEnum.InsertBefore => listForm.InsertBeforeCommand, + OperationEnum.InsertAfter => listForm.InsertAfterCommand, OperationEnum.Update => listForm.UpdateCommand, + OperationEnum.UpdateBefore => listForm.UpdateBeforeCommand, + OperationEnum.UpdateAfter => listForm.UpdateAfterCommand, OperationEnum.Delete => listForm.DeleteCommand, + OperationEnum.DeleteBefore => listForm.DeleteBeforeCommand, + OperationEnum.DeleteAfter => listForm.DeleteAfterCommand, _ => "", }; diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206194239_Initial.Designer.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206210148_Initial.Designer.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206194239_Initial.Designer.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206210148_Initial.Designer.cs index d542fe7d..6b8856b9 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206194239_Initial.Designer.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206210148_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Erp.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251206194239_Initial")] + [Migration("20251206210148_Initial")] partial class Initial { /// @@ -6173,15 +6173,6 @@ namespace Erp.Platform.Migrations b.Property("AdaptiveLayoutJson") .HasColumnType("text"); - b.Property("AfterDeleteCommand") - .HasColumnType("nvarchar(max)"); - - b.Property("AfterInsertCommand") - .HasColumnType("nvarchar(max)"); - - b.Property("AfterUpdateCommand") - .HasColumnType("nvarchar(max)"); - b.Property("AnimationJson") .HasColumnType("text"); @@ -6191,15 +6182,6 @@ namespace Erp.Platform.Migrations b.Property("ArgumentAxisJson") .HasColumnType("text"); - b.Property("BeforeDeleteCommand") - .HasColumnType("nvarchar(max)"); - - b.Property("BeforeInsertCommand") - .HasColumnType("nvarchar(max)"); - - b.Property("BeforeUpdateCommand") - .HasColumnType("nvarchar(max)"); - b.Property("ColumnOptionJson") .HasColumnType("text"); @@ -6252,6 +6234,12 @@ namespace Erp.Platform.Migrations b.Property("DefaultFilter") .HasColumnType("text"); + b.Property("DeleteAfterCommand") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleteBeforeCommand") + .HasColumnType("nvarchar(max)"); + b.Property("DeleteCommand") .HasColumnType("text"); @@ -6310,6 +6298,12 @@ namespace Erp.Platform.Migrations b.Property("Height") .HasColumnType("int"); + b.Property("InsertAfterCommand") + .HasColumnType("nvarchar(max)"); + + b.Property("InsertBeforeCommand") + .HasColumnType("nvarchar(max)"); + b.Property("InsertCommand") .HasColumnType("text"); @@ -6456,6 +6450,12 @@ namespace Erp.Platform.Migrations b.Property("TreeOptionJson") .HasColumnType("nvarchar(max)"); + b.Property("UpdateAfterCommand") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateBeforeCommand") + .HasColumnType("nvarchar(max)"); + b.Property("UpdateCommand") .HasColumnType("text"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206194239_Initial.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206210148_Initial.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206194239_Initial.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206210148_Initial.cs index 02ccd6ff..ca2c5848 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206194239_Initial.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251206210148_Initial.cs @@ -2290,14 +2290,14 @@ namespace Erp.Platform.Migrations CommandColumnJson = table.Column(type: "text", nullable: true), StateStoringJson = table.Column(type: "text", nullable: true), DeleteCommand = table.Column(type: "text", nullable: true), - BeforeDeleteCommand = table.Column(type: "nvarchar(max)", nullable: true), - AfterDeleteCommand = table.Column(type: "nvarchar(max)", nullable: true), + DeleteBeforeCommand = table.Column(type: "nvarchar(max)", nullable: true), + DeleteAfterCommand = table.Column(type: "nvarchar(max)", nullable: true), UpdateCommand = table.Column(type: "text", nullable: true), - BeforeUpdateCommand = table.Column(type: "nvarchar(max)", nullable: true), - AfterUpdateCommand = table.Column(type: "nvarchar(max)", nullable: true), + UpdateBeforeCommand = table.Column(type: "nvarchar(max)", nullable: true), + UpdateAfterCommand = table.Column(type: "nvarchar(max)", nullable: true), InsertCommand = table.Column(type: "text", nullable: true), - BeforeInsertCommand = table.Column(type: "nvarchar(max)", nullable: true), - AfterInsertCommand = table.Column(type: "nvarchar(max)", nullable: true), + InsertBeforeCommand = table.Column(type: "nvarchar(max)", nullable: true), + InsertAfterCommand = table.Column(type: "nvarchar(max)", nullable: true), UpdateServiceAddress = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), InsertServiceAddress = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), DeleteServiceAddress = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index b1817be3..8a313149 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -6170,15 +6170,6 @@ namespace Erp.Platform.Migrations b.Property("AdaptiveLayoutJson") .HasColumnType("text"); - b.Property("AfterDeleteCommand") - .HasColumnType("nvarchar(max)"); - - b.Property("AfterInsertCommand") - .HasColumnType("nvarchar(max)"); - - b.Property("AfterUpdateCommand") - .HasColumnType("nvarchar(max)"); - b.Property("AnimationJson") .HasColumnType("text"); @@ -6188,15 +6179,6 @@ namespace Erp.Platform.Migrations b.Property("ArgumentAxisJson") .HasColumnType("text"); - b.Property("BeforeDeleteCommand") - .HasColumnType("nvarchar(max)"); - - b.Property("BeforeInsertCommand") - .HasColumnType("nvarchar(max)"); - - b.Property("BeforeUpdateCommand") - .HasColumnType("nvarchar(max)"); - b.Property("ColumnOptionJson") .HasColumnType("text"); @@ -6249,6 +6231,12 @@ namespace Erp.Platform.Migrations b.Property("DefaultFilter") .HasColumnType("text"); + b.Property("DeleteAfterCommand") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleteBeforeCommand") + .HasColumnType("nvarchar(max)"); + b.Property("DeleteCommand") .HasColumnType("text"); @@ -6307,6 +6295,12 @@ namespace Erp.Platform.Migrations b.Property("Height") .HasColumnType("int"); + b.Property("InsertAfterCommand") + .HasColumnType("nvarchar(max)"); + + b.Property("InsertBeforeCommand") + .HasColumnType("nvarchar(max)"); + b.Property("InsertCommand") .HasColumnType("text"); @@ -6453,6 +6447,12 @@ namespace Erp.Platform.Migrations b.Property("TreeOptionJson") .HasColumnType("nvarchar(max)"); + b.Property("UpdateAfterCommand") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateBeforeCommand") + .HasColumnType("nvarchar(max)"); + b.Property("UpdateCommand") .HasColumnType("text"); diff --git a/ui/src/proxy/form/models.ts b/ui/src/proxy/form/models.ts index 68ce8c1e..9f9b5d58 100644 --- a/ui/src/proxy/form/models.ts +++ b/ui/src/proxy/form/models.ts @@ -632,18 +632,18 @@ export interface GridOptionsEditDto extends GridOptionsDto, Record selectFieldsDefaultValueJson?: string selectFieldsDefaultValueDto: FieldsDefaultValueDto[] deleteCommand?: string - beforeDeleteCommand?: string - afterDeleteCommand?: string + deleteBeforeCommand?: string + deleteAfterCommand?: string deleteFieldsDefaultValueJson?: string deleteFieldsDefaultValueDto: FieldsDefaultValueDto[] insertCommand?: string - beforeInsertCommand?: string - afterInsertCommand?: string + insertBeforeCommand?: string + insertAfterCommand?: string insertFieldsDefaultValueJson?: string insertFieldsDefaultValueDto: FieldsDefaultValueDto[] updateCommand?: string - beforeUpdateCommand?: string - afterUpdateCommand?: string + updateBeforeCommand?: string + updateAfterCommand?: string updateFieldsDefaultValueJson?: string updateFieldsDefaultValueDto: FieldsDefaultValueDto[] formFieldsDefaultValueJson?: string diff --git a/ui/src/views/admin/listForm/edit/FormTabDatabaseDelete.tsx b/ui/src/views/admin/listForm/edit/FormTabDatabaseDelete.tsx index 0a93854e..2f39008d 100644 --- a/ui/src/views/admin/listForm/edit/FormTabDatabaseDelete.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabDatabaseDelete.tsx @@ -83,16 +83,16 @@ function FormTabDatabaseDelete({ />