private void dataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (dataGrid.SelectedItem != null)
     {
         Accomplice s = AddAccomplice.getEditedAccomplice(dataGrid.SelectedItem as Accomplice, sqlWorker);
         if (s != null)
         {
             if (sqlWorker.updateAccomplice(s))
             {
                 al.update(s);
                 dataGrid.Items.Refresh();
             }
             else
             {
                 MessageBox.Show("Ошибка при изменении элемента");
             }
         }
     }
 }
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     if (lbChoosed.SelectedItem != null)
     {
         Accomplice s = AddAccomplice.getEditedAccomplice(lbChoosed.SelectedItem as Accomplice, sqlWorker);
         if (s != null)
         {
             if (sqlWorker.updateAccomplice(s))
             {
                 aChoosedList.update(s);
                 lbChoosed.Items.Refresh();
             }
             else
             {
                 MessageBox.Show("Ошибка при изменении элемента");
             }
         }
     }
 }