narsil/Tanshu.Accounts.BI/SalesAnalysisBI.cs

44 lines
1.6 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
2010-03-02 17:56:21 +00:00
{
public List<SalesAnalysisDetailBO> GetSaleDetail(DateTime startDate, DateTime finishDate, Guid productGroupID)
2010-03-02 17:56:21 +00:00
{
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, productGroupID);
2010-03-02 17:56:21 +00:00
}
}
}
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 List<SalesAnalysisBO> GetSalesTaxReturn(DateTime startDate, DateTime finishDate, ref decimal voids, ref decimal pending, ref decimal net, ref decimal vat, ref decimal serviceTax, ref decimal nc)
2010-03-02 17:56:21 +00:00
{
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 voids, ref pending, ref net, ref vat, ref serviceTax, ref nc);
2010-03-02 17:56:21 +00:00
}
}
}
}
}