public AbstractCriterion Like(String value, MatchMode matchMode)
		{
			return Expression.Like(PropertyName, value, matchMode);
		}
        public IList ExtractOutboundDataFromLocationTransaction(DssOutboundControl dssOutboundControl, string transType, MatchMode matchMode, bool includeRefLoc)
        {
            DetachedCriteria criteria = DetachedCriteria.For(typeof(LocationTransaction));
            criteria.Add(Expression.Gt("Id", dssOutboundControl.Mark));
            criteria.Add(Expression.Like("TransactionType", transType, matchMode));
            if (includeRefLoc)
            {
                criteria.SetProjection(Projections.ProjectionList()
                    .Add(Projections.Max("Id"))
                    .Add(Projections.GroupProperty("OrderNo"))
                    .Add(Projections.GroupProperty("ReceiptNo"))
                    .Add(Projections.GroupProperty("Item"))
                    .Add(Projections.GroupProperty("Location"))
                    .Add(Projections.Sum("Qty"))
                    .Add(Projections.GroupProperty("EffectiveDate"))
                    .Add(Projections.GroupProperty("PartyFrom"))
                    .Add(Projections.GroupProperty("PartyTo"))
                    .Add(Projections.GroupProperty("RefLocation")));
            }
            else
            {
                criteria.SetProjection(Projections.ProjectionList()
                    .Add(Projections.Max("Id"))
                    .Add(Projections.GroupProperty("OrderNo"))
                    .Add(Projections.GroupProperty("ReceiptNo"))
                    .Add(Projections.GroupProperty("Item"))
                    .Add(Projections.GroupProperty("Location"))
                    .Add(Projections.Sum("Qty"))
                    .Add(Projections.GroupProperty("EffectiveDate"))
                    .Add(Projections.GroupProperty("PartyFrom"))
                    .Add(Projections.GroupProperty("PartyTo")));
            }

            return criteriaMgr.FindAll(criteria);
        }
		public InsensitiveLikeExpression( string propertyName, string value, MatchMode matchMode )
			: this( propertyName, matchMode.ToMatchString( value ) )
		{
		}
 public IList ExtractOutboundDataFromLocationTransaction(DssOutboundControl dssOutboundControl, string transType, MatchMode matchMode)
 {
     return ExtractOutboundDataFromLocationTransaction(dssOutboundControl, transType, matchMode, false);
 }
		public static ICriterion InsensitiveLike( string propertyName, string value, MatchMode matchMode )
		{
			return new InsensitiveLikeExpression( propertyName, value, matchMode );
		}
		public static SimpleExpression Like( string propertyName, string value, MatchMode matchMode )
		{
			return new LikeExpression( propertyName, value, matchMode );
		}
		/// <summary>
		/// Use the "like" operator for all string-valued properties with
		/// the specified <see cref="MatchMode"/>.
		/// </summary>
		/// <param name="matchMode">
		/// The <see cref="MatchMode"/> to convert the string to the pattern
		/// for the <c>like</c> comparison.
		/// </param>
		public Example EnableLike(MatchMode matchMode)
		{
			_isLikeEnabled = true;
			_matchMode = matchMode;
			return this;
		}
Beispiel #8
0
 public InsensitiveLikeExpression(string propertyName, string value, MatchMode matchMode)
     : this(propertyName, matchMode.ToMatchString(value))
 {
 }