コード例 #1
0
 private void resultStack_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     product = ((sender as ListBox).SelectedItem as PLUProductCheck);
     nameDescription.Text     = product.nombre;
     PLUDescription.Text      = product.pluProducto;
     QuantityDescription.Text = product.existencia.ToString();
     PriceDescription.Text    = product.precioVenta.ToString();
     skuCheckText.Text        = "";
     skuCheckText.Focus();
     resultStack.ItemsSource = null;
     resultStack.Items.Clear();
     resultStack.Visibility = Visibility.Collapsed;
 }
コード例 #2
0
ファイル: ProductsCheckServices.cs プロジェクト: hiac0493/pos
        public PLUProductCheck GetProductByPLU(string PLU)
        {
            string          webApiUrl  = WebApiMethods.GetProductByPLU + PLU;
            PLUProductCheck product    = new PLUProductCheck();
            var             ResponseOK = App.HttpTools.HttpGetSingle <PLUProductCheck>(webApiUrl, ref product, "No se encontró el producto");

            if (ResponseOK == HttpStatusCode.OK)
            {
                return(product);
            }
            else
            {
                return(null);
            }
        }
コード例 #3
0
 private void OnItemChanged(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         product = ((sender as ListBox).SelectedItem as PLUProductCheck);
         nameDescription.Text     = product.nombre;
         PLUDescription.Text      = product.pluProducto;
         QuantityDescription.Text = product.existencia.ToString();
         PriceDescription.Text    = product.precioVenta.ToString();
         skuCheckText.Text        = "";
         skuCheckText.Focus();
         resultStack.ItemsSource = null;
         resultStack.Items.Clear();
         resultStack.Visibility = Visibility.Collapsed;
     }
 }
コード例 #4
0
        //**************************************************
        //*             WRITE DATA
        //**************************************************
        #endregion
        #region Read data
        //**************************************************
        //*             READ DATA
        //**************************************************
        private void OnKeyDownHandler(object sender, KeyEventArgs e)
        {
            string query = (sender as TextBox).Text;


            if (e.Key == Key.Enter && query != "")
            {
                PLUProductCheck productExtractFromDB = _productCheckPresenter.GetProductByPLU(skuCheckText.Text);
                if (productExtractFromDB != null)
                {
                    nameDescription.Text     = productExtractFromDB.nombre;
                    PLUDescription.Text      = productExtractFromDB.pluProducto;
                    QuantityDescription.Text = productExtractFromDB.existencia.ToString();
                    PriceDescription.Text    = productExtractFromDB.precioVenta.ToString();
                    skuCheckText.Text        = string.Empty;
                }
            }
        }