Partly working
This commit is contained in:
15
Tanshu.Accounts.Contracts/DAOFactory/FoodTableDAO.cs
Normal file
15
Tanshu.Accounts.Contracts/DAOFactory/FoodTableDAO.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Tanshu.Accounts.Contracts;
|
||||
|
||||
namespace Tanshu.Accounts.DAOFactory
|
||||
{
|
||||
public interface IFoodTableDAO : IDisposable
|
||||
{
|
||||
void Insert(FoodTableBO foodTable);
|
||||
void Update(FoodTableBO foodTable);
|
||||
bool Delete(int tableID);
|
||||
FoodTableBO GetFoodTable(int tableID);
|
||||
List<FoodTableBO> GetFoodTables();
|
||||
}
|
||||
}
|
||||
@ -19,8 +19,9 @@ namespace Tanshu.Accounts.DAOFactory
|
||||
|
||||
List<ProductDisplaySmallBO> GetFilteredProducts(Dictionary<string, string> filter);
|
||||
|
||||
List<ProductTypeBO> GetProductTypes();
|
||||
|
||||
List<ProductDisplayBO> GetProducts(string name, int skip, int count);
|
||||
|
||||
List<ProductDisplaySmallBO> GetProducts(Guid productTypeID);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
17
Tanshu.Accounts.Contracts/DAOFactory/ProductTypeDAO.cs
Normal file
17
Tanshu.Accounts.Contracts/DAOFactory/ProductTypeDAO.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Tanshu.Accounts.Contracts;
|
||||
|
||||
namespace Tanshu.Accounts.DAOFactory
|
||||
{
|
||||
public interface IProductTypeDAO : IDisposable
|
||||
{
|
||||
bool Insert(ProductTypeBO productType);
|
||||
ProductTypeBO GetProductType(Guid productTypeID);
|
||||
ProductTypeBO GetProductType(string name);
|
||||
bool Delete(Guid productTypeID);
|
||||
bool Update(ProductTypeBO productType);
|
||||
List<ProductTypeBO> GetProductTypes();
|
||||
|
||||
}
|
||||
}
|
||||
11
Tanshu.Accounts.Contracts/Data Contracts/FoodTableBO.cs
Normal file
11
Tanshu.Accounts.Contracts/Data Contracts/FoodTableBO.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Tanshu.Accounts.Contracts
|
||||
{
|
||||
public class FoodTableBO
|
||||
{
|
||||
public int TableID { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@ -18,7 +18,7 @@ namespace Tanshu.Accounts.Contracts
|
||||
get { return price; }
|
||||
set
|
||||
{
|
||||
if (value <= 0)
|
||||
if (value < 0)
|
||||
throw new ArgumentException("Price has to be non-negative greater than zero.");
|
||||
else
|
||||
price = value;
|
||||
|
||||
18
Tanshu.Accounts.Contracts/Service Contracts/FoodTableBI.cs
Normal file
18
Tanshu.Accounts.Contracts/Service Contracts/FoodTableBI.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ServiceModel;
|
||||
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace Tanshu.Accounts.Contracts
|
||||
{
|
||||
public interface IFoodTableBI
|
||||
{
|
||||
void Insert(FoodTableBO foodTable);
|
||||
void Update(FoodTableBO foodTable);
|
||||
bool Delete(int tableID);
|
||||
FoodTableBO GetFoodTable(int tableID);
|
||||
List<FoodTableBO> GetFoodTables();
|
||||
}
|
||||
}
|
||||
@ -6,26 +6,16 @@ using System.Data.SqlClient;
|
||||
|
||||
namespace Tanshu.Accounts.Contracts
|
||||
{
|
||||
[ServiceContract]
|
||||
public interface IProductBI
|
||||
{
|
||||
[OperationContract]
|
||||
bool Insert(ProductBO product);
|
||||
[OperationContract]
|
||||
bool Update(ProductBO product);
|
||||
[OperationContract]
|
||||
bool Delete(Guid productID);
|
||||
[OperationContract]
|
||||
ProductBO GetProductFromName(string nameAndUnits);
|
||||
[OperationContract]
|
||||
ProductBO GetProduct(Guid productID);
|
||||
[OperationContract]
|
||||
decimal GetProductStock(DateTime date, Guid productID, Guid? voucherID);
|
||||
[OperationContract]
|
||||
List<ProductDisplayBO> GetProducts();
|
||||
[OperationContract]
|
||||
List<ProductDisplaySmallBO> GetFilteredProducts(Dictionary<string, string> filter);
|
||||
[OperationContract]
|
||||
List<ProductTypeBO> GetProductTypes();
|
||||
List<ProductDisplaySmallBO> GetProducts(Guid productTypeID);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ServiceModel;
|
||||
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace Tanshu.Accounts.Contracts
|
||||
{
|
||||
public interface IProductTypeBI
|
||||
{
|
||||
ProductTypeBO GetProductType(Guid productTypeID);
|
||||
|
||||
ProductTypeBO GetProductTypeByName(string name);
|
||||
bool Insert(ProductTypeBO productType);
|
||||
bool Update(ProductTypeBO productType);
|
||||
List<ProductTypeBO> GetProductTypes();
|
||||
}
|
||||
}
|
||||
@ -56,6 +56,8 @@
|
||||
<Compile Include="Communication\Delegates.cs" />
|
||||
<Compile Include="DAOFactory\CheckoutDAO.cs" />
|
||||
<Compile Include="DAOFactory\AdvanceDAO.cs" />
|
||||
<Compile Include="DAOFactory\FoodTableDAO.cs" />
|
||||
<Compile Include="DAOFactory\ProductTypeDAO.cs" />
|
||||
<Compile Include="DAOFactory\ManagementDAO.cs" />
|
||||
<Compile Include="DAOFactory\PaymentDAO.cs" />
|
||||
<Compile Include="DAOFactory\SalesAnalysisDAO.cs" />
|
||||
@ -74,6 +76,7 @@
|
||||
<Compile Include="Data Contracts\AdvanceDisplayBO.cs" />
|
||||
<Compile Include="Data Contracts\ComplexProductBO.cs" />
|
||||
<Compile Include="Data Contracts\BillItemKey.cs" />
|
||||
<Compile Include="Data Contracts\FoodTableBO.cs" />
|
||||
<Compile Include="Data Contracts\SalarySheetBO.cs" />
|
||||
<Compile Include="Data Contracts\SalarySheetDisplayBO.cs" />
|
||||
<Compile Include="Data Contracts\TaxBO.cs" />
|
||||
@ -109,6 +112,8 @@
|
||||
<Compile Include="Roles.cs" />
|
||||
<Compile Include="Service Contracts\AdvanceBI.cs" />
|
||||
<Compile Include="Service Contracts\CheckoutBI.cs" />
|
||||
<Compile Include="Service Contracts\FoodTableBI.cs" />
|
||||
<Compile Include="Service Contracts\ProductTypesBI.cs" />
|
||||
<Compile Include="Service Contracts\CustomerBI.cs" />
|
||||
<Compile Include="Service Contracts\WaiterBI.cs" />
|
||||
<Compile Include="Service Contracts\LedgerBI.cs" />
|
||||
|
||||
Reference in New Issue
Block a user