Bladeren bron

Создание страницы настройки коэффициентов ЗП для исполнителей, множественная фильтрация по статусам задач

Данилов Денис 1 jaar geleden
bovenliggende
commit
dbeef5c14f

+ 1 - 0
esoft/Class/ActualContext.cs

@@ -55,5 +55,6 @@ namespace esoft.Class
                     MessageBoxImage.Error);
             }
         }
+
     }
 }

+ 1 - 2
esoft/MainWindow.xaml

@@ -29,7 +29,6 @@
 
         <TextBlock Style="{DynamicResource Header}" Text="{Binding ElementName=FrameMain, Path=Content.Title}" Width="350" HorizontalAlignment="Center"/>
 
-
-            <Frame x:Name="FrameMain" NavigationUIVisibility="Hidden" Grid.Row="1"/>
+        <Frame x:Name="FrameMain" NavigationUIVisibility="Hidden" Grid.Row="1"/>
     </Grid>
 </Window>

+ 0 - 1
esoft/Pages/AddEditServicePage.xaml

@@ -9,7 +9,6 @@
       Title="Создание задачи" Height="1080" Width="1920">
 
     <Grid>
-
         <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Height="1080" Width="1920" Background="White">
             <StackPanel VerticalAlignment="Center" Height="1080" Width="1920" Background="#e8e8e8">
                 <Separator Height="50" Background="{x:Null}" />

+ 36 - 2
esoft/Pages/AddExecutorPage.xaml

@@ -86,14 +86,20 @@
                     </Button>
                 </StackPanel>
 
-                <StackPanel Margin="700,-425,0,0" Grid.Row="1" Width="1194" Height="1016" Background="#FFDADADA">
+                
+
+                <!--<TextBlock Text="Фильтрация задач по статусу" FontSize="26" Margin="-300, 10, 0, 0" FontWeight="Bold" Width="383"/>-->
+
+                <StackPanel Margin="700,-764,0,0" Grid.Row="1" Width="1194" Height="70" Background="#FFDADADA"/>
+
+                <StackPanel Margin="700,-320,0,0" Grid.Row="1" Width="1194" Height="923" Background="#FFDADADA">
                     <TextBlock Text="Название задачи" FontSize="26" Margin="-870, 10, 0, 0" FontWeight="Bold" Width="256"/>
                     <TextBlock Text="Дата создания задачи" FontSize="26" Margin="-50, -40, 0, 0" FontWeight="Bold" Width="325"/>
                     <TextBlock Text="Менеджер" HorizontalAlignment="Center" FontSize="26" Margin="480, -40, 0, 0" VerticalAlignment ="Center" FontWeight="Bold"></TextBlock>
                     <TextBlock Text="Статус" HorizontalAlignment="Right" FontSize="26" Margin="0, -40, 135, 0" VerticalAlignment ="Center" FontWeight="Bold"></TextBlock>
                 </StackPanel>
 
-                <ListView Grid.Row="1" Name="LViewTask" Height="790" Width="1194" HorizontalAlignment="Center" Background="{x:Null}" BorderBrush="{x:Null}" Margin="700,-1120,0,0" ScrollViewer.VerticalScrollBarVisibility="Hidden" MouseDoubleClick="LViewTask_MouseDoubleClick">
+                <ListView Grid.Row="1" Name="LViewTask" Height="790" Width="1194" HorizontalAlignment="Center" Background="{x:Null}" BorderBrush="{x:Null}" Margin="700,-950,0,0" ScrollViewer.VerticalScrollBarVisibility="Hidden" MouseDoubleClick="LViewTask_MouseDoubleClick">
                     <ListView.ItemContainerStyle>
                         <Style TargetType="ListViewItem">
                             <Setter Property="Margin" Value="0,0,0,10"/>
@@ -131,6 +137,34 @@
                         </DataTemplate>
                     </ListView.ItemTemplate>
                 </ListView>
