60 lines
2.5 KiB
C#
60 lines
2.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
//using System.Linq;
|
|
using System.Text;
|
|
using System.Data.SqlClient;
|
|
using Tanshu.Accounts.Contracts;
|
|
using Tanshu.Accounts.DAOFactory;
|
|
using Tanshu.Data.DAO;
|
|
|
|
namespace Tanshu.Accounts.BI
|
|
{
|
|
public class SalesAnalysisBI : ISalesAnalysisBI
|
|
{
|
|
public List<SalesAnalysisDetailBO> GetSaleDetail(DateTime startDate, DateTime finishDate, Guid costCenterID)
|
|
{
|
|
GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType);
|
|
using (IConnectionDAO connection = factory.Connection)
|
|
{
|
|
using (ISalesAnalysisDAO dao = factory.GetSalesAnalysisDAO(connection))
|
|
{
|
|
return dao.GetSaleDetail(startDate, finishDate, costCenterID);
|
|
}
|
|
}
|
|
}
|
|
public List<SalesAnalysisBO> GetSale(DateTime startDate, DateTime finishDate)
|
|
{
|
|
GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType);
|
|
using (IConnectionDAO connection = factory.Connection)
|
|
{
|
|
using (ISalesAnalysisDAO dao = factory.GetSalesAnalysisDAO(connection))
|
|
{
|
|
return dao.GetSale(startDate, finishDate);
|
|
}
|
|
}
|
|
}
|
|
public void GetAdditionalInfo(ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax, DateTime startDate, DateTime finishDate)
|
|
{
|
|
GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType);
|
|
using (IConnectionDAO connection = factory.Connection)
|
|
{
|
|
using (ISalesAnalysisDAO dao = factory.GetSalesAnalysisDAO(connection))
|
|
{
|
|
dao.GetAdditionalInfo(ref freeSale, ref voids, ref pending, ref net, ref tax, startDate, finishDate);
|
|
}
|
|
}
|
|
}
|
|
public List<SalesAnalysisBO> GetSalesTaxReturn(DateTime startDate, DateTime finishDate, ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax)
|
|
{
|
|
GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType);
|
|
using (IConnectionDAO connection = factory.Connection)
|
|
{
|
|
using (ISalesAnalysisDAO dao = factory.GetSalesAnalysisDAO(connection))
|
|
{
|
|
return dao.GetSalesTaxReturn(startDate, finishDate, ref freeSale, ref voids, ref pending, ref net, ref tax);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|