Example #1
0
        /// <summary>
        /// 创建货道
        /// </summary>
        private void CreateAsile(List <AsileModel> products)
        {
            panelAsile.Children.Clear();

            int index = 0;

            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    GoodsWayProduct productControl = new GoodsWayProduct()
                    {
                        HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
                        VerticalAlignment   = System.Windows.VerticalAlignment.Stretch,
                        Margin = new Thickness(5)
                    };
                    productControl.SetBackBackGroud(App.Current.Resources["AsileNormal"] as Brush);
                    productControl.SetCheckBackGround(App.Current.Resources["AsileTest"] as Brush);
                    Grid.SetRow(productControl, i);
                    Grid.SetColumn(productControl, j);
                    panelAsile.Children.Add(productControl);

                    productControl.MouseLeftButtonUp += (GoodsWayChecked);

                    if (index < products.Count)
                    {
                        productControl.SetCurrentGoodsWayProduct(products[index]);
                        productControl.SetOneText(products[index].PaCode);

                        productControl.SetSecondText(GetAsileStatus(products[index].PaStatus));
                    }
                    else
                    {
                        productControl.SetNoGoods(m_NoGoodsTitle);
                    }
                    index++;
                }
            }

            m_AsileCount = panelAsile.Children.Count;

            if (!m_IsTrdOper)
            {
                if (products.Count == 0)
                {
                    btnAsileTest_Begin.IsEnabled = btnAsileTest_Stop.IsEnabled = false;
                }
                else
                {
                    btnAsileTest_Begin.IsEnabled = true;
                    btnAsileTest_Stop.IsEnabled  = false;
                }
            }
        }
Example #2
0
        /// <summary>
        /// 创建货道
        /// </summary>
        private void CreateAsile(List <AsileModel> products)
        {
            panelAsile.Children.Clear();

            int index = 0;

            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    GoodsWayProduct productControl = new GoodsWayProduct()
                    {
                        HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
                        VerticalAlignment   = System.Windows.VerticalAlignment.Stretch,
                        Margin = new Thickness(5)
                    };

                    Grid.SetRow(productControl, i);
                    Grid.SetColumn(productControl, j);
                    panelAsile.Children.Add(productControl);

                    productControl.MouseLeftButtonUp += (GoodsWayChecked);

                    if (index < products.Count)
                    {
                        productControl.SetCurrentGoodsWayProduct(products[index]);
                        productControl.SetOneText(products[index].PaCode +
                                                  "【" + m_Title_SpringNum + products[index].SpringNum + "】");
                        productControl.SetSecondText(m_Title_StockNum.Replace("{N}", products[index].SurNum.ToString()));
                        if (index == 0)
                        {
                            productControl.IsDefaultCheck(true);
                            GoodsWayChecked(productControl, null);
                        }
                    }
                    else
                    {
                        productControl.SetNoGoods(m_Title_NoGoodsTitle);
                    }
                    index++;
                }
            }

            if (products.Count == 0)
            {
                btnTrayFull.IsEnabled = false;
            }
            else
            {
                btnTrayFull.IsEnabled = true;
            }
        }
