示例#1
0
        public static string GetSearchPaymentLogCondition(DateTime postDateTimeStart, DateTime postDateTimeEnd, string userName)
        {
            //return BBX.Data.PaymentLogs.GetSearchPaymentLogCondition(postDateTimeStart, postDateTimeEnd, userName);

            var exp = _.BuyDate.Between(postDateTimeStart, postDateTimeEnd);

            if (!String.IsNullOrEmpty(userName))
            {
                //exp&=_.Uid.In(User.FindSQLWithKey(userName));
                var list = User.Search(userName);
                if (list.Count > 0)
                {
                    var arr = list.GetItem <Int32>(__.ID);
                    exp &= _.Uid.In(arr);
                }
            }

            return(exp);
        }