113 lines
2.5 KiB
C#
113 lines
2.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region Company
|
|
|
|
public class Company : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
|
|
public Company()
|
|
{
|
|
Code = string.Empty;
|
|
Name = string.Empty;
|
|
Status = EnumStatus.Active;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
public string Code { get; set; }
|
|
|
|
public string Name { get; set; }
|
|
|
|
//#region Service Factory ICompanyService : ICompanyService
|
|
|
|
//internal static ICompanyService Service
|
|
//{
|
|
// get { return Services.Factory.CreateService<ICompanyService>(typeof(ICompanyService)); }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
#endregion
|
|
|
|
//#region Functions
|
|
|
|
//public static Company Get(int nID)
|
|
//{
|
|
// Company oCompany = null;
|
|
// #region Cache Header
|
|
// oCompany = (Company)_cache["Get", nID];
|
|
// if (oCompany != null)
|
|
// return oCompany;
|
|
// #endregion
|
|
// oCompany = Company.Service.Get(nID);
|
|
// #region Cache Footer
|
|
// _cache.Add(oCompany, "Get", nID);
|
|
// #endregion
|
|
// return oCompany;
|
|
//}
|
|
|
|
//public static List<Company> Get(EnumStatus status)
|
|
//{
|
|
// #region Cache Header
|
|
|
|
// List<Company> Companys = _cache["Get", status] as List<Company>;
|
|
|
|
// if (Companys != null)
|
|
// return Companys;
|
|
|
|
// #endregion
|
|
|
|
// try
|
|
// {
|
|
// Companys = Service.Get(status);
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
|
|
// #region Cache Footer
|
|
|
|
// _cache.Add(Companys, "Get", status);
|
|
|
|
// #endregion
|
|
|
|
// return Companys;
|
|
//}
|
|
|
|
|
|
//public ID Save()
|
|
//{
|
|
// base.SetAuditTrailProperties();
|
|
// return Company.Service.Save(this);
|
|
//}
|
|
//public void Delete(ID id)
|
|
//{
|
|
// Company.Service.Delete(id);
|
|
//}
|
|
//#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
//#region ICompany Service
|
|
|
|
//public interface ICompanyService
|
|
//{
|
|
// Company Get(ID id);
|
|
// List<Company> Get(EnumStatus status);
|
|
// ID Save(Company item);
|
|
// void Delete(ID id);
|
|
//}
|
|
|
|
//#endregion
|
|
} |