289 lines
7.1 KiB
C#
289 lines
7.1 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using Ease.CoreV35;
|
|||
|
using Ease.CoreV35.Model;
|
|||
|
using Ease.CoreV35.Caching;
|
|||
|
using System.Data.Linq.Mapping;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
namespace Payroll.BO
|
|||
|
{
|
|||
|
#region TaxChallan
|
|||
|
|
|||
|
[Serializable]
|
|||
|
public class TaxChallan : AuditTrailBase
|
|||
|
{
|
|||
|
#region Cache Store
|
|||
|
|
|||
|
private static Cache _cache = new Cache(typeof(TaxChallan));
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public TaxChallan()
|
|||
|
{
|
|||
|
_salaryMonthly = DateTime.MinValue;
|
|||
|
_employeeID = null;
|
|||
|
_taxParameterID = null;
|
|||
|
_challanNo = string.Empty;
|
|||
|
_amount = 0;
|
|||
|
_depositDate = DateTime.MinValue;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region salaryMonthly : DateTime
|
|||
|
|
|||
|
private DateTime _salaryMonthly;
|
|||
|
public DateTime SalaryMonthly
|
|||
|
{
|
|||
|
get { return _salaryMonthly; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<DateTime>("salaryMonthly", _salaryMonthly, value);
|
|||
|
_salaryMonthly = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region EmployeeID : ID
|
|||
|
|
|||
|
private ID _employeeID;
|
|||
|
public ID EmployeeID
|
|||
|
{
|
|||
|
get { return _employeeID; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<ID>("EmployeeID", _employeeID, value);
|
|||
|
_employeeID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region TaxParameterID : ID
|
|||
|
|
|||
|
private ID _taxParameterID;
|
|||
|
public ID TaxParameterID
|
|||
|
{
|
|||
|
get { return _taxParameterID; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<ID>("TaxParameterID", _taxParameterID, value);
|
|||
|
_taxParameterID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region challanNo : string
|
|||
|
|
|||
|
private string _challanNo;
|
|||
|
public string ChallanNo
|
|||
|
{
|
|||
|
get { return _challanNo; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<string>("challanNo", _challanNo, value);
|
|||
|
_challanNo = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region amount : double
|
|||
|
|
|||
|
private double _amount;
|
|||
|
public double Amount
|
|||
|
{
|
|||
|
get { return _amount; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<double>("amount", _amount, value);
|
|||
|
_amount = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region depositDate : System.DateTime
|
|||
|
|
|||
|
private DateTime _depositDate;
|
|||
|
public DateTime DepositDate
|
|||
|
{
|
|||
|
get { return _depositDate; }
|
|||
|
set
|
|||
|
{
|
|||
|
base.OnPropertyChange<DateTime>("depositDate", _depositDate, value);
|
|||
|
_depositDate = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Service Factory ITaxChallanService : ITaxChallanService
|
|||
|
|
|||
|
internal static ITaxChallanService Service
|
|||
|
{
|
|||
|
get { return Services.Factory.CreateService<ITaxChallanService>(typeof(ITaxChallanService)); }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Functions
|
|||
|
|
|||
|
public static TaxChallan Get(ID nID)
|
|||
|
{
|
|||
|
TaxChallan oTaxChallan = null;
|
|||
|
#region Cache Header
|
|||
|
oTaxChallan = (TaxChallan)_cache["Get", nID];
|
|||
|
if (oTaxChallan != null)
|
|||
|
return oTaxChallan;
|
|||
|
#endregion
|
|||
|
oTaxChallan = TaxChallan.Service.Get(nID);
|
|||
|
#region Cache Footer
|
|||
|
_cache.Add(oTaxChallan, "Get", nID);
|
|||
|
#endregion
|
|||
|
return oTaxChallan;
|
|||
|
}
|
|||
|
|
|||
|
public static ObjectsTemplate<TaxChallan> Get()
|
|||
|
{
|
|||
|
#region Cache Header
|
|||
|
|
|||
|
ObjectsTemplate<TaxChallan> taxChallans = _cache["Get"] as ObjectsTemplate<TaxChallan>;
|
|||
|
if (taxChallans != null)
|
|||
|
return taxChallans;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
try
|
|||
|
{
|
|||
|
taxChallans = Service.Get();
|
|||
|
}
|
|||
|
catch (ServiceException e)
|
|||
|
{
|
|||
|
throw new Exception(e.Message, e);
|
|||
|
}
|
|||
|
|
|||
|
#region Cache Footer
|
|||
|
|
|||
|
_cache.Add(taxChallans, "Get");
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
return taxChallans;
|
|||
|
}
|
|||
|
|
|||
|
public static ObjectsTemplate<TaxChallan> Get(ID nEmpID,ID nTaxParamID)
|
|||
|
{
|
|||
|
#region Cache Header
|
|||
|
|
|||
|
ObjectsTemplate<TaxChallan> taxChallans = _cache["Get",nEmpID,nTaxParamID] as ObjectsTemplate<TaxChallan>;
|
|||
|
if (taxChallans != null)
|
|||
|
return taxChallans;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
try
|
|||
|
{
|
|||
|
taxChallans = Service.Get(nEmpID,nTaxParamID);
|
|||
|
}
|
|||
|
catch (ServiceException e)
|
|||
|
{
|
|||
|
throw new Exception(e.Message, e);
|
|||
|
}
|
|||
|
|
|||
|
#region Cache Footer
|
|||
|
|
|||
|
_cache.Add(taxChallans, "Get",nEmpID,nTaxParamID);
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
return taxChallans;
|
|||
|
}
|
|||
|
//Tax Challan From Old Table
|
|||
|
public static ObjectsTemplate<TaxChallan> GetOldTaxChallan(ID nEmpID, ID nTaxParamID)
|
|||
|
{
|
|||
|
#region Cache Header
|
|||
|
|
|||
|
ObjectsTemplate<TaxChallan> taxChallans = _cache["GetOldTaxChallan", nEmpID, nTaxParamID] as ObjectsTemplate<TaxChallan>;
|
|||
|
if (taxChallans != null)
|
|||
|
return taxChallans;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
try
|
|||
|
{
|
|||
|
taxChallans = Service.GetOldTaxChallan(nEmpID, nTaxParamID);
|
|||
|
}
|
|||
|
catch (ServiceException e)
|
|||
|
{
|
|||
|
throw new Exception(e.Message, e);
|
|||
|
}
|
|||
|
|
|||
|
#region Cache Footer
|
|||
|
|
|||
|
_cache.Add(taxChallans, "GetOldTaxChallan", nEmpID, nTaxParamID);
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
return taxChallans;
|
|||
|
}
|
|||
|
public static DataTable GetChalaCountByTaxParamID(int nTaxParamID)
|
|||
|
{
|
|||
|
DataTable dataTableChalanCount = new DataTable("ChalanCount");
|
|||
|
try
|
|||
|
{
|
|||
|
dataTableChalanCount = Service.GetChalaCountByTaxParamID(nTaxParamID);
|
|||
|
}
|
|||
|
catch (ServiceException e)
|
|||
|
{
|
|||
|
throw new Exception(e.Message, e);
|
|||
|
}
|
|||
|
return dataTableChalanCount;
|
|||
|
}
|
|||
|
public ID Save()
|
|||
|
{
|
|||
|
this.SetAuditTrailProperties();
|
|||
|
return TaxChallan.Service.Save(this);
|
|||
|
}
|
|||
|
public void Delete()
|
|||
|
{
|
|||
|
TaxChallan.Service.Delete(ID);
|
|||
|
}
|
|||
|
public void DeleteAllByTaxparamID(int nTaxparamID)
|
|||
|
{
|
|||
|
TaxChallan.Service.DeleteAllByTaxparamID(nTaxparamID);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ITaxChallan Service
|
|||
|
|
|||
|
public interface ITaxChallanService
|
|||
|
{
|
|||
|
TaxChallan Get(ID id);
|
|||
|
ObjectsTemplate<TaxChallan> Get();
|
|||
|
ObjectsTemplate<TaxChallan> Get(ID nEmpID,ID nTaxParamID);
|
|||
|
ObjectsTemplate<TaxChallan> GetOldTaxChallan(ID nEmpID, ID nTaxParamID);
|
|||
|
ID Save(TaxChallan item);
|
|||
|
void Delete(ID id);
|
|||
|
void DeleteAllByTaxparamID(int nTaxparamID);
|
|||
|
DataTable GetChalaCountByTaxParamID(int nTaxParamID);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|