コード例 #1
0
        /// <summary>
        /// 货道中的产品选中
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AsileButtonChecked(object sender, MouseButtonEventArgs e)
        {
            var goodsWay = (sender as GoodsWayProduct);

            if (goodsWay == currentGoodsWay)
            {
                return;
            }
            if (goodsWay != null)
            {
                if (currentGoodsWay != null)
                {
                    currentGoodsWay.ToNormal();
                }
                goodsWay.ToCheck();
                currentGoodsWay = goodsWay;
            }

            ShowAsileInfo();
            if (currentGoodsWay.CurrentGoodsWayProduct != null)
            {
                ControlAsile(true);
            }
            else
            {
                ControlAsile(false);
            }
        }
コード例 #2
0
        /// <summary>
        /// 货道中的产品选中
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GoodsWayChecked(object sender, MouseButtonEventArgs e)
        {
            if (CheckIsTesting())
            {
                return;
            }

            var goodsWay = (sender as GoodsWayProduct);

            if (goodsWay == currentGoodsWay)
            {
                return;
            }
            if (goodsWay != null)
            {
                if (currentGoodsWay != null)
                {
                    currentGoodsWay.ToNormal();
                }
                goodsWay.ToCheck();
                currentGoodsWay = goodsWay;
            }
            if (currentGoodsWay.CurrentGoodsWayProduct != null)
            {
                btnTest.IsEnabled = true;
                m_AsileCode       = currentGoodsWay.CurrentGoodsWayProduct.PaCode;
            }
            else
            {
                btnTest.IsEnabled = false;
                m_AsileCode       = string.Empty;
            }
        }
コード例 #3
0
        /// <summary>
        /// 货道中的产品选中
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GoodsWayChecked(object sender, MouseButtonEventArgs e)
        {
            if (CheckIsTesting())
            {
                return;
            }

            var goodsWay = (sender as GoodsWayProduct);

            if (goodsWay == currentGoodsWay)
            {
                return;
            }
            if (goodsWay != null)
            {
                if (currentGoodsWay != null)
                {
                    currentGoodsWay.ToNormal();
                }
                goodsWay.ToCheck();
                currentGoodsWay = goodsWay;
            }
            if (currentGoodsWay.CurrentGoodsWayProduct != null)
            {
                ////ResetProductInventory(currentGoodsWay.CurrentGoodsWayProduct.SurNum);
                ////btnSave.IsEnabled = true;
                // 开始单货道测试
                m_TestType          = "0";
                tbAsileTest.Text    = m_Title_SingleTest;
                m_TestCode          = currentGoodsWay.CurrentGoodsWayProduct.PaCode;
                tbNowAsileCode.Text = m_TestCode;
                Thread TrdAsileTest = new Thread(new ThreadStart(AsileTestTrd));
                TrdAsileTest.IsBackground = true;
                TrdAsileTest.Start();
            }
        }
コード例 #4
0
        /// <summary>
        /// 货道中的产品选中
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GoodsWayChecked(object sender, MouseButtonEventArgs e)
        {
            var goodsWay = (sender as GoodsWayProduct);

            if (goodsWay == currentGoodsWay)
            {
                return;
            }
            if (goodsWay != null)
            {
                if (currentGoodsWay != null)
                {
                    currentGoodsWay.ToNormal();
                }
                goodsWay.ToCheck();
                currentGoodsWay = goodsWay;
            }

            if (currentGoodsWay.CurrentGoodsWayProduct != null)
            {
                bdFillUpNumArea.Background = new SolidColorBrush(Colors.White);
                ResetProductInventory(currentGoodsWay.CurrentGoodsWayProduct.SurNum);
                btnDelete.Source = new BitmapImage(new Uri(SkinHelper.FILEPATH_REDUCE_NORMAL));

                tbBatch_Value.Text        = currentGoodsWay.CurrentGoodsWayProduct.PiCi;
                tbMaxValidDate_Value.Text = currentGoodsWay.CurrentGoodsWayProduct.MaxValidDate;
                tbProductDate_Value.Text  = currentGoodsWay.CurrentGoodsWayProduct.ProductDate;
                tbBatch_Value.IsEnabled   = tbMaxValidDate_Value.IsEnabled = tbProductDate_Value.IsEnabled = true;

                btnSave.IsEnabled = btnTrayFull.IsEnabled = true;

                int intSurNum    = currentGoodsWay.CurrentGoodsWayProduct.SurNum;    // 当前货道库存
                int intSpringNum = currentGoodsWay.CurrentGoodsWayProduct.SpringNum; // 当前货道弹簧圈数
                if (intSurNum < intSpringNum)
                {
                    #region 当前货道的库存小于货道弹簧圈数
                    if ((intSpringNum >= 1) && (intSurNum == 0))
                    {
                        btnAdd.Source       = new BitmapImage(new Uri(SkinHelper.FILEPATH_ADD_NORMAL));
                        btnDelete.Source    = new BitmapImage(new Uri(SkinHelper.FILEPATH_REDUCE_GRAY));
                        btnAdd.IsEnabled    = true;
                        btnDelete.IsEnabled = false;
                    }
                    else
                    {
                        btnAdd.Source    = new BitmapImage(new Uri(SkinHelper.FILEPATH_ADD_NORMAL));
                        btnDelete.Source = new BitmapImage(new Uri(SkinHelper.FILEPATH_REDUCE_NORMAL));
                        btnAdd.IsEnabled = btnDelete.IsEnabled = true;
                    }
                    #endregion
                }
                else
                {
                    btnAdd.Source       = new BitmapImage(new Uri(SkinHelper.FILEPATH_ADD_GRAY));
                    btnDelete.Source    = new BitmapImage(new Uri(SkinHelper.FILEPATH_REDUCE_NORMAL));
                    btnAdd.IsEnabled    = false;
                    btnDelete.IsEnabled = true;
                }
            }
            else
            {
                bdFillUpNumArea.Background = new SolidColorBrush(Color.FromRgb(209, 204, 204));
                btnDelete.Source           = new BitmapImage(new Uri(SkinHelper.FILEPATH_REDUCE_GRAY));
                btnAdd.Source           = new BitmapImage(new Uri(SkinHelper.FILEPATH_ADD_GRAY));
                btnSave.IsEnabled       = btnTrayFull.IsEnabled = false;
                tbBatch_Value.Text      = tbMaxValidDate_Value.Text = tbProductDate_Value.Text = string.Empty;
                tbBatch_Value.IsEnabled = tbMaxValidDate_Value.IsEnabled = tbProductDate_Value.IsEnabled = false;
            }
        }