2010-03-02 17:56:21 +00:00
|
|
|
|
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
|
|
|
|
|
{
|
2011-12-05 09:23:02 +00:00
|
|
|
|
get { return new SqlDAO.SqlConnectionDAO(); }
|
2010-03-02 17:56:21 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override ICustomerDAO GetCustomerDAO(IConnectionDAO connection)
|
|
|
|
|
{
|
|
|
|
|
return new CustomerDAO(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 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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|