From 76ee77c27bc81a28fd8e80bdaea4d4f6957dfda6 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Fri, 5 Jan 2024 16:24:49 +0330 Subject: [PATCH] fix selection bug --- .../EasyMicroservices.UI.TemplateGenerator.Blazor.csproj | 2 +- .../Pages/FormItems/AddOrUpdateFormItem.razor | 4 ++-- .../EasyMicroservices.UI.TemplateGenerator.ViewModels.csproj | 2 +- .../ViewModels/FormItems/AddOrUpdateFormItemViewModel.cs | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/CSharp/Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor.csproj b/src/CSharp/Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor.csproj index bd5169e..3456cb5 100644 --- a/src/CSharp/Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor.csproj +++ b/src/CSharp/Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor.csproj @@ -4,7 +4,7 @@ net6.0;net7.0 EasyMicroservices true - 0.0.0.10 + 0.0.0.11 TemplateGenerator UI compoents. EasyMicroservices@gmail.com component,microcomponent,ui,core,templategenerator,generator,template,form,formgenerator diff --git a/src/CSharp/Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor/Pages/FormItems/AddOrUpdateFormItem.razor b/src/CSharp/Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor/Pages/FormItems/AddOrUpdateFormItem.razor index 6104529..da4dda4 100644 --- a/src/CSharp/Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor/Pages/FormItems/AddOrUpdateFormItem.razor +++ b/src/CSharp/Blazor/EasyMicroservices.UI.TemplateGenerator.Blazor/Pages/FormItems/AddOrUpdateFormItem.razor @@ -152,7 +152,7 @@ void ShowDeleteDialog(FormItemContract formItemContract) { - viewModel.UpdateFormItemContract = formItemContract; + viewModel.DeleteFormItemContract = formItemContract; deleteDialog.ShowDialog(); } @@ -164,6 +164,6 @@ StateHasChanged(); Snackbar.Add(viewModel.GetLanguage("DeleteForm_Message"), Severity.Success); }; - viewModel.DeleteCommand.Execute(viewModel.UpdateFormItemContract); + viewModel.DeleteCommand.Execute(viewModel.DeleteFormItemContract); } } \ No newline at end of file diff --git a/src/CSharp/Cores/EasyMicroservices.UI.TemplateGenerator.ViewModels/EasyMicroservices.UI.TemplateGenerator.ViewModels.csproj b/src/CSharp/Cores/EasyMicroservices.UI.TemplateGenerator.ViewModels/EasyMicroservices.UI.TemplateGenerator.ViewModels.csproj index 57a725c..4be9ae3 100644 --- a/src/CSharp/Cores/EasyMicroservices.UI.TemplateGenerator.ViewModels/EasyMicroservices.UI.TemplateGenerator.ViewModels.csproj +++ b/src/CSharp/Cores/EasyMicroservices.UI.TemplateGenerator.ViewModels/EasyMicroservices.UI.TemplateGenerator.ViewModels.csproj @@ -4,7 +4,7 @@ net6.0;net7.0 EasyMicroservices true - 0.0.0.10 + 0.0.0.11 TemplateGenerator view model. EasyMicroservices@gmail.com component,microcomponent,ui,core,templategenerator,generator,template,form,formgenerator diff --git a/src/CSharp/Cores/EasyMicroservices.UI.TemplateGenerator.ViewModels/ViewModels/FormItems/AddOrUpdateFormItemViewModel.cs b/src/CSharp/Cores/EasyMicroservices.UI.TemplateGenerator.ViewModels/ViewModels/FormItems/AddOrUpdateFormItemViewModel.cs index cd1e549..50073d4 100644 --- a/src/CSharp/Cores/EasyMicroservices.UI.TemplateGenerator.ViewModels/ViewModels/FormItems/AddOrUpdateFormItemViewModel.cs +++ b/src/CSharp/Cores/EasyMicroservices.UI.TemplateGenerator.ViewModels/ViewModels/FormItems/AddOrUpdateFormItemViewModel.cs @@ -24,6 +24,9 @@ public AddOrUpdateFormItemViewModel(NoParentFormItemClient noParentFormItemClien public Action OnDelete { get; set; } public Action OnSuccess { get; set; } + public FormItemContract DeleteFormItemContract { get; set; } + + FormItemContract _UpdateFormItemContract; /// /// for update