157 lines
4.6 KiB
C#
157 lines
4.6 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
|
|||
|
{
|
|||
|
[Serializable]
|
|||
|
public class ComponentUploadSetup: BasicBaseObject
|
|||
|
{
|
|||
|
#region Cache Store
|
|||
|
private static Cache _cache = new Cache(typeof(ComponentUploadSetup));
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Constructor
|
|||
|
public ComponentUploadSetup()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region EmployeeID
|
|||
|
private int _employeeID;
|
|||
|
public int EmployeeID
|
|||
|
{
|
|||
|
get { return _employeeID; }
|
|||
|
set { _employeeID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ApproverID
|
|||
|
private int _approverID;
|
|||
|
public int ApproverID
|
|||
|
{
|
|||
|
get { return _approverID; }
|
|||
|
set { _approverID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ComponentType
|
|||
|
private EnumComponentType _componentType;
|
|||
|
public EnumComponentType ComponentType
|
|||
|
{
|
|||
|
get { return _componentType; }
|
|||
|
set { _componentType = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ItemID
|
|||
|
private ID _itemID;
|
|||
|
public ID ItemID
|
|||
|
{
|
|||
|
get { return _itemID; }
|
|||
|
set { _itemID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Description
|
|||
|
private string _description;
|
|||
|
public string Description
|
|||
|
{
|
|||
|
get { return _description; }
|
|||
|
set { _description = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Functions
|
|||
|
|
|||
|
public static ObjectsTemplate<ComponentUploadSetup> Get()
|
|||
|
{
|
|||
|
ObjectsTemplate<ComponentUploadSetup> componentSetups = null;
|
|||
|
#region Cache Header
|
|||
|
componentSetups = (ObjectsTemplate<ComponentUploadSetup>)_cache["Get"];
|
|||
|
if (componentSetups != null)
|
|||
|
return componentSetups;
|
|||
|
#endregion
|
|||
|
componentSetups = ComponentUploadSetup.Service.Get();
|
|||
|
#region Cache Footer
|
|||
|
_cache.Add(componentSetups, "Get");
|
|||
|
#endregion
|
|||
|
return componentSetups;
|
|||
|
}
|
|||
|
|
|||
|
public static ObjectsTemplate<ComponentUploadSetup> Get(ID empid)
|
|||
|
{
|
|||
|
ObjectsTemplate<ComponentUploadSetup> componentSetups = null;
|
|||
|
#region Cache Header
|
|||
|
componentSetups = (ObjectsTemplate<ComponentUploadSetup>)_cache["Get", empid];
|
|||
|
if (componentSetups != null)
|
|||
|
return componentSetups;
|
|||
|
#endregion
|
|||
|
componentSetups = ComponentUploadSetup.Service.Get(empid);
|
|||
|
#region Cache Footer
|
|||
|
_cache.Add(componentSetups, "Get", empid);
|
|||
|
#endregion
|
|||
|
return componentSetups;
|
|||
|
}
|
|||
|
|
|||
|
public static ObjectsTemplate<ComponentUploadSetup> GetByApproverID(ID apprvrID)
|
|||
|
{
|
|||
|
ObjectsTemplate<ComponentUploadSetup> componentSetups = null;
|
|||
|
componentSetups = ComponentUploadSetup.Service.GetByApproverID(apprvrID);
|
|||
|
return componentSetups;
|
|||
|
}
|
|||
|
|
|||
|
public static DataTable GetUploadedComponentReportData(DateTime fromDate, DateTime toDate)
|
|||
|
{
|
|||
|
return Service.GetUploadedComponentReportData(fromDate, toDate);
|
|||
|
}
|
|||
|
|
|||
|
public void Save(ObjectsTemplate<ComponentUploadSetup> componentSetups)
|
|||
|
{
|
|||
|
this.SetAuditTrailProperties();
|
|||
|
ComponentUploadSetup.Service.Save(componentSetups);
|
|||
|
}
|
|||
|
|
|||
|
public void Delete(ID id)
|
|||
|
{
|
|||
|
ComponentUploadSetup.Service.Delete(id);
|
|||
|
}
|
|||
|
|
|||
|
public static void DeleteSingleComponent(ComponentUploadSetup oComponentUploadSetup)
|
|||
|
{
|
|||
|
ComponentUploadSetup.Service.DeleteSingleComponent(oComponentUploadSetup);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Service Factory
|
|||
|
internal static IComponentUploadSetupService Service
|
|||
|
{
|
|||
|
get { return Services.Factory.CreateService<IComponentUploadSetupService>(typeof(IComponentUploadSetupService)); }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
}
|
|||
|
|
|||
|
public interface IComponentUploadSetupService
|
|||
|
{
|
|||
|
ObjectsTemplate<ComponentUploadSetup> Get();
|
|||
|
ObjectsTemplate<ComponentUploadSetup> Get(ID empId);
|
|||
|
ObjectsTemplate<ComponentUploadSetup> GetByApproverID(ID apprvrID);
|
|||
|
DataTable GetUploadedComponentReportData(DateTime fromDate, DateTime toDate);
|
|||
|
void Save(ObjectsTemplate<ComponentUploadSetup> componentSetups);
|
|||
|
void Delete(ID id);
|
|||
|
void DeleteSingleComponent(ComponentUploadSetup oComponentUploadSetup);
|
|||
|
}
|
|||
|
}
|