Esempio n. 1
0
        public QueryResult QueryOrderCheckMasterList(OrderCheckMasterQueryFilter request)
        {
            int totalCount;

            return(new QueryResult()
            {
                Data = ObjectFactory <IOrderCheckMasterQueryDA> .Instance.Query(request, out totalCount),
                TotalCount = totalCount
            });
        }
Esempio n. 2
0
        public virtual DataTable Query(OrderCheckMasterQueryFilter queryCriteria, out int totalCount)
        {
            PagingInfoEntity pagingEntity = new PagingInfoEntity();

            pagingEntity.SortField     = queryCriteria.PagingInfo.SortBy;
            pagingEntity.MaximumRows   = queryCriteria.PagingInfo.PageSize;
            pagingEntity.StartRowIndex = queryCriteria.PagingInfo.PageIndex * queryCriteria.PagingInfo.PageSize;
            var cmd = DataCommandManager.CreateCustomDataCommandFromConfig("GetOrderCheckMaster");

            using (var sqlBuilder = new DynamicQuerySqlBuilder(cmd.CommandText, cmd, pagingEntity, " SysNo "))
            {
                cmd.SetParameterValue("@CompanyCode", queryCriteria.CompanyCode);
                cmd.CommandText = sqlBuilder.BuildQuerySql();
                DataTable dt = cmd.ExecuteDataTable(3, typeof(OrderCheckStatus));
                totalCount = dt.Rows.Count;
                return(dt);
            }
        }
Esempio n. 3
0
        private void DataGrid_Result_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e)
        {
            OrderCheckMasterQueryFilter request = new OrderCheckMasterQueryFilter();

            request.PagingInfo = new PagingInfo
            {
                PageSize  = int.MaxValue,
                PageIndex = e.PageIndex,
                SortBy    = e.SortField
            };
            request.CompanyCode = CPApplication.Current.CompanyCode;
            OrderCheckMasterFacade facade = new OrderCheckMasterFacade(this);

            facade.QueryOrderCheckMaster(request, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                List <OrderCheckMasterVM> list     = DynamicConverter <OrderCheckMasterVM> .ConvertToVMList(args.Result.Rows);
                dataGridOrderCheckList.ItemsSource = list;
                dataGridOrderCheckList.TotalCount  = list.Count();
            });
        }
Esempio n. 4
0
        public void QueryOrderCheckMaster(OrderCheckMasterQueryFilter request, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            string relativeUrl = "/CustomerService/OrderCheckMaster/Query";

            restClient.QueryDynamicData(relativeUrl, request, callback);
        }