/// <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; } } }
/// <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; } }
/// <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++; } } }
private void SetAsileInfo(GoodsWayProduct asileInfo) { string strOneText = string.Empty; if (string.IsNullOrEmpty(asileInfo.CurrentGoodsWayProduct.McdCode)) { strOneText = asileInfo.CurrentGoodsWayProduct.PaCode; } else { strOneText = asileInfo.CurrentGoodsWayProduct.PaCode + " " + asileInfo.CurrentGoodsWayProduct.McdName;// +"】"; } asileInfo.SetOneText(strOneText); asileInfo.SetSecondText(PubHelper.p_BusinOper.MoneyIntToString(asileInfo.CurrentGoodsWayProduct.SellPrice) + "【" + asileInfo.CurrentGoodsWayProduct.SpringNum + "】"); }
/// <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; }