narsil/Tanshu.Accounts.BI/CustomerBI.cs
unknown 0172fc4e01 Added Service Tax and CIN Information to the bill printout
Added Nc Option in settlement
Merged Vouchers and SaleVoucher table. Need to update the Sql Schema
2014-08-08 17:35:38 +05:30

79 lines
2.2 KiB
C#

using System;
using System.Collections.Generic;
using Tanshu.Accounts.Contracts;
namespace Tanshu.Accounts.BI
{
public class CustomerBI
{
public CustomerBO GetCustomer(Guid customerID)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.CustomerDAO(connection))
{
return dao.GetCustomer(customerID);
}
}
}
public List<CustomerBO> GetCustomers()
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.CustomerDAO(connection))
{
return dao.GetCustomers();
}
}
}
public List<CustomerBO> GetSingleCustomers(Guid customerID)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.CustomerDAO(connection))
{
return dao.GetCustomers(customerID);
}
}
}
public bool Update(CustomerBO customer)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.CustomerDAO(connection))
{
dao.Update(customer);
return true;
}
}
}
public bool Delete(Guid customerID)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.CustomerDAO(connection))
{
dao.Delete(customerID);
return true;
}
}
}
public bool Insert(CustomerBO customer)
{
using (var connection = new SqlDAO.SqlConnectionDAO())
{
using (var dao = new SqlDAO.CustomerDAO(connection))
{
dao.Insert(customer);
return true;
}
}
}
}
}