public NewDealEntryDialog(DealDetail owner)
 {
     this.owner   = owner;
     Items        = new ObservableCollection <Item>();
     using var db = MyDbContext.Instance;
     foreach (var i in db.Items)
     {
         if (i.Available)
         {
             Items.Add(i);
         }
     }
     InitializeComponent();
 }
 public DeliverDialog(DealDetail owner)
 {
     this.owner   = owner;
     Warehouses   = new ObservableCollection <Warehouse>();
     using var db = MyDbContext.Instance;
     foreach (var i in db.Warehouses)
     {
         if (i.Available)
         {
             Warehouses.Add(i);
         }
     }
     InitializeComponent();
 }
 public DealPrintDialog(DealDetail owner)
 {
     this.owner = owner;
     InitializeComponent();
     Preview(false);
 }