Пример #1
0
        //加载组合商品的属性
        private void LoadProps()
        {
            AssembleItem assProduct = gVAssembleItem.GetFocusedRow() as AssembleItem;

            if (assProduct != null)
            {
                View_ShopItem item = new View_ShopItem();
                item.cid            = assProduct.Cid;
                item.props          = assProduct.Props;
                item.input_str      = assProduct.InputStr == null ? string.Empty : assProduct.InputStr;
                item.input_pids     = assProduct.InputPids == null ? string.Empty : assProduct.InputPids;
                item.property_alias = assProduct.SkuProps;
                UIHelper.LoadItemPropValue(item, categoryRowKeyProps, categoryRowSaleProps, categoryRowNotKeyProps, categoryRowStockProps);
            }
        }
Пример #2
0
        /// <summary>
        /// 点击显示商品属性
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gvProductSJ_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
        {
            DataRow row = gvProductSJ.GetFocusedDataRow();

            if (row != null && row["OuterID"] != null && row["SkuOuterID"] != null)
            {
                StockItem    stockItem    = StockItemService.GetStockItemByOutId(row["OuterID"].ToString());
                StockProduct stockProduct = StockProductService.GetStockProduct(row["SkuOuterID"].ToString());
                if (stockItem != null && stockProduct != null)
                {
                    View_ShopItem item = new View_ShopItem();
                    item.props          = stockItem.Props;
                    item.input_pids     = stockItem.InputPids;
                    item.input_str      = stockItem.InputStr;
                    item.property_alias = stockProduct.PropsAlias;
                    item.cid            = stockItem.Cid;
                    UIHelper.LoadItemPropValue(item, categoryKeyProps, categorySaleProps, categoryNotKeyProps, categoryInputProps);
                }
            }
        }
Пример #3
0
 /// <summary>
 /// 展示商品属性的方法
 /// </summary>
 /// <param name="gv"></param>
 void ShowProps(GridView gv)
 {
     /*如果显示的是属性panel才去加载属性*/
     if (panelContainer1.ActiveChild.Name == dockPanel1.Name)
     {
         DataRow row = gv.GetFocusedDataRow();
         if (row != null && row["OuterID"] != null && row["SkuOuterID"] != null)
         {
             List <View_StockItemProduct> tempVsipList = View_StockItemProductService.GetView_StockItemProduct(v => v.OuterID == row["OuterID"].ToString() && v.SkuOuterID == row["SkuOuterID"].ToString());
             if (tempVsipList.Count > 0)
             {
                 View_StockItemProduct vsip = tempVsipList.First();
                 View_ShopItem         item = new View_ShopItem();
                 item.props          = vsip.Props;
                 item.input_pids     = vsip.InputPids;
                 item.input_str      = vsip.InputStr;
                 item.property_alias = vsip.PropsAlias;
                 item.cid            = vsip.Cid;
                 UIHelper.LoadItemPropValue(item, categoryRowKeyProps, categoryRowSaleProps, categoryNotKeyProps, categoryRowInputProps);
             }
         }
     }
 }
Пример #4
0
        /// <summary>
        /// 加载库位和商品属性
        /// </summary>
        /// <param name="repositoryItemComboBoxLayout"></param>
        /// <param name="houseCode"></param>
        /// <param name="skuOuterID"></param>
        /// <param name="outerID"></param>
        /// <param name="categoryRowKeyProps"></param>
        /// <param name="categoryRowSaleProps"></param>
        /// <param name="categoryRowNotKeyProps"></param>
        /// <param name="categoryRowStockProps"></param>
        public void LoadLayoutAndProps(RepositoryItemComboBox repositoryItemComboBoxLayout, GridView gridView
                                       , CategoryRow categoryRowKeyProps, CategoryRow categoryRowSaleProps, CategoryRow categoryRowNotKeyProps, CategoryRow categoryRowStockProps)
        {
            DataRow row = gridView.GetFocusedDataRow();

            if (row == null)
            {
                return;
            }

            string houseCode  = row["HouseCode"] == null ? string.Empty : row["HouseCode"].ToString();
            string outerID    = row["OuterID"] == null ? string.Empty : row["OuterID"].ToString();
            string skuOuterID = row["SkuOuterID"] == null ? string.Empty : row["SkuOuterID"].ToString();

            repositoryItemComboBoxLayout.Items.Clear();
            if (!string.IsNullOrEmpty(houseCode))
            {
                LoadLayout(repositoryItemComboBoxLayout, houseCode);
            }

            /*点击显示商品属性*/
            if (!string.IsNullOrEmpty(outerID) && !string.IsNullOrEmpty(skuOuterID))
            {
                StockItem    stockItem    = StockItemService.GetStockItemByOutId(outerID);
                StockProduct stockProduct = StockProductService.GetStockProduct(skuOuterID);
                if (stockItem != null && stockProduct != null)
                {
                    View_ShopItem item = new View_ShopItem();
                    item.props          = stockItem.Props;
                    item.input_pids     = stockItem.InputPids;
                    item.input_str      = stockItem.InputStr;
                    item.property_alias = stockProduct.PropsAlias;
                    item.cid            = stockItem.Cid;
                    UIHelper.LoadItemPropValue(item, categoryRowKeyProps, categoryRowSaleProps, categoryRowNotKeyProps, categoryRowStockProps);
                }
            }
        }