コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: MarkdeGraaff/Kassa
        private void Win_Main_KeyDown(object sender, KeyEventArgs e)
        {
            Window actWnd = Application.Current.Windows.OfType <Window>().SingleOrDefault(x => x.IsActive);


            //var window = Window.GetWindow(this);
            if (this == actWnd)
            {
                if (e.Key == Key.Return)
                {
                    producten product = (from producten in db.productens where (producten.barcode == sBarcode) select producten).FirstOrDefault();
                    if (product != null)
                    {
                        Artikel_Aantal_Ophogen(product.id, Bestelling_Id);
                    }
                    else
                    {
                        MessageBox.Show("Onbekende barcode!");
                    }
                    sBarcode  = "";
                    e.Handled = true;
                }
                else
                {
                    if (e.Key >= Key.D0 && e.Key <= Key.D9)
                    {
                        var strKey = new KeyConverter().ConvertToString(e.Key);
                        sBarcode  = sBarcode + strKey;
                        e.Handled = true;
                    }
                }
            }
        }
コード例 #2
0
 partial void Deleteproducten(producten instance);
コード例 #3
0
 partial void Updateproducten(producten instance);
コード例 #4
0
 partial void Insertproducten(producten instance);
コード例 #5
0
 private void detach_productens(producten entity)
 {
     this.SendPropertyChanging();
     entity.product_soorten = null;
 }