using System; using System.Linq; using System.Data; using System.Collections.Generic; using Ease.Core.Model; namespace HRM.BO { #region Class InvestmentCategory [Serializable] public class InvestmentCategory : AuditTrailBase { #region Constructor public InvestmentCategory() { Code = string.Empty; Name = string.Empty; UserObjectName = string.Empty; MinValue = 0.0; ProjectID = 0; } #endregion #region properties #region Property Code : string public string Code { get; set; } #endregion Property Code : string #region Property Name : string public string Name { get; set; } #endregion Property Name : string #region Property UserObjectName : string public string UserObjectName { get; set; } //private string _userObjectName; //public string UserObjectName //{ // get { return _userObjectName; } // set // { // _userObjectName = value; // } //} #endregion Property UserObjectName : string #region Property MinValue : decimal public double MinValue { get; set; } //private double _MinValue; //public double MinValue //{ // get { return _MinValue; } // set // { // _MinValue = value; // } //} #endregion Property MinValue : decimal #region Property ProjectID : ID public int ProjectID { get; set; } #endregion Property ProjectID : ID #region Property IsActive : bool public bool IsActive { get; set; } #endregion Property IsActive : bool //#region Property ActivityID : ID //private int _ActivityID; //public ID ActivityID //{ // get { return _ActivityID; } // set // { // base.OnPropertyChange("ActivityID", _ActivityID, value); // _ActivityID = value; // } //} //#endregion Property ActivityID : ID #region IDisplayProperty Members public string Column1 { get; } public string Column2 { get; } public string Column3 { get; } public int Column4 { get; } //public List GetMe() //{ // List disps = null; // List inCats = Service.Get(); // if (inCats != null) // { // disps = new List(); // foreach (InvestmentCategory inCat in inCats) // { // disps.Add(inCat); // } // } // return disps; //} //public List GetMe(ID id) //{ // List disps = null; // InvestmentCategory inCat = Service.Get(id); // if (inCat != null) // { // disps = new List(); // disps.Add(inCat); // } // return disps; //} #endregion #endregion //#region Validation Function //public bool Validate(ref string sMessage,ref int messageNumber) //{ // if (this.Code == string.Empty) // { // sMessage = "Investment category code can not be empty"; // messageNumber = 1; // return false; // } // if (this.IsNew) // { // if (InvestmentCategory.IsExist(this.Code)) // { // sMessage = "Duplicate Code"; // messageNumber = 2; // return false; // } // } // if (this.Name == string.Empty) // { // sMessage = "Investment category name can not be empty"; // messageNumber = 3; // return false; // } // return true; //} //#endregion } #endregion #region Interface public interface IInvestmentCategoryService { void Save(InvestmentCategory item); void Delete(int id); InvestmentCategory Get(int id); List Get(); DataTable GetTable(); bool IsInvestmentCategoryUsed(InvestmentCategory investmentCategory); bool IsExist(string sCode); InvestmentCategory GetbyProjectid(int Projectid); } #endregion }