narsil/Tanshu.Accounts.DAOFactory/SqlServerDAOFactory.cs
2011-01-10 05:06:24 +05:30

102 lines
3.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tanshu.Accounts.SqlDAO;
using Tanshu.Data.DAO;
namespace Tanshu.Accounts.DAOFactory
{
public class SqlServerDAOFactory : GetFactory
{
public override IAdvanceDAO GetAdvanceDAO(IConnectionDAO connection)
{
return new AdvanceDAO(connection);
}
public override ICheckoutDAO GetCheckoutDAO(DateTime startDate, DateTime finishDate, Guid userID, IConnectionDAO connection)
{
return new CheckoutDAO(startDate, finishDate, userID, connection);
}
public override IConnectionDAO Connection
{
get { return new Tanshu.Accounts.SqlDAO.SqlConnectionDAO(); }
}
public override ICustomerDAO GetCustomerDAO(IConnectionDAO connection)
{
return new CustomerDAO(connection);
}
public override IFoodTableDAO GetFoodTableDAO(IConnectionDAO connection)
{
return new FoodTableDAO(connection);
}
public override IInventoryDAO GetInventoryDAO(IConnectionDAO connection)
{
return new InventoryDAO(connection);
}
public override ILedgerDAO GetLedgerDAO(IConnectionDAO connection)
{
return new LedgerDAO(connection);
}
public override IManagementDAO GetManagementDAO(DateTime startDate, DateTime finishDate, IConnectionDAO connection)
{
return new ManagementDAO(startDate, finishDate, connection);
}
public override IMembershipDAO GetMembershipDAO(IConnectionDAO connection)
{
return new MembershipDAO(connection);
}
public override IPaymentDAO GetPaymentDAO(IConnectionDAO connection)
{
return new PaymentDAO(connection);
}
public override IProductDAO GetProductDAO(IConnectionDAO connection)
{
return new ProductDAO(connection);
}
public override IProductTypeDAO GetProductTypeDAO(IConnectionDAO connection)
{
return new ProductTypeDAO(connection);
}
public override ISalesAnalysisDAO GetSalesAnalysisDAO(IConnectionDAO connection)
{
return new SalesAnalysisDAO(connection);
}
public override ISaleVoucherDAO GetSaleVoucherDAO(IConnectionDAO connection)
{
return new SaleVoucherDAO(connection);
}
public override ISaleVoucherMixDAO GetSaleVoucherMixDAO(IConnectionDAO connection)
{
return new SaleVoucherMixDAO(connection);
}
public override IUserDAO GetUserDAO(IConnectionDAO connection)
{
return new UserDAO(connection);
}
public override IVoucherDAO GetVoucherDAO(IConnectionDAO connection)
{
return new VoucherDAO(connection);
}
public override IWaiterDAO GetWaiterDAO(IConnectionDAO connection)
{
return new WaiterDAO(connection);
}
}
}