using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.CoreV35.Model; namespace Payroll.BO { [Serializable] public class MarketSalarySurvey : AuditTrailBase { #region Properties #region delegate public delegate void ItemChanged(); #endregion #region Constructor public MarketSalarySurvey() { _gradeID = null; _companyID = null; _amount = double.MinValue; _surveyYear = DateTime.MinValue; _surveyOn = EnumSurveyOn.Basic; } #endregion #region _gradeID private ID _gradeID; public ID GradeID { get { return _gradeID; } set { _gradeID = value; } } #endregion #region _companyID private ID _companyID; public ID CompanyID { get { return _companyID; } set { _companyID = value; } } #endregion #region Amount private double _amount; public double Amount { get { return _amount; } set { _amount = value; } } #endregion #region SurveyYear private DateTime _surveyYear; public DateTime SurveyYear { get { return _surveyYear; } set { _surveyYear = value; } } #endregion #region SurveyOn private EnumSurveyOn _surveyOn; public EnumSurveyOn SurveyOn { get { return _surveyOn; } set { _surveyOn = value; } } #endregion #region Service Factory IMarketSurveyServiceService : IMarketSurveyServiceService internal static IMarketSalarySurveyService Service { get { return Services.Factory.CreateService(typeof(IMarketSalarySurveyService)); } } #endregion #endregion #region Functions #region Get() public static ObjectsTemplate Get(DateTime surveyYear) { ObjectsTemplate obAllMarketSurvey = MarketSalarySurvey.Service.Get(surveyYear); return obAllMarketSurvey; } public static ObjectsTemplate Get(DateTime surveyYear,int nSurveyOn,int nGradeID) { ObjectsTemplate obAllMarketSurvey = MarketSalarySurvey.Service.Get(surveyYear,nSurveyOn,nGradeID); return obAllMarketSurvey; } public static ObjectsTemplate Get(DateTime surveyYear, int nSurveyOn) { ObjectsTemplate obAllMarketSurvey = MarketSalarySurvey.Service.Get(surveyYear, nSurveyOn); return obAllMarketSurvey; } #endregion #region Save public static void Save(MarketSalarySurvey item) { MarketSalarySurvey.Service.Save(item); } #endregion #region Delete public static void Delete(ID id) { MarketSalarySurvey.Service.Delete(id); } #endregion #region SaveAll public static void SaveAll(ObjectsTemplate allItems) { MarketSalarySurvey.Service.SaveAll(allItems); } #endregion #region Update public static void Update(MarketSalarySurvey oMarketSurvey) { MarketSalarySurvey.Service.Update(oMarketSurvey); } #endregion #region CheckDesignationExistsOrNot public static bool CheckDesignationExistsOrNot(ID iD,DateTime year) { return MarketSalarySurvey.Service.CheckDesignationExistsOrNot(iD,year); } #endregion #endregion } #region IMarketSalarySurveyService public interface IMarketSalarySurveyService { MarketSalarySurvey Get(ID nID); ObjectsTemplate Get(DateTime surveyYear); ObjectsTemplate Get(DateTime surveyYear, int nSurveyOn, int nGradeID); ObjectsTemplate Get(DateTime surveyYear, int nSurveyOn); ID Save(MarketSalarySurvey item); void Delete(ID id); void Update(MarketSalarySurvey oMarketSurvey); void SaveAll(ObjectsTemplate allItems); bool CheckDesignationExistsOrNot(ID iD,DateTime year); } #endregion }