+
+                <StackPanel Width="970" Height="47" HorizontalAlignment="Left" Margin="830, -1960, 0, 0" Orientation="Horizontal">
+                    <Separator Height="10" Background="{x:Null}" />
+                    <CheckBox x:Name="ckbPlan" Content="запланирована" Margin="20, 0, 0, 0" Checked="FilterExecuter" Click="FilterExecuter">
+                        <CheckBox.LayoutTransform>
+                            <ScaleTransform ScaleX="2.5" ScaleY="2.5" />
+                        </CheckBox.LayoutTransform>
+                    </CheckBox>
+                    <Separator Height="10" Background="{x:Null}" />
+                    <CheckBox x:Name="ckbExecuted" Content="исполняется" Margin="20, 0, 0, 0" Checked="FilterExecuter" Click="FilterExecuter">
+                        <CheckBox.LayoutTransform>
+                            <ScaleTransform ScaleX="2.5" ScaleY="2.5" />
+                        </CheckBox.LayoutTransform>
+                    </CheckBox>
+                    <Separator Height="10" Background="{x:Null}" />
+                    <CheckBox x:Name="ckbDone" Content="выполнена" Margin="20, 0, 0, 0" Checked="FilterExecuter" Click="FilterExecuter">
+                        <CheckBox.LayoutTransform>
+                            <ScaleTransform ScaleX="2.5" ScaleY="2.5" />
+                        </CheckBox.LayoutTransform>
+                    </CheckBox>
+                    <Separator Height="10" Background="{x:Null}" />
+                    <CheckBox x:Name="ckbСancelled" Content="отменена" Margin="20, 0, 0, 0" Checked="FilterExecuter" Click="FilterExecuter">
+                        <CheckBox.LayoutTransform>
+                            <ScaleTransform ScaleX="2.5" ScaleY="2.5" />
+                        </CheckBox.LayoutTransform>
+                    </CheckBox>
+                </StackPanel>
+                
             </StackPanel>
         </StackPanel>
     </Grid>

+ 46 - 0
esoft/Pages/AddExecutorPage.xaml.cs

@@ -27,6 +27,7 @@ namespace esoft.Pages
         ActualContext actualContext = new ActualContext();
         ExecuterFill executor = new ExecuterFill();
         List<ExecuterFill> executorContext = new List<ExecuterFill>();
+        List<TaskFill> taskFill;
         List<TaskFill> taskContext = new List<TaskFill>();
         private ExecuterFill selectedExecutor;
         private bool isEditing = false;
@@ -223,5 +224,50 @@ namespace esoft.Pages
                 MessageBox.Show("Выберите задачу для редактирования.", "Внимание", MessageBoxButton.OK, MessageBoxImage.Information);
             }
         }
+
+        private void FilterExecuter(object sender, RoutedEventArgs e)
+        {
+            FilterTasks();
+        }
+
+        private void FilterTasks()
+        {
+            // Получение актуальных данных задач из базы или контекста приложения
+            taskContext = Class.TaskFill.TaskFills();
+
+            List<string> selectedStatuses = new List<string>();
+
+            if (ckbPlan.IsChecked == true)
+            {
+                selectedStatuses.Add("запланирована");
+            }
+            if (ckbExecuted.IsChecked == true)
+            {
+                selectedStatuses.Add("исполняется");
+            }
+            if (ckbDone.IsChecked == true)
+            {
+                selectedStatuses.Add("выполнена");
+            }
+            if (ckbСancelled.IsChecked == true)
+            {
+                selectedStatuses.Add("отменена");
+            }
+
+            if (selectedExecutor != null || selectedStatuses.Any())
+            {
+                // Фильтрация задач по выбранному исполнителю и статусам
+                var filteredTasks = taskContext.Where(task =>
+                    (selectedExecutor == null || task.FioUser == selectedExecutor.FioUser) &&
+                    (selectedStatuses.Count == 0 || selectedStatuses.Contains(task.Status))).ToList();
+
+                LViewTask.ItemsSource = filteredTasks;
+            }
+            else
+            {
+                // Если исполнитель не выбран и не выбрано ни одного статуса, показать все задачи
+                LViewTask.ItemsSource = taskContext;
+            }
+        }
     }
 }

+ 116 - 0
esoft/Pages/EditPriceCoefficient.xaml

