Ejemplo n.º 1
0
 public EditIssue(List <user> user_list, List <project_class> project_list, List <issue> issue_list, issue issue)
 {
     InitializeComponent();
     projects           = project_list;
     users              = user_list;
     issues             = issue_list;
     edit               = issue;
     tb_name.Text       = edit.name;
     up_estimated.Value = edit.estimation;
     up_timespent.Value = edit.spent_time;
     if (edit.isDone)
     {
         cb_finished.SelectedIndex = 1;
     }
     else
     {
         cb_finished.SelectedIndex = 0;
     }
     foreach (var item in users)
     {
         all_users.Items.Add(item);
         foreach (var user in edit.assigned_users)
         {
             if (item.Id == user)
             {
                 lb_users.Items.Add(item);
                 selected_users.Add(item.id);
                 all_users.Items.Remove(item);
             }
         }
     }
     foreach (var item in projects)
     {
         if (item.id == edit.projectId)
         {
             cb_project.Items.Add(item);
             cb_project.SelectedItem = item;
         }
         else
         {
             cb_project.Items.Add(item);
         }
     }
 }