using System; using System.Collections.Generic; namespace HRM.BO { #region Class TrainingScheduleStatus public class TrainingScheduleStatus : BasicBaseObject { #region constructor public TrainingScheduleStatus() { Name = string.Empty; } #endregion #region properties public string Name { get; set; } //#region Service Factory ITrainingScheduleStatusService : ITrainingTypeService //internal static ITrainingScheduleStatusService Service //{ // get { return Services.Factory.CreateService(typeof(ITrainingScheduleStatusService)); } //} //#endregion #endregion //#region functions //public static TrainingScheduleStatus Get(ID nID) //{ // TrainingScheduleStatus oTrainingScheduleStatus = null; // #region Cache Header // oTrainingScheduleStatus = (TrainingScheduleStatus)_cache["Get", nID]; // if (oTrainingScheduleStatus != null) // return oTrainingScheduleStatus; // #endregion // oTrainingScheduleStatus = TrainingScheduleStatus.Service.Get(nID); // #region Cache Footer // _cache.Add(oTrainingScheduleStatus, "Get", nID); // #endregion // return oTrainingScheduleStatus; //} //public static List Get() //{ // List trainingScheduleStatuses; // #region cache header // trainingScheduleStatuses = _cache["Get"] as List; // if (trainingScheduleStatuses != null) // return trainingScheduleStatuses; // #endregion // try // { // trainingScheduleStatuses = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region cache footer // _cache.Add(trainingScheduleStatuses, "Get"); // #endregion // return trainingScheduleStatuses; //} //public static List Get(EnumStatus status) //{ // #region Cache Header // List trainingScheduleStatuses = _cache["Get", status] as List; // if (trainingScheduleStatuses != null) // return trainingScheduleStatuses; // #endregion // try // { // if(status==EnumStatus.Regardless) // trainingScheduleStatuses = Service.Get(); // else // trainingScheduleStatuses = Service.Get(status); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(trainingScheduleStatuses, "Get", status); // #endregion // return trainingScheduleStatuses; //} //public ID Save() //{ // this.SetAuditTrailProperties(); // return Service.Save(this); //} //public void Delete(ID id) //{ // Service.Delete(id); //} //#endregion } #endregion #region ITrainingScheduleStatus Service public interface ITrainingScheduleStatusService { void Delete(int id); int Save(TrainingScheduleStatus trainingScheduleStatus); List Get(); TrainingScheduleStatus Get(int id); List Get(EnumStatus status); } #endregion }