@@ -0,0 +1,116 @@
+<Page
+      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+      xmlns:local="clr-namespace:esoft.Pages"
+      xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
+      xmlns:Globalization="clr-namespace:System.Globalization;assembly=mscorlib" x:Class="esoft.Pages.EditPriceCoefficient"
+      mc:Ignorable="d" 
+      Title="Расчет заработной платы" Height="1080" Width="1920">
+
+    <Grid>
+        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Height="1080" Width="1920" Background="White">
+            <StackPanel VerticalAlignment="Center" Height="1080" Width="1920" Background="#e8e8e8">
+                <Separator Height="50" Background="{x:Null}"/>
+
+                <StackPanel Orientation="Horizontal" Width="1222" HorizontalAlignment = "Left">
+                    <Separator Width="20" Background="{x:Null}"/>
+                    <TextBlock Style="{StaticResource BlockCommon}" Text="ФИО менеджера:" FontSize="40"/>
+                    <Separator Width="6" Background="{x:Null}" />
+                    <ComboBox x:Name="cbManager" Width="570" Height="40" FontSize="29" DisplayMemberPath=""/>
+                </StackPanel>
+
+                <Separator Height="50" Background="{x:Null}" />
+
+                <StackPanel Width="750" HorizontalAlignment = "Left">
+                    <StackPanel Orientation="Horizontal" Width="750" HorizontalAlignment = "Left">
+                        <Separator Width="50" Background="{x:Null}"/>
+                        <TextBlock Style="{StaticResource BlockCommon}" Text="Junior минимум:" FontSize="40"/>
+                        <Separator Width="25" Background="{x:Null}"/>
+                        <xctk:IntegerUpDown x:Name="IUDJuniorMin" Width="375" Height="40" FontSize="29"/>
+                    </StackPanel>
+                    <Separator Height="10" Background="{x:Null}" />
+                    <StackPanel Orientation="Horizontal" Width="750" HorizontalAlignment = "Left">
+                        <Separator Width="50" Background="{x:Null}"/>
+                        <TextBlock Style="{StaticResource BlockCommon}" Text="Middle минимум:" FontSize="40"/>
+                        <Separator Width="9" Background="{x:Null}"/>
+                        <xctk:IntegerUpDown x:Name="IUDMiddleMin" Width="375" Height="40" FontSize="29"/>
+                    </StackPanel>
+                    <Separator Height="10" Background="{x:Null}" />
+                    <StackPanel Orientation="Horizontal" Width="750" HorizontalAlignment = "Left">
+                        <Separator Width="50" Background="{x:Null}"/>
+                        <TextBlock Style="{StaticResource BlockCommon}" Text="Senior минимум:" FontSize="40"/>
+                        <Separator Width="20" Background="{x:Null}"/>
+                        <xctk:IntegerUpDown x:Name="IUDSeniorMin" Width="375" Height="40" FontSize="29"/>
+                    </StackPanel>
+                </StackPanel>
+
+                <Separator Height="50" Background="{x:Null}" />
+
+                <StackPanel Width="1000" HorizontalAlignment = "Left">
+                    <StackPanel Orientation="Horizontal" Width="1000" HorizontalAlignment = "Left">
+                        <Separator Width="50" Background="{x:Null}"/>
+                        <TextBlock Style="{StaticResource BlockCommon}" Text="Коэффициент анализа:" FontSize="40"/>
+                        <Separator Width="79" Background="{x:Null}"/>
+                        <xctk:IntegerUpDown x:Name="IUDAnalysisCoefficient" Width="375" Height="40" FontSize="29"/>
+                    </StackPanel>
+                    <Separator Height="10" Background="{x:Null}" />
+                    <StackPanel Orientation="Horizontal" Width="1000" HorizontalAlignment = "Left">
+                        <Separator Width="50" Background="{x:Null}"/>
+                        <TextBlock Style="{StaticResource BlockCommon}" Text="Коэффициент установки:" FontSize="40"/>
+                        <Separator Width="41" Background="{x:Null}"/>
+                        <xctk:IntegerUpDown x:Name="IUDInstallationCoefficient" Width="375" Height="40" FontSize="29"/>
+                    </StackPanel>
+                    <Separator Height="10" Background="{x:Null}" />
+                    <StackPanel Orientation="Horizontal" Width="1000" HorizontalAlignment = "Left">
+                        <Separator Width="50" Background="{x:Null}"/>
+                        <TextBlock Style="{StaticResource BlockCommon}" Text="Коэффициент поддержки:" FontSize="40"/>
+                        <Separator Width="19" Background="{x:Null}"/>
+                        <xctk:IntegerUpDown x:Name="IUDSupportCoefficient" Width="375" Height="40" FontSize="29"/>
+                    </StackPanel>
+                    <Separator Height="10" Background="{x:Null}" />
+                    <StackPanel Orientation="Horizontal" Width="1000" HorizontalAlignment = "Left">
+                        <Separator Width="50" Background="{x:Null}"/>
+                        <TextBlock Style="{StaticResource BlockCommon}" Text="Временной коэффициент:" FontSize="40"/>
+                        <Separator Width="21" Background="{x:Null}"/>
+                        <xctk:IntegerUpDown x:Name="IUDTimeCoefficient" Width="375" Height="40" FontSize="29"/>
+                    </StackPanel>
+                    <Separator Height="10" Background="{x:Null}" />
+                    <StackPanel Orientation="Horizontal" Width="1000" HorizontalAlignment = "Left">
+                        <Separator Width="50" Background="{x:Null}"/>
+                        <TextBlock Style="{StaticResource BlockCommon}" Text="Коэфициент сложности:" FontSize="40"/>
+                        <Separator Width="57" Background="{x:Null}"/>
+                        <xctk:IntegerUpDown x:Name="IUDDifficultyCoefficient" Width="375" Height="40" FontSize="29"/>
+                    </StackPanel>
+                    <Separator Height="10" Background="{x:Null}"/>
+                    <StackPanel Orientation="Horizontal" Width="1000" HorizontalAlignment = "Left">
+                        <Separator Width="50" Background="{x:Null}"/>
+                        <TextBlock Style="{StaticResource BlockCommon}" Text="Денежный коэффициент:" FontSize="40"/>
+                        <Separator Width="33" Background="{x:Null}"/>
+                        <xctk:IntegerUpDown x:Name="IUDToMoneyCoefficient" Width="375" Height="40" FontSize="29"/>
+                    </StackPanel>
+                </StackPanel>
+
+                <Separator Height="30" Background="{x:Null}" />
+
+                <StackPanel Width="1920" HorizontalAlignment = "Left" Orientation="Horizontal">
+                    <Button Grid.Row="3" x:Name="BtnSaveSalaryCoeff" Content="Сохранить" Width="905" Height="79" BorderThickness="0" Margin="16,10,0,15" FontSize="36" HorizontalAlignment = "Left" Click="BtnSaveSalaryCoeff_Click">
+                        <Button.Resources>
+                            <Style TargetType="{x:Type Border}">
+                                <Setter Property="CornerRadius" Value="10"/>
+                            </Style>
+                        </Button.Resources>
+                        <Button.Style>
+                            <StaticResource ResourceKey="StandartButtons"/>
+                        </Button.Style>
+                    </Button>
+                    <Separator Width="70" Background="{x:Null}"/>
+                    <TextBlock Style="{StaticResource BlockCommon}" Text="Итого заработная плата составляет:" FontSize="40" FontWeight="Bold" TextWrapping="Wrap" Width="360"/>
+                    <Separator Width="40" Background="{x:Null}"/>
+                    <TextBlock x:Name="TBlockTotalSalary" Style="{DynamicResource Header}" Text="{Binding TotalSalary}" Width="475"/>
+                </StackPanel>
+            </StackPanel>
+        </StackPanel>
+    </Grid>
+</Page>

