EchoTex_Payroll/HRM.BO/GrievanceManagement/Punishment.cs

72 lines
1.5 KiB
C#
Raw Normal View History

2024-10-14 10:01:49 +06:00
using System;
using System.Collections.Generic;
namespace HRM.BO
{
#region Punishment
public class Punishment : BasicBaseObject
{
#region Constructor
public Punishment()
{
Code = string.Empty;
Description = string.Empty;
}
#endregion Constructor
#region Input validator
public string[] InputValidator()
{
string[] sErrorString = new string[2];
if (this.Code == "")
{
sErrorString[0] = "Code can not be empty";
sErrorString[1] = "Code";
return sErrorString;
}
if (this.Description == "")
{
sErrorString[0] = "Description can not be empty";
sErrorString[1] = "Description";
return sErrorString;
}
sErrorString = null;
return sErrorString;
}
#endregion Input validator
#region Properties
public string Code { get; set; }
public string Description { get; set; }
#endregion Properties
}
#endregion Punishment
#region IPunishment Service
public interface IPunishmentService
{
void Delete(int id);
Punishment Get(int id);
List<Punishment> Get();
List<Punishment> Get(EnumStatus status);
List<Punishment> GetDAPunishmentPicker(int punishmentid);
int Save(Punishment item);
}
#endregion IPunishment Service
}