d8ecec8bb6
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.
20 lines
568 B
C#
20 lines
568 B
C#
using FluentNHibernate.Conventions;
|
|
using FluentNHibernate.Conventions.Instances;
|
|
using System.Diagnostics;
|
|
|
|
namespace Tanshu.Accounts.SqlDAO
|
|
{
|
|
public class InverseConvention : IHasManyConvention //, IReferenceConvention
|
|
{
|
|
public void Apply(IOneToManyCollectionInstance instance)
|
|
{
|
|
var property = instance.Member;
|
|
if (!AttributeChecker.Inverse(property)) return;
|
|
Trace.TraceInformation("Inverse on {0}.{1}", property.DeclaringType.Name, property.Name);
|
|
instance.Inverse();
|
|
}
|
|
}
|
|
}
|
|
|
|
|