narsil/Tanshu.Accounts.BI/SalesAnalysisBI.cs

56 lines
2.1 KiB
C#
Raw Normal View History

2010-03-02 17:56:21 +00:00
using System;
using System.Collections.Generic;
using Tanshu.Accounts.Contracts;
namespace Tanshu.Accounts.BI
{
public class SalesAnalysisBI : ISalesAnalysisBI
{
public List<SalesAnalysisDetailBO> GetSaleDetail(DateTime startDate, DateTime finishDate, Guid costCenterID)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
2010-03-02 17:56:21 +00:00
{
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
2010-03-02 17:56:21 +00:00
{
return dao.GetSaleDetail(startDate, finishDate, costCenterID);
}
}
}
public List<SalesAnalysisBO> GetSale(DateTime startDate, DateTime finishDate)
{
List<SalesAnalysisBO> list;
using (var connection = new SqlDAO.SqlConnectionDAO())
2010-03-02 17:56:21 +00:00
{
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
2010-03-02 17:56:21 +00:00
{
list = dao.GetSale(startDate, finishDate);
return list;
2010-03-02 17:56:21 +00:00
}
}
}
public void GetAdditionalInfo(ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax, DateTime startDate, DateTime finishDate)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
2010-03-02 17:56:21 +00:00
{
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
2010-03-02 17:56:21 +00:00
{
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)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
2010-03-02 17:56:21 +00:00
{
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
2010-03-02 17:56:21 +00:00
{
return dao.GetSalesTaxReturn(startDate, finishDate, ref freeSale, ref voids, ref pending, ref net, ref tax);
}
}
}
}
}