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

@ -14,12 +14,5 @@ namespace Tanshu.Accounts.Contracts
return new Guid("2C716F4B-0736-429A-AD51-610D7C47CB5E");
}
}
public static Guid WAITER
{
get
{
return new Guid("3ECB3BCE-CBBA-461C-BC16-5823FC075AAA");
}
}
}
}

View File

@ -22,12 +22,11 @@ namespace Tanshu.Accounts.Entities
VoucherType = VoucherType.Regular;
}
public Voucher(User user, Customer customer, FoodTable table, Waiter waiter, bool printed, bool isVoid, string narration)
public Voucher(User user, Customer customer, FoodTable table, bool printed, bool isVoid, string narration)
: this(user)
{
Customer = customer;
Table = table;
Waiter = waiter;
Printed = printed;
Void = isVoid;
Narration = narration;
@ -48,7 +47,6 @@ namespace Tanshu.Accounts.Entities
protected int? _billID;
public virtual int? BillID { get { return _billID; } }
public virtual FoodTable Table { get; set; }
public virtual Waiter Waiter { get; set; }
public virtual Customer Customer { get; set; }
public virtual IList<VoucherSettlement> Settlements { get; set; }
public virtual string Narration { get; set; }
@ -93,8 +91,8 @@ namespace Tanshu.Accounts.Entities
Table("Vouchers");
Schema("dbo");
Lazy(true);
SqlInsert(@"exec VoucherInsert ?,?,?,?,?,?,?,?,?,?,?");
SqlUpdate(@"exec VoucherUpdate ?,?,?,?,?,?,?,?,?,?,?");
SqlInsert(@"exec VoucherInsert ?,?,?,?,?,?,?,?,?,?");
SqlUpdate(@"exec VoucherUpdate ?,?,?,?,?,?,?,?,?,?");
Id(x => x.VoucherID, map => map.Generator(Generators.GuidComb));
Property(x => x.Date, map =>
{
@ -149,13 +147,6 @@ namespace Tanshu.Accounts.Entities
map.Cascade(Cascade.None);
});
ManyToOne(x => x.Waiter, map =>
{
map.Column("WaiterID");
map.NotNullable(true);
map.Cascade(Cascade.None);
});
ManyToOne(x => x.Customer, map =>
{
map.Column("CustomerID");

View File

@ -1,28 +0,0 @@
using System;
using System.Runtime.Serialization;
using Tanshu.Accounts.Contracts;
using NHibernate.Mapping.ByCode.Conformist;
using NHibernate.Mapping.ByCode;
using System.Collections.Generic;
namespace Tanshu.Accounts.Entities
{
public class Waiter
{
public virtual Guid WaiterID { get; set; }
public virtual string Name { get; set; }
public virtual IList<Voucher> Vouchers { get; set; }
}
public class WaiterMap : ClassMapping<Waiter>
{
public WaiterMap()
{
Table("Waiters");
Schema("dbo");
Lazy(true);
Id(x => x.WaiterID, map => map.Generator(Generators.GuidComb));
Property(x => x.Name, map => { map.NotNullable(true); map.Unique(true); });
Bag(x => x.Vouchers, colmap => { colmap.Key(x => x.Column("WaiterID")); colmap.Inverse(true); }, map => { map.OneToMany(); });
}
}
}

View File

@ -89,7 +89,6 @@
<Compile Include="Data Contracts\FoodTableBO.cs" />
<Compile Include="Data Contracts\TaxBO.cs" />
<Compile Include="Data Contracts\CustomerBO.cs" />
<Compile Include="Data Contracts\WaiterBO.cs" />
<Compile Include="Data Contracts\InventoryBO.cs" />
<Compile Include="Data Contracts\ProductBO.cs" />
<Compile Include="Data Contracts\ProductGroupBO.cs" />