예제 #1
0
        public void SetSource(GoodsModel productItem, int rowIndex, int columnIndex)
        {
            this.Name = "productItem" + productItem.McdCode;

            ////this.SetValue(Grid.RowProperty, productItem.TrayIndex);

            int intRowIndex = rowIndex;

            if (intRowIndex < 0)
            {
                intRowIndex = 0;
            }
            int intColumnIndex = columnIndex;

            if (intColumnIndex < 0)
            {
                intColumnIndex = 0;
            }

            this.SetValue(Grid.RowProperty, intRowIndex);
            this.SetValue(Grid.ColumnProperty, intColumnIndex);

            //this.SetValue(Grid.ColumnSpanProperty, productItem.ColumnSpan + 1);

            imagePrice.Source = new BitmapImage(new Uri(SkinHelper.p_SkinName + "ProductPage/ProductList/main_price_bottom.png"));
            imgProduct.Source = new BitmapImage(new Uri(PubHelper.GetMcdPic(productItem.PicName)));

            double fds = imgProduct.Width;

            ////imagePrice.Width = imgProduct.Width;// 200;// this.ActualWidth / 3;//2014-8-5

            SetPriceAreaText(productItem);

            this.currentGoodsItem = productItem;

            ////if (this.currentGoodsItem.IsNew)
            ////{
            ////    panelNew.Visibility = System.Windows.Visibility.Visible;
            ////}
            //////panelNew.Visibility = System.Windows.Visibility.Visible;

            SetStock(productItem);
        }
예제 #2
0
 public void RefreshGoodsInfo(GoodsModel productItem)
 {
     SetPriceAreaText(productItem);
     imgProduct.Source = new BitmapImage(new Uri(PubHelper.GetMcdPic(productItem.PicName)));
     SetStock(productItem);
 }