Exemple #1
0
        public QueryResult QuerySaleGiftLog(SaleGiftLogQueryFilter request)
        {
            int totalCount;
            var data = ObjectFactory <ISaleGiftQueryDA> .Instance.QuerySaleGiftLog(request, out totalCount);

            var source = new QueryResult {
                Data = data, TotalCount = totalCount
            };

            return(source);
        }
Exemple #2
0
        /// <summary>
        /// 查询Log
        /// </summary>
        /// <param name="filterVM"></param>
        /// <param name="callback"></param>
        public void QueryLog(SaleGiftLogQueryFilterViewModel filterVM, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            string relativeUrl            = "/MKTService/SaleGift/QuerySaleGiftLog";
            SaleGiftLogQueryFilter filter = filterVM.ConvertVM <SaleGiftLogQueryFilterViewModel, SaleGiftLogQueryFilter>();

            restClient.QueryDynamicData(relativeUrl, filter, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                callback(obj, args);
            });
        }
Exemple #3
0
        public System.Data.DataTable QuerySaleGiftLog(SaleGiftLogQueryFilter filter, out int totalCount)
        {
            PagingInfoEntity pagingEntity = new PagingInfoEntity();

            pagingEntity.SortField     = filter.PageInfo.SortBy;
            pagingEntity.MaximumRows   = filter.PageInfo.PageSize;
            pagingEntity.StartRowIndex = filter.PageInfo.PageIndex * filter.PageInfo.PageSize;
            var cmd = DataCommandManager.CreateCustomDataCommandFromConfig("QuerySaleGiftLog");


            using (var sqlBuilder = new DynamicQuerySqlBuilder(cmd.CommandText, cmd, pagingEntity, "A.SysNo DESC"))
            {
                sqlBuilder.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "A.ProductSysNo",
                                                             DbType.Int32, "@ProductSysNo", QueryConditionOperatorType.Equal, filter.ProductSysNo);

                cmd.CommandText = sqlBuilder.BuildQuerySql();


                DataTable dt = cmd.ExecuteDataTable("IsOnlineShow", typeof(GiftIsOnlineShow));

                totalCount = Convert.ToInt32(cmd.GetParameterValue("@TotalCount"));
                return(dt);
            }
        }