CEL_Payroll/Payroll.BO/Budget/MarketSalarySurvey.cs

175 lines
4.5 KiB
C#
Raw Normal View History

2024-09-17 14:30:13 +06:00
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<IMarketSalarySurveyService>(typeof(IMarketSalarySurveyService)); }
}
#endregion
#endregion
#region Functions
#region Get()
public static ObjectsTemplate<MarketSalarySurvey> Get(DateTime surveyYear)
{
ObjectsTemplate<MarketSalarySurvey> obAllMarketSurvey = MarketSalarySurvey.Service.Get(surveyYear);
return obAllMarketSurvey;
}
public static ObjectsTemplate<MarketSalarySurvey> Get(DateTime surveyYear,int nSurveyOn,int nGradeID)
{
ObjectsTemplate<MarketSalarySurvey> obAllMarketSurvey = MarketSalarySurvey.Service.Get(surveyYear,nSurveyOn,nGradeID);
return obAllMarketSurvey;
}
public static ObjectsTemplate<MarketSalarySurvey> Get(DateTime surveyYear, int nSurveyOn)
{
ObjectsTemplate<MarketSalarySurvey> 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<MarketSalarySurvey> 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<MarketSalarySurvey> Get(DateTime surveyYear);
ObjectsTemplate<MarketSalarySurvey> Get(DateTime surveyYear, int nSurveyOn, int nGradeID);
ObjectsTemplate<MarketSalarySurvey> Get(DateTime surveyYear, int nSurveyOn);
ID Save(MarketSalarySurvey item);
void Delete(ID id);
void Update(MarketSalarySurvey oMarketSurvey);
void SaveAll(ObjectsTemplate<MarketSalarySurvey> allItems);
bool CheckDesignationExistsOrNot(ID iD,DateTime year);
}
#endregion
}