2010-03-02 17:56:21 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Tanshu.Accounts.Contracts;
|
|
|
|
|
|
|
|
|
|
namespace Tanshu.Accounts.BI
|
|
|
|
|
{
|
2013-11-28 10:39:33 +00:00
|
|
|
|
public class SalesAnalysisBI
|
2010-03-02 17:56:21 +00:00
|
|
|
|
{
|
2013-11-28 10:39:33 +00:00
|
|
|
|
public List<SalesAnalysisDetailBO> GetSaleDetail(DateTime startDate, DateTime finishDate, Guid productGroupID)
|
2010-03-02 17:56:21 +00:00
|
|
|
|
{
|
2013-11-16 06:01:58 +00:00
|
|
|
|
using (var connection = new SqlDAO.SqlConnectionDAO())
|
2010-03-02 17:56:21 +00:00
|
|
|
|
{
|
2013-11-16 06:01:58 +00:00
|
|
|
|
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
|
2010-03-02 17:56:21 +00:00
|
|
|
|
{
|
2013-11-28 10:39:33 +00:00
|
|
|
|
return dao.GetSaleDetail(startDate, finishDate, productGroupID);
|
2010-03-02 17:56:21 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public List<SalesAnalysisBO> GetSale(DateTime startDate, DateTime finishDate)
|
|
|
|
|
{
|
2013-11-16 06:01:58 +00:00
|
|
|
|
List<SalesAnalysisBO> list;
|
|
|
|
|
using (var connection = new SqlDAO.SqlConnectionDAO())
|
2010-03-02 17:56:21 +00:00
|
|
|
|
{
|
2013-11-16 06:01:58 +00:00
|
|
|
|
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
|
2010-03-02 17:56:21 +00:00
|
|
|
|
{
|
2013-11-16 06:01:58 +00:00
|
|
|
|
list = dao.GetSale(startDate, finishDate);
|
|
|
|
|
return list;
|
2010-03-02 17:56:21 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-08-08 12:05:38 +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
|
|
|
|
{
|
2013-11-16 06:01:58 +00:00
|
|
|
|
|
|
|
|
|
using (var connection = new SqlDAO.SqlConnectionDAO())
|
2010-03-02 17:56:21 +00:00
|
|
|
|
{
|
2013-11-16 06:01:58 +00:00
|
|
|
|
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
|
2010-03-02 17:56:21 +00:00
|
|
|
|
{
|
2014-08-08 12:05:38 +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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|