private void BuyButton_Click(object sender, RoutedEventArgs e)
 {
     if (datagrid_main.SelectedItems.Count > 0)
     {
         var buyWindow = new BuyWindow(this, (BookModel)datagrid_main.SelectedItem);
         buyWindow.Show();
     }
 }
 private void Window_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.F12 && !(datagrid_main.SelectedItem is null))
     {
         var buyWindow = new BuyWindow(this, (BookModel)datagrid_main.SelectedItem);
         buyWindow.Show();
     }
 }