EchoTex_Payroll/HRM.BO/Basic/Costcenter.cs

119 lines
3.5 KiB
C#
Raw Permalink Normal View History

2024-10-14 10:01:49 +06:00
using Ease.Core.Model;
using System.Collections.Generic;
namespace HRM.BO
{
#region Costcenter
public class Costcenter : BasicBaseObject
{
#region Constructor
public Costcenter()
{
Code = string.Empty;
Name = string.Empty;
NameInBangla = string.Empty;
ProfitCenterName = string.Empty;
ParentsID = string.Empty;
Parent = null;
Tier = 1;
Status = EnumStatus.Active;
GrsName = string.Empty;
ParentID = null;
}
#endregion
#region Properties
public string Code { get; set; }
public string GrsName { get; set; }
public string Name { get; set; }
public string NameInBangla { get; set; }
public string ProfitCenterName { get; set; }
public int? ParentID { get; set; }
public string ParentsID { get; set; }
public Costcenter Parent { get; set; }
public int PayrollTypeID { get; set; }
public int Tier { get; set; }
//public string CodeName { get { return this.Name + " [" + this.Code + "]"; }; set; }
public string CodeName { get; set; }
//#region Chield : Cost Center
//private List<Costcenter> _Childs;
//public List<Costcenter> Childs
//{
// get
// {
// if (_Childs == null && this.ID == 0)
// {
// _Childs = Costcenter.GetChilds(this.ID);
// }
// return _Childs;
// }
// set
// {
// _Childs = value;
// }
//}
//public List<ObjectTemplate> PickerChilds
//{
// get
// {
// List<ObjectTemplate> pChilds = new List<ObjectTemplate>();
// if (_Childs == null && this.ID == 0)
// {
// _Childs = Costcenter.GetChilds(this.ID);
// if (_Childs != null)
// {
// foreach (Costcenter cc in _Childs)
// {
// pChilds.Add(cc);
// }
// }
// }
// return pChilds;
// }
//}
//#endregion
//#region Service Factory ICostcenterService : ICostcenterService
//internal static ICostcenterService Service
//{
// get { return Services.Factory.CreateService<ICostcenterService>(typeof(ICostcenterService)); }
//}
//#endregion
#endregion
}
#endregion
#region ICostcenter Service
public interface ICostcenterService
{
Costcenter Get(int id);
// List<Costcenter> Get(int payrollTypeID);
List<Costcenter> Get();
List<Costcenter> GetParents(EnumStatus status, int payrollTypeID);
List<Costcenter> GetChilds(int parentID, int payrollTypeID);
List<Costcenter> GetByTire(int nTire, int payrollTypeID);
List<Costcenter> GetByTireAndProfitCenter(int nTire, string sProfitCenter, int payrollTypeID);
int Save(Costcenter item, int payrollTypeID);
int Save(Costcenter item);
void Delete(int id);
Costcenter Get(string sCode, int payrollTypeID);
List<Costcenter> Get(EnumStatus status, int tier, int payrollTypeID);
List<Costcenter> GetAllCostCenter(int payrollTypeID, EnumStatus status, string code, string name);
}
#endregion
}