|
@@ -22,6 +22,8 @@ namespace ROGOZ.Pages
|
|
|
/// </summary>
|
|
|
public partial class AddEditPage : Page
|
|
|
{
|
|
|
+ private user1Entities _context = new user1Entities();
|
|
|
+ private List<string> listUsers = new List<string>();
|
|
|
private Task _currentTask = null;
|
|
|
public AddEditPage()
|
|
|
{
|
|
@@ -30,8 +32,12 @@ namespace ROGOZ.Pages
|
|
|
//DPDeadLine.SelectedDate = DateTime.Today;
|
|
|
DataContext = _currentTask;
|
|
|
CmbStatus.ItemsSource = Status.FillStatus();
|
|
|
- CmbExecutor.ItemsSource = user1Entities.GetContext().Executor.ToList();
|
|
|
CmbTaskType.ItemsSource = WorkType.FillWorkType();
|
|
|
+ foreach (var user in _context.User.ToList())
|
|
|
+ {
|
|
|
+ listUsers.Add(user.getFIO());
|
|
|
+ }
|
|
|
+ CmbExecutor.ItemsSource = listUsers;
|
|
|
}
|
|
|
|
|
|
public AddEditPage(Task selectedTask)
|
|
@@ -41,11 +47,17 @@ namespace ROGOZ.Pages
|
|
|
//DPDeadLine.SelectedDate = DateTime.Today;
|
|
|
_currentTask = selectedTask;
|
|
|
CmbStatus.ItemsSource = Status.FillStatus();
|
|
|
- CmbExecutor.ItemsSource = user1Entities.GetContext().Executor.ToList();
|
|
|
+ //CmbExecutor.ItemsSource = user1Entities.GetContext().Executor.ToList();
|
|
|
CmbTaskType.ItemsSource = WorkType.FillWorkType();
|
|
|
if (selectedTask != null)
|
|
|
_currentTask = selectedTask;
|
|
|
DataContext = _currentTask;
|
|
|
+
|
|
|
+ foreach (var user in _context.User.ToList())
|
|
|
+ {
|
|
|
+ listUsers.Add(user.getFIO());
|
|
|
+ }
|
|
|
+ CmbExecutor.ItemsSource = listUsers;
|
|
|
}
|
|
|
private void BtnCancel_Click(object sender, RoutedEventArgs e)
|
|
|
{
|