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:
tanshu
2016-03-31 12:27:39 +05:30
parent bb2db24837
commit 51d518d2a0
17 changed files with 615 additions and 396 deletions

View File

@ -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);
}
}
}
}