コード例 #1
0
        public void QueryLendRequest(LendRequestQueryVM model, Action <int, List <dynamic> > callback)
        {
            LendRequestQueryFilter filter;

            model.CompanyCode = CPApplication.Current.CompanyCode;
            filter            = model.ConvertVM <LendRequestQueryVM, LendRequestQueryFilter>();

            string relativeUrl = "/InventoryService/LendRequest/QueryLendRequest";

            restClient.QueryDynamicData(relativeUrl, filter,
                                        (obj, args) =>
            {
                if (!args.FaultsHandle())
                {
                    List <dynamic> result = null;
                    int totalCount        = 0;
                    if (!(args.Result == null || args.Result.Rows == null))
                    {
                        result     = args.Result.Rows.ToList();
                        totalCount = args.Result.TotalCount;
                    }
                    if (callback != null)
                    {
                        callback(totalCount, result);
                    }
                }
            });
        }
コード例 #2
0
        public void QueryLendRequest(LendRequestQueryVM model, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            LendRequestQueryFilter filter;

            filter = model.ConvertVM <LendRequestQueryVM, LendRequestQueryFilter>();

            filter.PagingInfo = new PagingInfo
            {
                PageSize  = PageSize,
                PageIndex = PageIndex,
                SortBy    = SortField
            };

            string relativeUrl = "/InventoryService/LendRequest/QueryLendRequest";

            restClient.QueryDynamicData(relativeUrl, filter,
                                        (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }

                if (!(args == null || args.Result == null || args.Result.Rows == null))
                {
                    foreach (var item in args.Result.Rows)
                    {
                        item.IsChecked = false;
                    }
                }
                callback(obj, args);
            }
                                        );
        }
コード例 #3
0
        /// <summary>
        /// 按照PM导出查询结果
        /// </summary>
        /// <param name="model"></param>
        /// <param name="columns"></param>
        public void ExportExcelForLendRequestByPM(LendRequestQueryVM model, ColumnSet[] columns)
        {
            LendRequestQueryFilter queryFilter;

            model.CompanyCode = CPApplication.Current.CompanyCode;
            queryFilter       = model.ConvertVM <LendRequestQueryVM, LendRequestQueryFilter>();
            string relativeUrl = "/InventoryService/LendRequest/ExportAllByPM";

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