Ejemplo n.º 1
0
        public virtual QueryResultList QueryRMAProductInventory(RMAInventoryQueryFilter request)
        {
            QueryResultList resultList = new QueryResultList();
            int             totalCount;
            decimal         totalMisCost;
            var             dataTable = ObjectFactory <IReportQueryDA> .Instance.QueryRMAProductInventory(request, out totalCount, out totalMisCost);

            QueryResult resultTable = new QueryResult()
            {
                Data       = dataTable,
                TotalCount = totalCount
            };
            DataTable dt = new DataTable();

            dt.Columns.Add("TotleMisCost", typeof(decimal));
            dt.Rows.Add(totalMisCost);

            QueryResult MisCost = new QueryResult()
            {
                Data = dt
            };

            resultList.Add(resultTable);
            resultList.Add(MisCost);
            return(resultList);
        }
Ejemplo n.º 2
0
        public virtual QueryResultList QueryPOSPay(POSPayQueryFilter request)
        {
            int totalCount;
            var dataSet = ObjectFactory <IPOSPayQueryDA> .Instance.QueryPOSPayConfirmList(request, out totalCount);

            var list = new QueryResultList();

            list.Add(new QueryResult {
                Data = dataSet.Tables[0], TotalCount = totalCount
            });
            list.Add(new QueryResult {
                Data = dataSet.Tables[1], TotalCount = 2
            });
            //return new QueryResultList()
            //{
            //    new QueryResult(){ Data = dataSet.Tables[0], TotalCount = totalCount},
            //    new QueryResult(){ Data = dataSet.Tables[1], TotalCount = 2}
            //};
            return(list);
        }
Ejemplo n.º 3
0
        private QueryResultList GetQueryResult(NeweggAmbassadorOrderQueryFilter filter, QueryResultHandler fun)
        {
            int         totalCount;
            DataSet     ds              = fun(filter, out totalCount);
            DataTable   firstTableInfo  = ds.Tables[0]; //第一个DataTable
            DataTable   secondTableInfo = ds.Tables[1]; //第二个DataTable
            QueryResult listInfo        = new QueryResult();

            listInfo.Data       = firstTableInfo;
            listInfo.TotalCount = totalCount;

            QueryResult summaryResult = new QueryResult();

            summaryResult.Data = secondTableInfo;

            QueryResultList result = new QueryResultList();

            result.Add(listInfo);
            result.Add(summaryResult);
            return(result);
        }
Ejemplo n.º 4
0
        public QueryResultList QueryPayable(PayableQueryFilter request)
        {
            QueryResultList resultList = new QueryResultList();
            int             totalCount;
            DataTable       dtStatistical;
            var             dataTable = ObjectFactory <IPayableQueryDA> .Instance.QueryPayable(request, out totalCount, out dtStatistical);

            dataTable.Columns.Add("SapInFailedDetailReason", typeof(string));

            QueryResult resultTable = new QueryResult()
            {
                Data       = dataTable,
                TotalCount = totalCount
            };
            QueryResult statisticalTable = new QueryResult()
            {
                Data = dtStatistical
            };

            resultList.Add(resultTable);
            resultList.Add(statisticalTable);
            return(resultList);
        }
Ejemplo n.º 5
0
        public QueryResultList QueryShiftCountData(ShiftRequestQueryFilter queryFilter)
        {
            SetShiftRequestPMRequestRightFilter(queryFilter);
            var data = ObjectFactory <IShiftRequestQueryDA> .Instance.QueryCountData(queryFilter);

            var result = new QueryResultList {
                new QueryResult()
                {
                    Data = data.Tables[0]
                }
            };

            if (data.Tables.Count > 1)
            {
                result.Add(new QueryResult {
                    Data = data.Tables[1]
                });
            }
            return(result);
        }