Before ve After Command tanımlamaları
This commit is contained in:
parent
c3ce3583a6
commit
e54dfe4f98
11 changed files with 256 additions and 45 deletions
|
|
@ -33,6 +33,8 @@ public class GridOptionsEditDto : GridOptionsDto
|
|||
}
|
||||
|
||||
public string DeleteCommand { get; set; }
|
||||
public string BeforeDeleteCommand { get; set; }
|
||||
public string AfterDeleteCommand { get; set; }
|
||||
[JsonIgnore]
|
||||
public string DeleteFieldsDefaultValueJson { get; set; }
|
||||
public List<FieldsDefaultValueDto> DeleteFieldsDefaultValueDto
|
||||
|
|
@ -48,6 +50,8 @@ public class GridOptionsEditDto : GridOptionsDto
|
|||
}
|
||||
|
||||
public string InsertCommand { get; set; }
|
||||
public string BeforeInsertCommand { get; set; }
|
||||
public string AfterInsertCommand { get; set; }
|
||||
[JsonIgnore]
|
||||
public string InsertFieldsDefaultValueJson { get; set; }
|
||||
public List<FieldsDefaultValueDto> InsertFieldsDefaultValueDto
|
||||
|
|
@ -63,6 +67,8 @@ public class GridOptionsEditDto : GridOptionsDto
|
|||
}
|
||||
|
||||
public string UpdateCommand { get; set; }
|
||||
public string BeforeUpdateCommand { get; set; }
|
||||
public string AfterUpdateCommand { get; set; }
|
||||
[JsonIgnore]
|
||||
public string UpdateFieldsDefaultValueJson { get; set; }
|
||||
public List<FieldsDefaultValueDto> UpdateFieldsDefaultValueDto
|
||||
|
|
|
|||
|
|
@ -94,16 +94,22 @@ public class ListFormsAppService : CrudAppService<
|
|||
{
|
||||
item.InsertServiceAddress = input.InsertServiceAddress;
|
||||
item.InsertCommand = input.InsertCommand;
|
||||
item.BeforeInsertCommand = input.BeforeInsertCommand;
|
||||
item.AfterInsertCommand = input.AfterInsertCommand;
|
||||
}
|
||||
else if (input.EditType == ListFormEditTabs.Database.Update.UpdateForm)
|
||||
{
|
||||
item.UpdateServiceAddress = input.UpdateServiceAddress;
|
||||
item.UpdateCommand = input.UpdateCommand;
|
||||
item.BeforeUpdateCommand = input.BeforeUpdateCommand;
|
||||
item.AfterUpdateCommand = input.AfterUpdateCommand;
|
||||
}
|
||||
else if (input.EditType == ListFormEditTabs.Database.Delete.DeleteForm)
|
||||
{
|
||||
item.DeleteServiceAddress = input.DeleteServiceAddress;
|
||||
item.DeleteCommand = input.DeleteCommand;
|
||||
item.BeforeDeleteCommand = input.BeforeDeleteCommand;
|
||||
item.AfterDeleteCommand = input.AfterDeleteCommand;
|
||||
}
|
||||
else if (input.EditType == ListFormEditTabs.PermissionForm)
|
||||
{
|
||||
|
|
@ -154,11 +160,11 @@ public class ListFormsAppService : CrudAppService<
|
|||
else if (input.EditType == ListFormEditTabs.GanttForm)
|
||||
{
|
||||
item.GanttOptionJson = JsonSerializer.Serialize(input.GanttOptionDto);
|
||||
}
|
||||
}
|
||||
else if (input.EditType == ListFormEditTabs.SchedulerForm)
|
||||
{
|
||||
item.SchedulerOptionJson = JsonSerializer.Serialize(input.SchedulerOptionDto);
|
||||
}
|
||||
}
|
||||
else if (input.EditType == ListFormEditTabs.PagerForm)
|
||||
{
|
||||
item.PageSize = input.PageSize;
|
||||
|
|
|
|||
|
|
@ -4033,6 +4033,18 @@
|
|||
"en": "Insert Command",
|
||||
"tr": "Insert T-Sql"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.BeforeDatabaseInsertCommand",
|
||||
"en": "Before Insert Command",
|
||||
"tr": "Before Insert T-Sql"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.AfterDatabaseInsertCommand",
|
||||
"en": "After Insert Command",
|
||||
"tr": "After Insert T-Sql"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.DatabaseInsertFieldsDefaultValues",
|
||||
|
|
@ -4093,6 +4105,18 @@
|
|||
"en": "Update Command",
|
||||
"tr": "Update T-Sql"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.BeforeDatabaseUpdateCommand",
|
||||
"en": "Before Update Command",
|
||||
"tr": "Before Update T-Sql"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.AfterDatabaseUpdateCommand",
|
||||
"en": "After Update Command",
|
||||
"tr": "After Update T-Sql"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.DatabaseUpdateFieldsDefaultValues",
|
||||
|
|
@ -4117,6 +4141,18 @@
|
|||
"en": "Delete Command",
|
||||
"tr": "Delete T-Sql"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.BeforeDatabaseDeleteCommand",
|
||||
"en": "Before Delete Command",
|
||||
"tr": "Before Delete T-Sql"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.AfterDatabaseDeleteCommand",
|
||||
"en": "After Delete Command",
|
||||
"tr": "After Delete T-Sql"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.DatabaseDeleteFieldsDefaultValues",
|
||||
|
|
|
|||
|
|
@ -67,18 +67,24 @@ public class ListForm : FullAuditedEntity<Guid>
|
|||
/// <summary> Silme yapilacak harici sorgu. icerisinde @ID, @USERID, @USERNAME, @ROLES anahtarlari kullanilabilir.
|
||||
/// </summary>
|
||||
public string DeleteCommand { get; set; }
|
||||
public string BeforeDeleteCommand { get; set; }
|
||||
public string AfterDeleteCommand { get; set; }
|
||||
/// <summary>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
|
||||
/// </summary>
|
||||
public string UpdateCommand { get; set; }
|
||||
public string BeforeUpdateCommand { get; set; }
|
||||
public string AfterUpdateCommand { get; set; }
|
||||
/// <summary>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
|
||||
/// </summary>
|
||||
public string InsertCommand { get; set; }
|
||||
public string BeforeInsertCommand { get; set; }
|
||||
public string AfterInsertCommand { get; set; }
|
||||
|
||||
/// <summary> Guncelleme islemini yapacak servis adresi
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251205115506_Initial")]
|
||||
[Migration("20251206194239_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -6173,6 +6173,15 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<string>("AdaptiveLayoutJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("AfterDeleteCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AfterInsertCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AfterUpdateCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AnimationJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
|
|
@ -6182,6 +6191,15 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<string>("ArgumentAxisJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("BeforeDeleteCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("BeforeInsertCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("BeforeUpdateCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ColumnOptionJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
|
|
@ -2290,8 +2290,14 @@ namespace Erp.Platform.Migrations
|
|||
CommandColumnJson = table.Column<string>(type: "text", nullable: true),
|
||||
StateStoringJson = table.Column<string>(type: "text", nullable: true),
|
||||
DeleteCommand = table.Column<string>(type: "text", nullable: true),
|
||||
BeforeDeleteCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AfterDeleteCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
UpdateCommand = table.Column<string>(type: "text", nullable: true),
|
||||
BeforeUpdateCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AfterUpdateCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
InsertCommand = table.Column<string>(type: "text", nullable: true),
|
||||
BeforeInsertCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AfterInsertCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
UpdateServiceAddress = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
InsertServiceAddress = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
DeleteServiceAddress = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
|
|
@ -6170,6 +6170,15 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<string>("AdaptiveLayoutJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("AfterDeleteCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AfterInsertCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AfterUpdateCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AnimationJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
|
|
@ -6179,6 +6188,15 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<string>("ArgumentAxisJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("BeforeDeleteCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("BeforeInsertCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("BeforeUpdateCommand")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ColumnOptionJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
|
|
|
|||
|
|
@ -632,12 +632,18 @@ export interface GridOptionsEditDto extends GridOptionsDto, Record<string, any>
|
|||
selectFieldsDefaultValueJson?: string
|
||||
selectFieldsDefaultValueDto: FieldsDefaultValueDto[]
|
||||
deleteCommand?: string
|
||||
beforeDeleteCommand?: string
|
||||
afterDeleteCommand?: string
|
||||
deleteFieldsDefaultValueJson?: string
|
||||
deleteFieldsDefaultValueDto: FieldsDefaultValueDto[]
|
||||
insertCommand?: string
|
||||
beforeInsertCommand?: string
|
||||
afterInsertCommand?: string
|
||||
insertFieldsDefaultValueJson?: string
|
||||
insertFieldsDefaultValueDto: FieldsDefaultValueDto[]
|
||||
updateCommand?: string
|
||||
beforeUpdateCommand?: string
|
||||
afterUpdateCommand?: string
|
||||
updateFieldsDefaultValueJson?: string
|
||||
updateFieldsDefaultValueDto: FieldsDefaultValueDto[]
|
||||
formFieldsDefaultValueJson?: string
|
||||
|
|
|
|||
|
|
@ -65,20 +65,57 @@ function FormTabDatabaseDelete({
|
|||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.DatabaseDeleteCommand')}
|
||||
invalid={errors.deleteCommand && touched.deleteCommand}
|
||||
errorMessage={errors.deleteCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="deleteCommand"
|
||||
placeholder={translate('::ListForms.ListFormEdit.DatabaseDeleteCommand')}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.DatabaseDeleteCommand')}
|
||||
invalid={errors.deleteCommand && touched.deleteCommand}
|
||||
errorMessage={errors.deleteCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="deleteCommand"
|
||||
placeholder={translate('::ListForms.ListFormEdit.DatabaseDeleteCommand')}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
rows={6}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.BeforeDatabaseDeleteCommand')}
|
||||
invalid={errors.beforeDeleteCommand && touched.beforeDeleteCommand}
|
||||
errorMessage={errors.beforeDeleteCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="beforeDeleteCommand"
|
||||
placeholder={translate(
|
||||
'::ListForms.ListFormEdit.BeforeDatabaseDeleteCommand',
|
||||
)}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
rows={6}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.AfterDatabaseDeleteCommand')}
|
||||
invalid={errors.afterDeleteCommand && touched.afterDeleteCommand}
|
||||
errorMessage={errors.afterDeleteCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="afterDeleteCommand"
|
||||
placeholder={translate('::ListForms.ListFormEdit.AfterDatabaseDeleteCommand')}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
rows={6}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
|
||||
<Button block variant="solid" loading={isSubmitting}>
|
||||
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -65,20 +65,55 @@ function FormTabDatabaseInsert({
|
|||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.DatabaseInsertCommand')}
|
||||
invalid={errors.insertCommand && touched.insertCommand}
|
||||
errorMessage={errors.insertCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="insertCommand"
|
||||
placeholder={translate('::ListForms.ListFormEdit.DatabaseInsertCommand')}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
/>
|
||||
</FormItem>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.DatabaseInsertCommand')}
|
||||
invalid={errors.insertCommand && touched.insertCommand}
|
||||
errorMessage={errors.insertCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="insertCommand"
|
||||
placeholder={translate('::ListForms.ListFormEdit.DatabaseInsertCommand')}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
rows={6}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.BeforeDatabaseInsertCommand')}
|
||||
invalid={errors.beforeInsertCommand && touched.beforeInsertCommand}
|
||||
errorMessage={errors.beforeInsertCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="beforeInsertCommand"
|
||||
placeholder={translate(
|
||||
'::ListForms.ListFormEdit.BeforeDatabaseInsertCommand',
|
||||
)}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
rows={6}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.AfterDatabaseInsertCommand')}
|
||||
invalid={errors.afterInsertCommand && touched.afterInsertCommand}
|
||||
errorMessage={errors.afterInsertCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="afterInsertCommand"
|
||||
placeholder={translate('::ListForms.ListFormEdit.AfterDatabaseInsertCommand')}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
rows={6}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
<Button block variant="solid" loading={isSubmitting}>
|
||||
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -65,20 +65,57 @@ function FormTabDatabaseUpdate({
|
|||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.DatabaseUpdateCommand')}
|
||||
invalid={errors.updateCommand && touched.updateCommand}
|
||||
errorMessage={errors.updateCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="updateCommand"
|
||||
placeholder={translate('::ListForms.ListFormEdit.DatabaseUpdateCommand')}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
/>
|
||||
</FormItem>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.DatabaseUpdateCommand')}
|
||||
invalid={errors.updateCommand && touched.updateCommand}
|
||||
errorMessage={errors.updateCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="updateCommand"
|
||||
placeholder={translate('::ListForms.ListFormEdit.DatabaseUpdateCommand')}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
rows={6}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.BeforeDatabaseUpdateCommand')}
|
||||
invalid={errors.beforeUpdateCommand && touched.beforeUpdateCommand}
|
||||
errorMessage={errors.beforeUpdateCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="beforeUpdateCommand"
|
||||
placeholder={translate(
|
||||
'::ListForms.ListFormEdit.BeforeDatabaseUpdateCommand',
|
||||
)}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
rows={6}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.AfterDatabaseUpdateCommand')}
|
||||
invalid={errors.afterUpdateCommand && touched.afterUpdateCommand}
|
||||
errorMessage={errors.afterUpdateCommand}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="afterUpdateCommand"
|
||||
placeholder={translate(
|
||||
'::ListForms.ListFormEdit.AfterDatabaseUpdateCommand',
|
||||
)}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
rows={6}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
<Button block variant="solid" loading={isSubmitting}>
|
||||
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||
</Button>
|
||||
|
|
|
|||
Loading…
Reference in a new issue