+ 104 - 0
esoft/Pages/EditPriceCoefficient.xaml.cs

@@ -0,0 +1,104 @@
+using esoft.Class;
+using esoft.Entities;
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.NetworkInformation;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace esoft.Pages
+{
+    /// <summary>
+    /// Логика взаимодействия для EditPriceCoefficient.xaml
+    /// </summary>
+    public partial class EditPriceCoefficient : Page
+    {
+        ActualContext actualContext = new ActualContext();
+
+        public EditPriceCoefficient()
+        {
+            InitializeComponent();
+            FillForm();
+        }
+
+        private void FillForm()
+        {
+            List<User> usersManager = actualContext.Users.Where(user => actualContext.Manager.Any(manager => manager.ID == user.ID)).ToList(); // Получение списка менеджеров
+            cbManager.ItemsSource = UserInFIO.GroupUser(usersManager);
+        }
+
+        private void BtnSaveSalaryCoeff_Click(object sender, RoutedEventArgs e)
+        {
+            try
+            {
+                // Получаем значения из элементов интерфейса
+                int managerId = (int)(cbManager.SelectedItem as ComboBoxItem)?.Tag;
+                int juniorMin = (int)IUDJuniorMin.Value;
+                int middleMin = (int)IUDMiddleMin.Value;
+                int seniorMin = (int)IUDSeniorMin.Value;
+                double analysisCoeff = (double)IUDAnalysisCoefficient.Value;
+                double installationCoeff = (double)IUDInstallationCoefficient.Value;
+                double supportCoeff = (double)IUDSupportCoefficient.Value;
+                double timeCoeff = (double)IUDTimeCoefficient.Value;
+                double difficultyCoeff = (double)IUDDifficultyCoefficient.Value;
+                double toMoneyCoeff = (double)IUDToMoneyCoefficient.Value;
+
+                // Обновляем коэффициенты менеджера
+                UpdateManagerCoefficients(managerId, juniorMin, middleMin, seniorMin, analysisCoeff, installationCoeff, supportCoeff, timeCoeff, difficultyCoeff, toMoneyCoeff);
+                MessageBox.Show("Коэффициенты сохранены успешно!");
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка при сохранении коэффициентов: {ex.Message}", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
+        }
+
+        public void UpdateManagerCoefficients(int managerId, int juniorMin, int middleMin, int seniorMin, double analysisCoeff, double installationCoeff, double supportCoeff, double timeCoeff, double difficultyCoeff, double toMoneyCoeff)
+        {
+            try
+            {
+                // Получаем контекст базы данных и находим менеджера по ID
+                var context = esoftEntities.GetContext();
+                {
+                    Manager targetManager = context.Manager.FirstOrDefault(m => m.ID == managerId);
+
+                    if (targetManager != null)
+                    {
+                        // Обновляем значения коэффициентов менеджера
+                        targetManager.JuniorMinimum = juniorMin;
+                        targetManager.MiddleMinimum = middleMin;
+                        targetManager.SeniorMinimum = seniorMin;
+                        targetManager.AnalysisCoefficient = analysisCoeff;
+                        targetManager.InstallationCoefficient = installationCoeff;
+                        targetManager.SupportCoefficient = supportCoeff;
+                        targetManager.TimeCoefficient = timeCoeff;
+                        targetManager.DifficultyCoefficient = difficultyCoeff;
+                        targetManager.ToMoneyCoefficient = toMoneyCoeff;
+
+                        // Сохраняем изменения в базе данных
+                        context.SaveChanges();
+                    }
+                    else
+                    {
+                        MessageBox.Show("Менеджер не найден!", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка обновления коэффициентов: {ex.Message}", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
+        }
+    }
+}

+ 9 - 0
esoft/Pages/ExecutorsListPage.xaml

@@ -114,5 +114,14 @@
                 </Style>
             </Button.Resources>
         </Button>
+
+        <Button Grid.Row="1" HorizontalAlignment="Left" Name="BtnPriceCoefficient" Content="Расчет заработной платы" Width="260" Height="40" BorderThickness="0" Style="{StaticResource  StandartButtons}" Margin="60,805,0,0" Click="BtnPriceCoefficient_Click">
+            <Button.Resources>
+                <Style TargetType="Border">
+                    <Setter Property="CornerRadius" Value="10"/>
+                </Style>
+            </Button.Resources>
+        </Button>
+        
     </Grid>
 </Page>

+ 8 - 5
esoft/Pages/ExecutorsListPage.xaml.cs

@@ -58,11 +58,8 @@ namespace esoft.Pages
                         {
                             existingUser.IsDeleted = true;
                             context.SaveChanges();
-                            MessageBoxResult result = MessageBox.Show("Пользователь успешно помечен на удаление!", "Успех", MessageBoxButton.OK, MessageBoxImage.Information);
-                            if (result == MessageBoxResult.OK)
-                            {
-                                NavigationService.GoBack();
-                            }
+                            executerContext = Class.ExecuterFill.Fill().Where(executer => !executer.IsDeleted).ToList();
+                            LViewExecutors.ItemsSource = executerContext;
                         }
                     }
                 }
@@ -179,5 +176,11 @@ namespace esoft.Pages
             executerContext = Class.ExecuterFill.Fill().Where(executer => !executer.IsDeleted).ToList();
             LViewExecutors.ItemsSource = executerContext;
         }
+
+        private void BtnPriceCoefficient_Click(object sender, RoutedEventArgs e)
+        {
+            // Перенаправление пользователя на страницу с коэфициентом
+            NavigationService.Navigate(new Pages.EditPriceCoefficient());
+        }
     }
 }

