|
@@ -2,17 +2,10 @@
|
|
|
using System.Collections.Generic;
|
|
|
using System.Globalization;
|
|
|
using System.Linq;
|
|
|
-using System.Text;
|
|
|
-using System.Threading.Tasks;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
|
-using System.Windows.Data;
|
|
|
-using System.Windows.Documents;
|
|
|
using System.Windows.Input;
|
|
|
-using System.Windows.Media;
|
|
|
using System.Windows.Media.Imaging;
|
|
|
-using System.Windows.Navigation;
|
|
|
-using System.Windows.Shapes;
|
|
|
|
|
|
namespace RaspisKusach.Pages
|
|
|
{
|
|
@@ -62,6 +55,21 @@ namespace RaspisKusach.Pages
|
|
|
cnt.db.SaveChanges();
|
|
|
}
|
|
|
}
|
|
|
+ private void ReturnTicketButton_Click(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ Button btn = (Button)sender;
|
|
|
+ if (btn.DataContext is TicketsClass)
|
|
|
+ {
|
|
|
+ ConfirmationWindow confWindow = new ConfirmationWindow();
|
|
|
+ confWindow.ShowDialog();
|
|
|
+ if (confWindow.answer)
|
|
|
+ {
|
|
|
+ cnt.db.Tickets.Remove(((TicketsClass)btn.DataContext).Ticket);
|
|
|
+ cnt.db.SaveChanges();
|
|
|
+ UpdateCarriagesList();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
public class TicketsClass
|
|
|
{
|
|
|
public Tickets Ticket { get; set; }
|