Beispiel #1
0
        private void bClick_(object sender, RoutedEventArgs e)
        {
            Button b = sender as Button;

            int qty = 0;

            bool f = int.TryParse(b.Content.ToString().Replace("+", ""), out qty);

            setQTY(qty);

            ClassF.wm_sound(@"Data\Beep.wav");
        }
Beispiel #2
0
        private void modeStandart(KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                string item = text.Text.TrimEnd().TrimStart().ToUpper();

                long digital;

                bool f = long.TryParse(item, out digital);

                text.Text = "";
                if (f)
                {
                    XElement elm = find(item);

                    if (elm == null)
                    {
                        var w = new B.messageDlgTime();

                        w.message.Text = "not found";



                        w.Show();

                        _ProductsGrid.Items.Refresh();
                    }
                    else
                    {
                        int indx = shelfProducts.FindIndex(l => l == elm);

                        string qtys = qty_label.Text.Replace(" box ", "").Replace(" pièces ", "").Replace('_', ' ').Replace('.', ',').Trim();

                        qty_label.Text = "__";

                        decimal qty_ = 0.0m;

                        decimal.TryParse(qtys == "0,0" || qtys == string.Empty ? "1,00" : qtys, out qty_);

                        if (indx == -1)
                        {
                            shelfProducts.Insert(0, elm);

                            ClassProducts.updQTYProduct(qty_, elm, tbcb.IsChecked ?? false, typefind);
                        }
                        else
                        {
                            ClassProducts.updQTYProduct(qty_, elm, tbcb.IsChecked ?? false, typefind);

                            shelfProducts.Remove(elm);

                            shelfProducts.Insert(0, elm);
                        }


                        _ProductsGrid.SelectedItem = elm;



                        _ProductsGrid.Items.Refresh();


                        _ProductsGrid.ScrollIntoView(_ProductsGrid.SelectedItem);

                        ClassF.wm_sound(@"Data\Beep.wav");

                        //   tbcb.IsChecked = true;

                        calcTotal();
                    }
                }
            }
        }
Beispiel #3
0
 private void bClick(object sender, RoutedEventArgs e)
 {
     ClassF.wm_sound(@"Data\Beep.wav");
     setLabelQTY(((Button)sender).Content.ToString());
 }