using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.Core; using Ease.Core.Model; namespace HRM.BO { #region JVType public class JVType : BasicBaseObject { #region Constructor public JVType() { Name = string.Empty; } #endregion #region Input validator public string[] InputValidator() { string[] sErrorString = new string[2]; if (this.Name == "") { sErrorString[0] = "Description can not be empty"; sErrorString[1] = "Description"; return sErrorString; } sErrorString = null; return sErrorString; } #endregion #region Properties public string Name { get; set; } //#region Service Factory IJVTypeService : IJVTypeService //internal static IJVTypeService Service //{ // get // { // return Services.Factory.CreateService(typeof(IJVTypeService)); // } //} //#endregion #endregion //#region Functions //public static JVType Get(ID nJVTypeID) //{ // JVType oJVType = null; // #region Cache Header // oJVType = (JVType)_cache["Get", nJVTypeID]; // if (oJVType != null) // return oJVType; // #endregion // oJVType = JVType.Service.Get(nJVTypeID); // #region Cache Footer // _cache.Add(oJVType, "Get", nJVTypeID); // #endregion // return oJVType; //} //public static List Get() //{ // #region Cache Header // List jvtypes = _cache["Get"] as List; // if (jvtypes != null) // return jvtypes; // #endregion // try // { // jvtypes = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(jvtypes, "Get"); // #endregion // return jvtypes; //} //public static List Get(EnumStatus status) //{ // #region Cache Header // List jvtypes = _cache["Get", status] as List; // if (jvtypes != null) // return jvtypes; // #endregion // try // { // jvtypes = Service.Get(status); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(jvtypes, "Get", status); // #endregion // return jvtypes; //} //public ID Save() //{ // this.SetAuditTrailProperties(); // return JVType.Service.Save(this); //} //public void Delete(ID id) //{ // JVType.Service.Delete(id); //} //#endregion } #endregion #region IJVType Service public interface IJVTypeService { JVType Get(int id); List Get(); List Get(EnumStatus status); int Save(JVType item); void Delete(int id); } #endregion }