2011-12-05 09:41:02 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using NHibernate;
|
2011-01-30 07:14:05 +00:00
|
|
|
|
using Tanshu.Accounts.Entities;
|
2011-01-31 20:33:22 +00:00
|
|
|
|
using NHibernate.Criterion;
|
2011-01-30 07:14:05 +00:00
|
|
|
|
|
|
|
|
|
namespace Tanshu.Accounts.Repository
|
|
|
|
|
{
|
2011-12-05 09:41:02 +00:00
|
|
|
|
public class WaiterBI : FluentGenericBase<Waiter>
|
2011-01-30 07:14:05 +00:00
|
|
|
|
{
|
|
|
|
|
|
2011-12-05 09:41:02 +00:00
|
|
|
|
public WaiterBI()
|
|
|
|
|
: base()
|
|
|
|
|
{ }
|
|
|
|
|
public WaiterBI(bool beginTransaction)
|
|
|
|
|
: base(beginTransaction)
|
|
|
|
|
{ }
|
|
|
|
|
public WaiterBI(ISession session)
|
|
|
|
|
: base(session)
|
|
|
|
|
{ }
|
|
|
|
|
public WaiterBI(ISession session, bool beginTransaction)
|
|
|
|
|
: base(session, beginTransaction)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
public static IList<Waiter> List(Dictionary<string, string> filter)
|
2011-01-30 07:14:05 +00:00
|
|
|
|
{
|
2011-12-05 09:41:02 +00:00
|
|
|
|
using (var bi = new WaiterBI(false))
|
|
|
|
|
return bi.Query()
|
|
|
|
|
.WhereRestrictionOn(x => x.Name).IsLike(string.Format("%{0}%", filter["Name"]))
|
|
|
|
|
.List();
|
2011-01-30 07:14:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|