56 lines
1.9 KiB
C#
56 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Tanshu.Accounts.Contracts;
|
|
|
|
namespace Tanshu.Accounts.BI
|
|
{
|
|
public class SalesAnalysisBI
|
|
{
|
|
public List<SalesAnalysisDetailBO> GetSaleDetail(DateTime startDate, DateTime finishDate, Guid productGroupID)
|
|
{
|
|
|
|
using (var connection = new SqlDAO.SqlConnectionDAO())
|
|
{
|
|
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
|
|
{
|
|
return dao.GetSaleDetail(startDate, finishDate, productGroupID);
|
|
}
|
|
}
|
|
}
|
|
public List<SalesAnalysisBO> GetSale(DateTime startDate, DateTime finishDate)
|
|
{
|
|
List<SalesAnalysisBO> list;
|
|
using (var connection = new SqlDAO.SqlConnectionDAO())
|
|
{
|
|
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
|
|
{
|
|
list = dao.GetSale(startDate, finishDate);
|
|
return list;
|
|
}
|
|
}
|
|
}
|
|
public decimal GetFreeSale(DateTime startDate, DateTime finishDate)
|
|
{
|
|
|
|
using (var connection = new SqlDAO.SqlConnectionDAO())
|
|
{
|
|
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
|
|
{
|
|
return dao.GetFreeSale(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())
|
|
{
|
|
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
|
|
{
|
|
return dao.GetSalesTaxReturn(startDate, finishDate, ref freeSale, ref voids, ref pending, ref net, ref tax);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|