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

83 lines
2.5 KiB
C#

using System;
using System.Collections.Generic;
using Tanshu.Accounts.Contracts;
namespace Tanshu.Accounts.BI
{
public class ManagementBI
{
public decimal GetBalance(decimal? tax, DateTime startDate, DateTime endDate)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.ManagementDAO(startDate, endDate, connection))
{
return dao.GetBalance(tax);
}
}
}
public List<Guid> GetUpdateBillList(decimal tax, DateTime startDate, DateTime endDate)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.ManagementDAO(startDate, endDate, connection))
{
return dao.GetUpdateBillList(tax);
}
}
}
public decimal Update(Guid voucherID, decimal tax, DateTime startDate, DateTime endDate)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.ManagementDAO(startDate, endDate, connection))
{
return dao.Update(voucherID, tax);
}
}
}
public void Reorder(DateTime startDate, DateTime endDate, ShowProgessDelegate showProgressDelegate)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.ManagementDAO(startDate, endDate, connection))
{
dao.Reorder(showProgressDelegate);
}
}
}
public bool MergeData(DateTime startDate, DateTime endDate, string sourceDB, string targetDB)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.ManagementDAO(startDate, endDate, connection))
{
return dao.MergeData(sourceDB, targetDB);
}
}
}
public List<PendingBillsBO> GetPaidBills(DateTime startDate, DateTime finishDate)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.ManagementDAO(startDate, finishDate, connection))
{
return dao.GetPaidBills();
}
}
}
}
}