Chore: Removed Waiter as it was not ever used.

Refactor: Changed the user list form to a normal form.
Feature: Service Charge disabled setting removes it from the Product Form.
This commit is contained in:
tanshu
2016-01-18 16:13:43 +05:30
parent caf9b3106c
commit 69560cfb07
30 changed files with 776 additions and 528 deletions

View File

@ -102,7 +102,6 @@ namespace Tanshu.Accounts.Repository
var entities = new Type[] {
typeof(VoucherMap),
typeof(UserMap),
typeof(WaiterMap),
typeof(CustomerMap),
typeof(UserGroupMap),
typeof(KotMap),

View File

@ -91,7 +91,6 @@
<Compile Include="VoucherBI.cs" />
<Compile Include="VoucherDirtyInterceptor.cs" />
<Compile Include="VoucherSettlementBI.cs" />
<Compile Include="WaiterBI.cs" />
<Compile Include="Session.cs" />
<Compile Include="SetupStore.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />

View File

@ -82,7 +82,6 @@ namespace Tanshu.Accounts.Repository
if (voucher == null)
return voucher;
NHibernateUtil.Initialize(voucher.Customer);
NHibernateUtil.Initialize(voucher.Waiter);
NHibernateUtil.Initialize(voucher.User);
NHibernateUtil.Initialize(voucher.Table);
foreach (var kot in voucher.Kots)
@ -203,7 +202,7 @@ namespace Tanshu.Accounts.Repository
var kot = _session.Get<Kot>(kotID);
var oldVoucher = _session.Get<Voucher>(kot.Voucher.VoucherID);
var table = _session.QueryOver<FoodTable>().Where(x => x.FoodTableID == tableID).SingleOrDefault();
var newVoucher = new Voucher(Session.User, oldVoucher.Customer, table, oldVoucher.Waiter, false, false, "");
var newVoucher = new Voucher(Session.User, oldVoucher.Customer, table, false, false, "");
Insert(newVoucher);
oldVoucher.Kots.Remove(kot);

View File

@ -1,24 +0,0 @@
using System.Collections.Generic;
using NHibernate;
using Tanshu.Accounts.Entities;
using NHibernate.Criterion;
namespace Tanshu.Accounts.Repository
{
public class WaiterBI : UnitOfWork<Waiter>
{
public IList<Waiter> List(Dictionary<string, string> filter)
{
return _session.QueryOver<Waiter>()
.WhereRestrictionOn(x => x.Name).IsLike(string.Format("%{0}%", filter["Name"]))
.List();
}
public static IList<Waiter> StaticList(Dictionary<string, string> filter)
{
using (var bi = new WaiterBI())
{
return bi.List(filter);
}
}
}
}