Browse Source

Чуть-Чуть измененний

Danila Alekseev 1 year ago
parent
commit
952bc592d8
3 changed files with 10 additions and 4 deletions
  1. 1 1
      ROGOZ/Pages/AddEditPage.xaml
  2. 8 2
      ROGOZ/Pages/AddEditPage.xaml.cs
  3. 1 1
      ROGOZ/Pages/TaskList.xaml.cs

+ 1 - 1
ROGOZ/Pages/AddEditPage.xaml

@@ -47,7 +47,7 @@
                         <DataTemplate>
                             <TextBlock>
                                 <TextBlock.Text>
-                                    <MultiBinding StringFormat="{}{0} {1} {2}">
+                                    <MultiBinding StringFormat="{}{0}{1} {2}">
                                         <Binding Path="FirstName"/>
                                         <Binding Path="MiddleName"/>
                                         <Binding Path="LastName"/>

+ 8 - 2
ROGOZ/Pages/AddEditPage.xaml.cs

@@ -34,7 +34,12 @@ namespace ROGOZ.Pages
             CmbTaskType.ItemsSource = WorkType.FillWorkType();
             //CmbExecutor.ItemsSource = user1Entities.GetContext().Executor.ToList();
 
-            CmbExecutor.ItemsSource = _context.User.Where(u=>u.Executor != null).ToList();
+            //CmbExecutor.ItemsSource = _context.User.Where(u=>u.Executor != null).ToList();
+            LoadExecutors();
+        }
+        private void LoadExecutors()
+        {
+            CmbExecutor.ItemsSource = _context.User.Where(u => u.Executor != null).ToList();
         }
 
         public AddEditPage(Task selectedTask)
@@ -44,7 +49,8 @@ namespace ROGOZ.Pages
             CmbStatus.ItemsSource = Status.FillStatus();
             //CmbExecutor.ItemsSource = user1Entities.GetContext().Executor.ToList();
 
-            CmbExecutor.ItemsSource = _context.User.Where(u => u.Executor != null).ToList();
+            //CmbExecutor.ItemsSource = _context.User.Where(u => u.Executor != null).ToList();
+            LoadExecutors();
 
             CmbTaskType.ItemsSource = WorkType.FillWorkType();
             if (selectedTask != null)

+ 1 - 1
ROGOZ/Pages/TaskList.xaml.cs

@@ -53,7 +53,7 @@ namespace ROGOZ.Pages
         private void BtnDelTask_Click(object sender, RoutedEventArgs e)
         {
             var taskIsForRemoving = DGTasks.SelectedItems.Cast<Task>().ToList();
-            if (MessageBox.Show($"Вы точно хотите удалить {taskIsForRemoving.Count()} задач?", 
+            if (MessageBox.Show($"Вы точно хотите удалить выбранные задачи?", 
                 "Внимание",MessageBoxButton.YesNo, MessageBoxImage.Question)==MessageBoxResult.Yes)
             {
                 try