Major refactor of the Sales Form and Bill controller to make code more readable and less error prone.
The functions now only do one thing.
This commit is contained in:
@ -7,18 +7,11 @@ namespace Tanshu.Accounts.Repository
|
||||
{
|
||||
public class CustomerBI : UnitOfWork<Customer>
|
||||
{
|
||||
public IList<Customer> List(Dictionary<string, string> filter)
|
||||
public new IList<Customer> List()
|
||||
{
|
||||
return _session.QueryOver<Customer>()
|
||||
.WhereRestrictionOn(x => x.Name).IsLike(string.Format("%{0}%", filter["Universal"]))
|
||||
.OrderBy(x => x.Name).Asc
|
||||
.List();
|
||||
}
|
||||
public static IList<Customer> StaticList(Dictionary<string, string> filter)
|
||||
{
|
||||
using (var bi = new CustomerBI())
|
||||
{
|
||||
return bi.List(filter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user