Exemplo n.º 1
0
        /// <summary>
        /// 货卡查询 - 商品总库存信息
        /// </summary>
        /// <param name="queryFilter"></param>
        /// <param name="callback"></param>
        public void QueryItemsCardInventoryTotal(InventoryItemCardQueryVM model, Action <int, List <dynamic> > callback)
        {
            InventoryQueryFilter filter;

            model.CompanyCode           = CPApplication.Current.CompanyCode;
            filter                      = model.ConvertVM <InventoryItemCardQueryVM, InventoryQueryFilter>();
            filter.IsShowTotalInventory = true;

            string relativeUrl = "/InventoryService/Inventory/QueryProductInventory";

            restClient.QueryDynamicData(relativeUrl, filter,
                                        (obj, args) =>
            {
                int totalCount        = 0;
                List <dynamic> vmList = null;
                if (!args.FaultsHandle())
                {
                    if (!(args.Result == null || args.Result.Rows == null))
                    {
                        totalCount = args.Result.TotalCount;
                        vmList     = args.Result.Rows.ToList();
                    }
                    callback(totalCount, vmList);
                }
            });
        }
Exemplo n.º 2
0
        /// <summary>
        /// 导出查询结果
        /// </summary>
        /// <param name="model"></param>
        /// <param name="columns"></param>
        public void ExportExcelForItemsCardOrders(InventoryItemCardQueryVM model, ColumnSet[] columns)
        {
            InventoryItemCardQueryFilter queryFilter;

            model.CompanyCode = CPApplication.Current.CompanyCode;
            queryFilter       = model.ConvertVM <InventoryItemCardQueryVM, InventoryItemCardQueryFilter>();
            string relativeUrl = "InventoryService/InventoryStock/QueryCardItemOrders";

            restClient.ExportFile(relativeUrl, queryFilter, columns);
        }