Example #3
0
        /// <summary>
        /// 创建货道
        /// </summary>
        private void CreateAsile(List <AsileModel> products)
        {
            panelAsile.Children.Clear();

            int index = 0;

            string strLeftRightCodeNum = string.Empty;

            ////string strLeftRightNumsTitle = string.Empty;
            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    GoodsWayProduct productControl = new GoodsWayProduct()
                    {
                        HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
                        VerticalAlignment   = System.Windows.VerticalAlignment.Stretch,
                        Margin = new Thickness(5)
                    };
                    productControl.SetBackBackGroud(App.Current.Resources["AsileNormal"] as Brush);
                    productControl.SetCheckBackGround(App.Current.Resources["AsileTest"] as Brush);
                    Grid.SetRow(productControl, i);
                    Grid.SetColumn(productControl, j);
                    panelAsile.Children.Add(productControl);

                    productControl.MouseLeftButtonUp += (GoodsWayChecked);

                    if (index < products.Count)
                    {
                        productControl.SetCurrentGoodsWayProduct(products[index]);
                        productControl.SetOneText(products[index].PaCode);

                        string strVendBoxCode  = products[index].VendBoxCode;
                        int    intVendBoxIndex = PubHelper.p_BusinOper.AsileOper.GetVendBoxIndex(strVendBoxCode);
                        strLeftRightCodeNum = PubHelper.p_BusinOper.AsileOper.UpDown_GetLeftRightCodeNum(strVendBoxCode,
                                                                                                         products[index].PaId.Substring(1, 1), PubHelper.p_BusinOper.AsileOper.VendBoxList[intVendBoxIndex].SellGoodsType,
                                                                                                         PubHelper.p_BusinOper.ConfigInfo.UpDownLeftRightNum_Left,
                                                                                                         PubHelper.p_BusinOper.ConfigInfo.UpDownLeftRightNum_Center,
                                                                                                         PubHelper.p_BusinOper.ConfigInfo.UpDownLeftRightNum_Right).ToString();
                        productControl.SetSecondText(strLeftRightCodeNum);
                    }
                    else
                    {
                        productControl.SetNoGoods(m_NoGoodsTitle);
                    }
                    index++;
                }
            }
        }
        /// <summary>
        /// 创建货道
        /// </summary>
        private void CreateAsile(List <AsileModel> products)
        {
            panelAsile.Children.Clear();

            int index = 0;

            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    GoodsWayProduct productControl = new GoodsWayProduct()
                    {
                        HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
                        VerticalAlignment   = System.Windows.VerticalAlignment.Stretch,
                        Margin = new Thickness(5)
                    };
                    ////productControl.SetBackBackGroud(App.Current.Resources["AsileNormal"] as Brush);
                    ////productControl.SetCheckBackGround(App.Current.Resources["AsileTest"] as Brush);
                    Grid.SetRow(productControl, i);
                    Grid.SetColumn(productControl, j);
                    panelAsile.Children.Add(productControl);

                    ////////productControl.MouseLeftButtonUp += (GoodsWayChecked);

                    if (index < products.Count)
                    {
                        productControl.SetCurrentGoodsWayProduct(products[index]);
                        productControl.SetOneText(products[index].PaCode +
                                                  "【" + m_Title_SaleNum + "  " + products[index].SaleNum + "】");

                        productControl.SetSecondText(m_Title_SaleMoney + "  " +
                                                     PubHelper.p_BusinOper.MoneyIntToString(products[index].SaleMoney.ToString()));
                    }
                    else
                    {
                        productControl.SetNoGoods(m_NoGoodsTitle);
                    }
                    index++;
                }
            }

            m_AsileCount = panelAsile.Children.Count;
        }
        /// <summary>
        /// 创建货道
        /// </summary>
        private void CreateAsile(List <AsileModel> products)
        {
            panelAsile.Children.Clear();

            int    index      = 0;
            string strOneText = string.Empty;

            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    GoodsWayProduct productControl = new GoodsWayProduct()
                    {
                        HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
                        VerticalAlignment   = System.Windows.VerticalAlignment.Stretch,
                        Margin = new Thickness(5)
                    };

                    Grid.SetRow(productControl, i);
                    Grid.SetColumn(productControl, j);
                    panelAsile.Children.Add(productControl);

                    productControl.MouseLeftButtonUp += (AsileButtonChecked);

                    if (index < products.Count)
                    {
                        productControl.SetCurrentGoodsWayProduct(products[index]);
                        SetAsileInfo(productControl);
                        ////if (string.IsNullOrEmpty(products[index].McdName))
                        ////{
                        ////    strOneText = products[index].PaCode;
                        ////}
                        ////else
                        ////{
                        ////    strOneText = products[index].PaCode + "【" + products[index].McdName + "】";
                        ////}
                        ////productControl.SetOneText(strOneText);
                        ////productControl.SetSecondText(PubHelper.p_BusinOper.MoneyIntToString(products[index].SellPrice));
                        if (index == 0)
                        {
                            productControl.IsDefaultCheck(true);
                            AsileButtonChecked(productControl, null);
                        }
                    }
                    else
                    {
                        productControl.SetNoGoods(m_Title_NoGoodsTitle);
                    }
                    index++;
                }
            }

            if (products.Count == 0)
            {
                ControlAsile(false);
            }
            else
            {
                ControlAsile(true);
            }
        }