+ 31 - 16
esoft/Pages/TaskLists.xaml.cs

@@ -104,34 +104,47 @@ namespace esoft.Pages
 
         private void BtnDeleteTask_Click(object sender, RoutedEventArgs e)
         {
-            if (LViewTask.SelectedItem is TaskFill selectedTask)
+            try
             {
-                MessageBoxResult result = MessageBox.Show("Вы уверены, что хотите удалить выбранную задачу?",
-                                                          "Подтверждение удаления",
-                                                          MessageBoxButton.YesNo,
-                                                          MessageBoxImage.Question);
-
-                if (result == MessageBoxResult.Yes)
+                if (LViewTask.SelectedItem is TaskFill selectedTask)
                 {
-                    var context = esoftEntities.GetContext();
-
-                    // Находим задачу по ID или другому уникальному идентификатору
-                    var taskToDelete = context.Task.FirstOrDefault(task => task.ID == selectedTask.ID);
+                    MessageBoxResult result = MessageBox.Show("Вы уверены, что хотите удалить выбранную задачу?",
+                                                              "Подтверждение удаления",
+                                                              MessageBoxButton.YesNo,
+                                                              MessageBoxImage.Question);
 
-                    if (taskToDelete != null)
+                    if (result == MessageBoxResult.Yes)
                     {
-                        context.Task.Remove(taskToDelete);
-                        context.SaveChanges(); // Сохраняем изменения в базе данных
-                        LViewTask.ItemsSource = Class.TaskFill.TaskFills(); // Обновляем DataGrid
+                        var context = esoftEntities.GetContext();
+
+                        // Находим задачу по ID или другому уникальному идентификатору
+                        var taskToDelete = context.Task.FirstOrDefault(task => task.ID == selectedTask.ID);
+
+                        if (taskToDelete != null)
+                        {
+                            taskToDelete.IsDeleted = true;
+                            context.SaveChanges(); // Сохраняем изменения в базе данных
+                            LViewTask.ItemsSource = Class.TaskFill.TaskFills(); // Обновляем DataGrid
+
+                            // Получение исполнителей, не помеченных на удаление
+                            taskContext = Class.TaskFill.TaskFills().Where(task => !task.IsDeleted).ToList();
+                            LViewTask.ItemsSource = taskContext;
+                            LoadAndSortTasks();
+                        }
                     }
                 }
             }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка при удалении задачи: {ex.Message}", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
         }
 
         private void BtnUpdate_Click(object sender, RoutedEventArgs e)
         {
             LViewTask.ItemsSource = Class.TaskFill.TaskFills();
             LoadAndSortTasks();
+            LoadUserRule();
         }
 
         private void FilterTasks()
