//加载数据
        private void dgQueryResult_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e)
        {
            if (string.IsNullOrEmpty(queryVM.ProductID))
            {
                queryVM.ProductSysNo = null;
            }

            queryFilter = EntityConverter <ExperienceHallInventoryInfoQueryVM, ExperienceHallInventoryInfoQueryFilter> .Convert(queryVM);

            this.queryFilter.PagingInfo = new QueryFilter.Common.PagingInfo();

            this.queryFilter.PagingInfo.PageIndex = e.PageIndex;
            this.queryFilter.PagingInfo.PageSize  = e.PageSize;
            this.queryFilter.PagingInfo.SortBy    = e.SortField;
            serviceFacade.QueryExperienceHallInventory(queryFilter, (innerObj, innerArgs) =>
            {
                if (innerArgs.FaultsHandle())
                {
                    return;
                }

                int totalCount = innerArgs.Result.TotalCount;
                this.dgQueryResult.ItemsSource = innerArgs.Result.Rows;
                this.dgQueryResult.TotalCount  = totalCount;
            });
        }
Beispiel #2
0
        public void ExportExcelQueryExperienceHallInventory(ExperienceHallInventoryInfoQueryFilter queryFilter, ColumnSet[] columns)
        {
            queryFilter.CompanyCode = CPApplication.Current.CompanyCode;
            string relativeUrl = "/InventoryService/ExperienceHall/ExperienceHallInventoryQuery";

            restClient.ExportFile(relativeUrl, queryFilter, columns);
        }
Beispiel #3
0
        public void QueryExperienceHallInventory(ExperienceHallInventoryInfoQueryFilter queryFilter, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            queryFilter.CompanyCode = CPApplication.Current.CompanyCode;
            string relativeUrl = "/InventoryService/ExperienceHall/ExperienceHallInventoryQuery";

            restClient.QueryDynamicData(relativeUrl, queryFilter, callback);
        }
 public override void OnPageLoad(object sender, EventArgs e)
 {
     base.OnPageLoad(sender, e);
     queryFilter      = new ExperienceHallInventoryInfoQueryFilter();
     queryVM          = new ExperienceHallInventoryInfoQueryVM();
     serviceFacade    = new ExperienceMaintainFacade(this);
     this.DataContext = queryVM;
 }
        public QueryResult QueryExperienceHallInventory(ExperienceHallInventoryInfoQueryFilter request)
        {
            int totalCount;
            var dataTable = ObjectFactory <IExperienceHallQueryDA> .Instance.
                            QueryExperienceHallInventory(request, out totalCount);

            return(new QueryResult()
            {
                Data = dataTable,
                TotalCount = totalCount
            });
        }
        //导出
        private void dgQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            ExperienceHallInventoryInfoQueryFilter exportQueryRequest = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <ExperienceHallInventoryInfoQueryFilter>(queryFilter);

            exportQueryRequest.PagingInfo = new QueryFilter.Common.PagingInfo()
            {
                PageIndex = 0, PageSize = ConstValue.MaxRowCountLimit
            };
            ColumnSet columnSet = new ColumnSet()
                                  .Add("ProductID", "商品编号", 20)
                                  .Add("ProductName", "商品名称", 40)
                                  .Add("TotalQty", "体验厅库存", 40)
                                  .Add("OutStockQty", "已出库数量", 20);

            serviceFacade.ExportExcelQueryExperienceHallInventory(exportQueryRequest, new ColumnSet[] { columnSet });
        }