narsil/Tanshu.Accounts.Repository/BusinessLayer/PrintLocationBI.cs
unknown d8ecec8bb6 Added inverse Attribute to ProductGroup.
BillInventory Renamed.
Refactored Bill to be more usable.
Added Bill Detail Report.
Added Open Bill and Bill Details Roles.
Zero Rate Products have Yellow background Color.
Refactored UserBI, FoodTableBI, ModifierBI, PrintLocationBI, ProductBI, ProductGroupBI, TaxBI, UserBI,
Cached the Products List.
Product and Product Group Form Working.
2011-06-23 18:17:48 +05:30

26 lines
962 B
C#

using System.Configuration;
using Tanshu.Accounts.Entities;
namespace Tanshu.Accounts.Repository
{
public class PrintLocationBI : FluentBase<PrintLocation>
{
public static PrintLocation BasePrinter
{
get
{
var location = ConfigurationManager.AppSettings["Location"].ToLowerInvariant();
using (var bi = new PrintLocationBI())
return bi.Get(x => x.Location == location && x.ProductGroup == null);
}
}
public static PrintLocation KotPrinter(int productGroupID)
{
var location = ConfigurationManager.AppSettings["Location"].ToLowerInvariant();
using (var bi = new PrintLocationBI())
return bi.Get(x => x.Location == location && x.ProductGroup.ProductGroupID == productGroupID) ??
bi.Get(x => x.Location == location && x.ProductGroup == null);
}
}
}