183 lines
4.2 KiB
C#
183 lines
4.2 KiB
C#
|
|
|||
|
using Ease.Core.Model;
|
|||
|
|
|||
|
|
|||
|
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
using System.IO;
|
|||
|
using System.Reflection;
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
public class SurveyWeightDefinition:BasicBaseObject
|
|||
|
{
|
|||
|
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public SurveyWeightDefinition()
|
|||
|
{
|
|||
|
_surveyID = 0;
|
|||
|
_fromWeight = 0;
|
|||
|
_toWeight = 0;
|
|||
|
_remark = string.Empty;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region SurveyID : ID
|
|||
|
|
|||
|
private int _surveyID;
|
|||
|
public int SurveyID
|
|||
|
{
|
|||
|
get { return _surveyID; }
|
|||
|
set
|
|||
|
{
|
|||
|
|
|||
|
_surveyID = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region FromWeight : double
|
|||
|
|
|||
|
private double _fromWeight;
|
|||
|
public double FromWeight
|
|||
|
{
|
|||
|
get { return _fromWeight; }
|
|||
|
set
|
|||
|
{
|
|||
|
|
|||
|
_fromWeight = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
#region ToWeight : double
|
|||
|
|
|||
|
private double _toWeight;
|
|||
|
public double ToWeight
|
|||
|
{
|
|||
|
get { return _toWeight; }
|
|||
|
set
|
|||
|
{
|
|||
|
|
|||
|
_toWeight = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
#region Remark : string
|
|||
|
|
|||
|
private string _remark;
|
|||
|
public string Remark
|
|||
|
{
|
|||
|
get { return _remark; }
|
|||
|
set
|
|||
|
{
|
|||
|
|
|||
|
_remark = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Service Factory IPFTransactionService : IPFTransactionService
|
|||
|
|
|||
|
internal static ISurveyWeightDefinitionService Service
|
|||
|
{
|
|||
|
get { return Services.Factory.CreateService<ISurveyWeightDefinitionService>(typeof(ISurveyWeightDefinitionService)); }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Functions
|
|||
|
|
|||
|
|
|||
|
|
|||
|
//public static List<SurveyWeightDefinition> GetSurveyWeightDefinition()
|
|||
|
//{
|
|||
|
// #region cache header
|
|||
|
// List<SurveyWeightDefinition> SurveyWeightDefinitions = _cache["GetSurveyWeightDefinition"] as List<SurveyWeightDefinition>;
|
|||
|
// if (SurveyWeightDefinitions != null)
|
|||
|
// return SurveyWeightDefinitions;
|
|||
|
// #endregion
|
|||
|
// try
|
|||
|
// {
|
|||
|
// SurveyWeightDefinitions = Service.GetSurveyWeightDefinition();
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region cache footer
|
|||
|
// _cache.Add(SurveyWeightDefinitions, "GetSurveyWeightDefinition");
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return SurveyWeightDefinitions;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<SurveyWeightDefinition> GetSurveyWeightDefinition(int surveyId)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<SurveyWeightDefinition> SurveyWeightDefinitions = _cache["GetSurveyWeightDefinition", surveyId] as List<SurveyWeightDefinition>;
|
|||
|
// if (SurveyWeightDefinitions != null)
|
|||
|
// return SurveyWeightDefinitions;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// SurveyWeightDefinitions = Service.GetSurveyWeightDefinition(surveyId);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(SurveyWeightDefinitions, "GetSurveyWeightDefinition", surveyId);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return SurveyWeightDefinitions;
|
|||
|
//}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
//public int Save()
|
|||
|
//{
|
|||
|
// base.SetAuditTrailProperties();
|
|||
|
// return SurveyWeightDefinition.Service.Save(this);
|
|||
|
//}
|
|||
|
|
|||
|
//public void Delete(int id)
|
|||
|
//{
|
|||
|
// SurveyWeightDefinition.Service.Delete(id);
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
}
|
|||
|
#region ISurveyWeightDefinition Service
|
|||
|
|
|||
|
public interface ISurveyWeightDefinitionService
|
|||
|
{
|
|||
|
List<SurveyWeightDefinition> GetSurveyWeightDefinition(int surveyId);
|
|||
|
List<SurveyWeightDefinition> GetSurveyWeightDefinition();
|
|||
|
|
|||
|
int Save(SurveyWeightDefinition item);
|
|||
|
void Delete(int id);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|