194 lines
5.4 KiB
C#
194 lines
5.4 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using Ease.Core;
|
|||
|
using Ease.Core.Model;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
#region TaxChallan
|
|||
|
public class ITEmpHead : AuditTrailBase
|
|||
|
{
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public ITEmpHead()
|
|||
|
{
|
|||
|
EmployeeID = 0;
|
|||
|
HeadID = EnumIncomeTaxHead.None;
|
|||
|
StartDate = DateTime.MinValue;
|
|||
|
EndDate = DateTime.MinValue;
|
|||
|
HouseRent = 0.0;
|
|||
|
Employee = null;
|
|||
|
TaxparamID = 0;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
public int EmployeeID { get; set; }
|
|||
|
public EnumIncomeTaxHead HeadID { get; set; }
|
|||
|
public DateTime StartDate { get; set; }
|
|||
|
public DateTime EndDate { get; set; }
|
|||
|
public double HouseRent { get; set; }
|
|||
|
public Employee Employee { get; set; }
|
|||
|
public int MyProperty { get; set; }
|
|||
|
public int TaxparamID { get; set; }
|
|||
|
|
|||
|
public string EmployeeNoView { get; set; }
|
|||
|
public string EmployeeNameView { get; set; }
|
|||
|
//#region Employee : Employee
|
|||
|
|
|||
|
//private Employee _Employee = null;
|
|||
|
//public Employee Employee
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_employeeID.Integer > 0 && _Employee == null)
|
|||
|
// {
|
|||
|
// _Employee = new Employee();
|
|||
|
// _Employee = Employee.Get(_employeeID);
|
|||
|
// }
|
|||
|
// return this._Employee;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _Employee = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
|
|||
|
//#region Service Factory ITaxChallanService : ITaxChallanService
|
|||
|
|
|||
|
//internal static IITEmpHeadService Service
|
|||
|
//{
|
|||
|
// get { return Services.Factory.CreateService<IITEmpHeadService>(typeof(IITEmpHeadService)); }
|
|||
|
//}
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Functions
|
|||
|
|
|||
|
//public static ITEmpHead Get(int nID)
|
|||
|
//{
|
|||
|
// ITEmpHead oITEmpHead = null;
|
|||
|
// #region Cache Header
|
|||
|
// oITEmpHead = (ITEmpHead)_cache["Get", nID];
|
|||
|
// if (oITEmpHead != null)
|
|||
|
// return oITEmpHead;
|
|||
|
// #endregion
|
|||
|
// oITEmpHead = ITEmpHead.Service.Get(nID);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oITEmpHead, "Get", nID);
|
|||
|
// #endregion
|
|||
|
// return oITEmpHead;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<ITEmpHead> Get(int taxparamID)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<ITEmpHead> iTEmpHeads = _cache["Get",taxparamID] as List<ITEmpHead>;
|
|||
|
// if (iTEmpHeads != null)
|
|||
|
// return iTEmpHeads;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// iTEmpHeads = Service.Get(taxparamID);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(iTEmpHeads, "Get",taxparamID);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return iTEmpHeads;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<ITEmpHead> Get(List<ITEmpHead> ITEmpHeads, int employeeId)
|
|||
|
//{
|
|||
|
// var ReturnItems = from item in ITEmpHeads
|
|||
|
// where item.EmployeeID == employeeId
|
|||
|
// select item;
|
|||
|
|
|||
|
// List<ITEmpHead> Items = new List<ITEmpHead>();
|
|||
|
// foreach (ITEmpHead oi in ReturnItems)
|
|||
|
// {
|
|||
|
// Items.Add(oi);
|
|||
|
// }
|
|||
|
// return Items;
|
|||
|
//}
|
|||
|
//public static List<ITEmpHead> Get(List<ITEmpHead> ITEmpHeads, int employeeId,int taxparamID)
|
|||
|
//{
|
|||
|
// var ReturnItems = from item in ITEmpHeads
|
|||
|
// where item.EmployeeID == employeeId && item.TaxparamID==taxparamID
|
|||
|
// select item;
|
|||
|
|
|||
|
// List<ITEmpHead> Items = new List<ITEmpHead>();
|
|||
|
// foreach (ITEmpHead oi in ReturnItems)
|
|||
|
// {
|
|||
|
// Items.Add(oi);
|
|||
|
// }
|
|||
|
// return Items;
|
|||
|
//}
|
|||
|
//public static List<ITEmpHead> GetByTaxParamID(List<ITEmpHead> ITEmpHeads, int taxparamID)
|
|||
|
//{
|
|||
|
// var ReturnItems = from item in ITEmpHeads
|
|||
|
// where item.TaxparamID == taxparamID
|
|||
|
// select item;
|
|||
|
|
|||
|
// List<ITEmpHead> Items = new List<ITEmpHead>();
|
|||
|
// foreach (ITEmpHead oi in ReturnItems)
|
|||
|
// {
|
|||
|
// Items.Add(oi);
|
|||
|
// }
|
|||
|
// return Items;
|
|||
|
//}
|
|||
|
//public int Save()
|
|||
|
//{
|
|||
|
// this.SetAuditTrailProperties();
|
|||
|
// return ITEmpHead.Service.Save(this);
|
|||
|
//}
|
|||
|
//public int Save2()
|
|||
|
//{
|
|||
|
// this.SetAuditTrailProperties();
|
|||
|
// return ITEmpHead.Service.Save2(this);
|
|||
|
//}
|
|||
|
//public void Delete()
|
|||
|
//{
|
|||
|
// ITEmpHead.Service.Delete(this);
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ITaxChallan Service
|
|||
|
|
|||
|
public interface IITEmpHeadService
|
|||
|
{
|
|||
|
ITEmpHead Get(int id);
|
|||
|
//previously Get
|
|||
|
List<ITEmpHead> GetWithTaxParam(int taxparamID);
|
|||
|
int Save(ITEmpHead item);
|
|||
|
int Save2(ITEmpHead item);
|
|||
|
void Delete(ITEmpHead item);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|