[chore:] delete alternative names from sport courses
This commit is contained in:
@@ -331,6 +331,27 @@ public partial class MainWindow : Window
|
||||
((Sport)LbSportCourses.SelectedItem).AlternativeNames.Add(TbSportAlternativeName.Text);
|
||||
LbAlternativeNames.Items.Add(TbSportAlternativeName.Text);
|
||||
TbSportAlternativeName.Text = "";
|
||||
|
||||
int curr_selected = LbSportCourses.SelectedIndex;
|
||||
RefreshCoursesList();
|
||||
LbSportCourses.SelectedIndex = curr_selected;
|
||||
} catch {}
|
||||
}
|
||||
|
||||
private void BtnAlternativeNameRemove_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
//try
|
||||
//{
|
||||
LbAlternativeNames.Items.Remove(LbAlternativeNames.SelectedItem);
|
||||
((Sport)LbSportCourses.SelectedItem).AlternativeNames.Clear();
|
||||
foreach (string s in LbAlternativeNames.Items)
|
||||
{
|
||||
((Sport)LbSportCourses.SelectedItem).AlternativeNames.Add(s);
|
||||
}
|
||||
|
||||
int curr_selected = LbSportCourses.SelectedIndex;
|
||||
RefreshCoursesList();
|
||||
LbSportCourses.SelectedIndex = curr_selected;
|
||||
//} catch (Exception ex) {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user