narsil/Tanshu.Accounts.BI/SalesAnalysisBI.cs
Amritanshu b6498a7b1c Feature: Sale analysis printout changed.
Feature: Sale analysis detail printing built
2013-11-16 11:31:58 +05:30

56 lines
2.1 KiB
C#

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())
{
using (var dao = new SqlDAO.SalesAnalysisDAO(connection))
{
return dao.GetSaleDetail(startDate, finishDate, costCenterID);
}
}
}
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 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())
{
using (var dao = new SqlDAO.SalesAnalysisDAO(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)
{
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);
}
}
}
}
}