コード例 #1
0
        //Modify product
        private void Modify_Click(object sender, RoutedEventArgs e)
        {
            //Get button control
            Button Control = (Button)sender;
            var    Product = BillProducts.Find(x => x.product_id == Control.Tag.ToString());

            if (BillDock.IsEnabled == true)
            {
                EditProduct = true;

                BillDock.IsEnabled     = false;
                AddProductPopUp.IsOpen = true;

                ProductSearchTX.IsEnabled = false;
                ProductCB.IsEnabled       = false;

                ProcutCountTX.Text        = Product.product_count;
                ProductSellValueTX.Number = Product.product_value;
                DiscountPercentTX.Text    = Product.product_discount;
                DiscountValueTX.Number    = Product.product_discountvalue;
                PriceCatCB.SelectedIndex  = Product.product_selectedPrice;


                ProductID = Product.product_id;

                LoadProducts(Product.product_name);
                ProcutCountTX.Focus();
            }
        }
コード例 #2
0
 private void ProcutCountTX_GotKeyboardFocus(dynamic sender, dynamic e)
 {
     ProcutCountTX.SelectAll();
 }