@@ -215,6 +228,7 @@ namespace esoft.Pages
             // Очистка фильтров и отображение всех задач без фильтрации
             LViewTask.ItemsSource = Class.TaskFill.TaskFills();
             LoadAndSortTasks();
+            LoadUserRule();
         }
 
         private void BtnExecutorList_Click(object sender, RoutedEventArgs e)
@@ -246,7 +260,8 @@ namespace esoft.Pages
 
         private void LViewTask_Loaded(object sender, RoutedEventArgs e)
         {
-            LViewTask.ItemsSource = Class.TaskFill.TaskFills();
+            taskContext = Class.TaskFill.TaskFills().Where(task => !task.IsDeleted).ToList();
+            LViewTask.ItemsSource = taskContext;
             FillForm();
             LoadAndSortTasks();
             LoadUserRule();

+ 7 - 0
esoft/esoft.csproj

@@ -143,6 +143,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Pages\EditPriceCoefficient.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Pages\ExecutorsListPage.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -163,6 +167,9 @@
     <Compile Include="Pages\AddExecutorPage.xaml.cs">
       <DependentUpon>AddExecutorPage.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Pages\EditPriceCoefficient.xaml.cs">
+      <DependentUpon>EditPriceCoefficient.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Pages\ExecutorsListPage.xaml.cs">
       <DependentUpon>ExecutorsListPage.xaml</DependentUpon>
     </Compile>