Misc. forgot all changes

Working on Cashier Checkout
This commit is contained in:
unknown committed 2011-02-05 01:00:55 +05:30
1 parent 0f323f8fab
commit 1400f42989
32 files changed
+4591 -255

No files matched your search

@@ -0,0 +1,33 @@
//using System;
//using FluentNHibernate.Conventions;
//using System.Reflection;
//using FluentNHibernate;
//using FluentNHibernate.Conventions.Instances;
//using FluentNHibernate.Conventions.Inspections;
//using FluentNHibernate.Conventions.AcceptanceCriteria;
//using Tanshu.Accounts.Contracts;
//namespace Tanshu.Accounts.Conventions
//{
// public class AllowNullConvention : IPropertyConvention, IPropertyConventionAcceptance
// {
// public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
// {
// criteria.Expect(
// x => !this.IsNullableProperty(x)
// || x.Property.MemberInfo.GetCustomAttributes(typeof(AllowNullAttribute), true).Length > 0);
// }
// public void Apply(IPropertyInstance instance)
// {
// instance.Nullable();
// }
// private bool IsNullableProperty(IExposedThroughPropertyInspector target)
// {
// var type = target.Property.PropertyType;
// return type.Equals(typeof(string)) || (type.IsGenericType && type.GetGenericTypeDefinition().Equals(typeof(Nullable<>)));
// }
// }
//}
+60 -60
View File
@@ -360,66 +360,66 @@ namespace Tanshu.Accounts.Repository
{
using (var session = SessionManager.StatelessSession)
{
session.Insert(new FoodTable() { Name = "1" });
session.Insert(new FoodTable() { Name = "2" });
session.Insert(new FoodTable() { Name = "3" });
session.Insert(new FoodTable() { Name = "4" });
session.Insert(new FoodTable() { Name = "5" });
session.Insert(new FoodTable() { Name = "6" });
session.Insert(new FoodTable() { Name = "7" });
session.Insert(new FoodTable() { Name = "8" });
session.Insert(new FoodTable() { Name = "9" });
session.Insert(new FoodTable() { Name = "10" });
session.Insert(new FoodTable() { Name = "11" });
session.Insert(new FoodTable() { Name = "12" });
session.Insert(new FoodTable() { Name = "13" });
session.Insert(new FoodTable() { Name = "14" });
session.Insert(new FoodTable() { Name = "15" });
session.Insert(new FoodTable() { Name = "16" });
session.Insert(new FoodTable() { Name = "17" });
session.Insert(new FoodTable() { Name = "18" });
session.Insert(new FoodTable() { Name = "19" });
session.Insert(new FoodTable() { Name = "20" });
session.Insert(new FoodTable() { Name = "21" });
session.Insert(new FoodTable() { Name = "22" });
session.Insert(new FoodTable() { Name = "23" });
session.Insert(new FoodTable() { Name = "24" });
session.Insert(new FoodTable() { Name = "25" });
session.Insert(new FoodTable() { Name = "26" });
session.Insert(new FoodTable() { Name = "27" });
session.Insert(new FoodTable() { Name = "28" });
session.Insert(new FoodTable() { Name = "29" });
session.Insert(new FoodTable() { Name = "30" });
session.Insert(new FoodTable() { Name = "31" });
session.Insert(new FoodTable() { Name = "32" });
session.Insert(new FoodTable() { Name = "33" });
session.Insert(new FoodTable() { Name = "34" });
session.Insert(new FoodTable() { Name = "35" });
session.Insert(new FoodTable() { Name = "36" });
session.Insert(new FoodTable() { Name = "37" });
session.Insert(new FoodTable() { Name = "38" });
session.Insert(new FoodTable() { Name = "39" });
session.Insert(new FoodTable() { Name = "40" });
session.Insert(new FoodTable() { Name = "41" });
session.Insert(new FoodTable() { Name = "42" });
session.Insert(new FoodTable() { Name = "43" });
session.Insert(new FoodTable() { Name = "44" });
session.Insert(new FoodTable() { Name = "45" });
session.Insert(new FoodTable() { Name = "46" });
session.Insert(new FoodTable() { Name = "47" });
session.Insert(new FoodTable() { Name = "48" });
session.Insert(new FoodTable() { Name = "49" });
session.Insert(new FoodTable() { Name = "50" });
session.Insert(new FoodTable() { Name = "51" });
session.Insert(new FoodTable() { Name = "52" });
session.Insert(new FoodTable() { Name = "53" });
session.Insert(new FoodTable() { Name = "54" });
session.Insert(new FoodTable() { Name = "55" });
session.Insert(new FoodTable() { Name = "56" });
session.Insert(new FoodTable() { Name = "57" });
session.Insert(new FoodTable() { Name = "58" });
session.Insert(new FoodTable() { Name = "59" });
session.Insert(new FoodTable() { Name = "60" });
session.Insert(new FoodTable() { Location = "", Name = "1" });
session.Insert(new FoodTable() { Location = "", Name = "2" });
session.Insert(new FoodTable() { Location = "", Name = "3" });
session.Insert(new FoodTable() { Location = "", Name = "4" });
session.Insert(new FoodTable() { Location = "", Name = "5" });
session.Insert(new FoodTable() { Location = "", Name = "6" });
session.Insert(new FoodTable() { Location = "", Name = "7" });
session.Insert(new FoodTable() { Location = "", Name = "8" });
session.Insert(new FoodTable() { Location = "", Name = "9" });
session.Insert(new FoodTable() { Location = "", Name = "10" });
session.Insert(new FoodTable() { Location = "", Name = "11" });
session.Insert(new FoodTable() { Location = "", Name = "12" });
session.Insert(new FoodTable() { Location = "", Name = "13" });
session.Insert(new FoodTable() { Location = "", Name = "14" });
session.Insert(new FoodTable() { Location = "", Name = "15" });
session.Insert(new FoodTable() { Location = "", Name = "16" });
session.Insert(new FoodTable() { Location = "", Name = "17" });
session.Insert(new FoodTable() { Location = "", Name = "18" });
session.Insert(new FoodTable() { Location = "", Name = "19" });
session.Insert(new FoodTable() { Location = "", Name = "20" });
session.Insert(new FoodTable() { Location = "", Name = "21" });
session.Insert(new FoodTable() { Location = "", Name = "22" });
session.Insert(new FoodTable() { Location = "", Name = "23" });
session.Insert(new FoodTable() { Location = "", Name = "24" });
session.Insert(new FoodTable() { Location = "", Name = "25" });
session.Insert(new FoodTable() { Location = "", Name = "26" });
session.Insert(new FoodTable() { Location = "", Name = "27" });
session.Insert(new FoodTable() { Location = "", Name = "28" });
session.Insert(new FoodTable() { Location = "", Name = "29" });
session.Insert(new FoodTable() { Location = "", Name = "30" });
session.Insert(new FoodTable() { Location = "", Name = "31" });
session.Insert(new FoodTable() { Location = "", Name = "32" });
session.Insert(new FoodTable() { Location = "", Name = "33" });
session.Insert(new FoodTable() { Location = "", Name = "34" });
session.Insert(new FoodTable() { Location = "", Name = "35" });
session.Insert(new FoodTable() { Location = "", Name = "36" });
session.Insert(new FoodTable() { Location = "", Name = "37" });
session.Insert(new FoodTable() { Location = "", Name = "38" });
session.Insert(new FoodTable() { Location = "", Name = "39" });
session.Insert(new FoodTable() { Location = "", Name = "40" });
session.Insert(new FoodTable() { Location = "", Name = "41" });
session.Insert(new FoodTable() { Location = "", Name = "42" });
session.Insert(new FoodTable() { Location = "", Name = "43" });
session.Insert(new FoodTable() { Location = "", Name = "44" });
session.Insert(new FoodTable() { Location = "", Name = "45" });
session.Insert(new FoodTable() { Location = "", Name = "46" });
session.Insert(new FoodTable() { Location = "", Name = "47" });
session.Insert(new FoodTable() { Location = "", Name = "48" });
session.Insert(new FoodTable() { Location = "", Name = "49" });
session.Insert(new FoodTable() { Location = "", Name = "50" });
session.Insert(new FoodTable() { Location = "", Name = "51" });
session.Insert(new FoodTable() { Location = "", Name = "52" });
session.Insert(new FoodTable() { Location = "", Name = "53" });
session.Insert(new FoodTable() { Location = "", Name = "54" });
session.Insert(new FoodTable() { Location = "", Name = "55" });
session.Insert(new FoodTable() { Location = "", Name = "56" });
session.Insert(new FoodTable() { Location = "", Name = "57" });
session.Insert(new FoodTable() { Location = "", Name = "58" });
session.Insert(new FoodTable() { Location = "", Name = "59" });
session.Insert(new FoodTable() { Location = "", Name = "60" });
}
}
#endregion
@@ -1,24 +1,20 @@
using System;
using FluentNHibernate.Conventions;
using System.Reflection;
using FluentNHibernate;
using FluentNHibernate.Conventions.Instances;
using FluentNHibernate.Conventions.Inspections;
using FluentNHibernate.Conventions.AcceptanceCriteria;
using Tanshu.Accounts.Contracts;
//using System;
//using FluentNHibernate.Conventions;
//using System.Reflection;
//using FluentNHibernate;
//using FluentNHibernate.Conventions.Instances;
//using FluentNHibernate.Conventions.Inspections;
//using FluentNHibernate.Conventions.AcceptanceCriteria;
//using Tanshu.Accounts.Contracts;
namespace Tanshu.Accounts.Conventions
{
public class NotNullConvention : IPropertyConvention
{
public void Apply(IPropertyInstance instance)
{
if (!HasAttribute(instance.Property.MemberInfo)) return;
instance.Not.Nullable();
}
bool HasAttribute(ICustomAttributeProvider provider)
{
return provider.GetCustomAttributes(typeof(NotNullAttribute), false).Length == 1;
}
}
}
//namespace Tanshu.Accounts.Conventions
//{
// public class NotNullConvention : IPropertyConvention
// {
// public void Apply(IPropertyInstance instance)
// {
// instance.Not.Nullable();
// }
// }
//}
+1 -3
View File
@@ -29,9 +29,7 @@ namespace Tanshu.Accounts.SqlDAO
public class NHSQLInterceptor : EmptyInterceptor, IInterceptor
{
SqlString
IInterceptor.OnPrepareStatement
(SqlString sql)
SqlString IInterceptor.OnPrepareStatement(SqlString sql)
{
QueryStore.Query = sql.ToString();
return sql;
+2 -1
View File
@@ -51,7 +51,8 @@ namespace Tanshu.Accounts.Repository
c.Add<CustomForeignKeyConvention>();
c.Add<ClassConvention>();
c.Add<CascadeConvention>();
c.Add<NotNullConvention>();
//c.Add<AllowNullConvention>();
//c.Add<NotNullConvention>();
//c.Add(DefaultLazy.Never());
//c.Add<EnumConvention>();
});