116 lines
2.3 KiB
C#
116 lines
2.3 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using Ease.CoreV35.Model;
|
|||
|
|
|||
|
namespace Payroll.BO
|
|||
|
{
|
|||
|
[Serializable]
|
|||
|
public class PMPValueBehavior : BasicBaseObject
|
|||
|
{
|
|||
|
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public PMPValueBehavior()
|
|||
|
{
|
|||
|
this._name = string.Empty;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
#region Name : string
|
|||
|
private string _name;
|
|||
|
|
|||
|
public string Name
|
|||
|
{
|
|||
|
get { return _name; }
|
|||
|
set { _name = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Service Factory IPMPValueBehavior : IPMPValueBehavior
|
|||
|
|
|||
|
internal static IPMPValueBehaviorService Service
|
|||
|
{
|
|||
|
get { return Services.Factory.CreateService<IPMPValueBehaviorService>(typeof(IPMPValueBehaviorService)); }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Functions
|
|||
|
|
|||
|
#region Input validator
|
|||
|
public string[] InputValidator()
|
|||
|
{
|
|||
|
string[] sErrorString = new string[2];
|
|||
|
if (this.Name == string.Empty)
|
|||
|
{
|
|||
|
sErrorString[0] = "Description can not be empty";
|
|||
|
sErrorString[1] = "Name";
|
|||
|
return sErrorString;
|
|||
|
}
|
|||
|
sErrorString = null;
|
|||
|
return sErrorString;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Get
|
|||
|
public static ObjectsTemplate<PMPValueBehavior> Get(EnumStatus status)
|
|||
|
{
|
|||
|
return PMPValueBehavior.Service.Get(status);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Save
|
|||
|
|
|||
|
public ID Save()
|
|||
|
{
|
|||
|
this.SetAuditTrailProperties();
|
|||
|
return PMPValueBehavior.Service.Save(this);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Delete
|
|||
|
public static void Delete(ID id)
|
|||
|
{
|
|||
|
PMPValueBehavior.Service.Delete(id);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
#region Get By ID
|
|||
|
public static PMPValueBehavior Get(ID id)
|
|||
|
{
|
|||
|
return PMPValueBehavior.Service.Get(id);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
#region IPMPValueBehavior Service
|
|||
|
|
|||
|
public interface IPMPValueBehaviorService
|
|||
|
{
|
|||
|
ObjectsTemplate<PMPValueBehavior> Get(EnumStatus status);
|
|||
|
PMPValueBehavior Get(ID id);
|
|||
|
ID Save(PMPValueBehavior item);
|
|||
|
void Delete(ID id);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
}
|