EchoTex_Payroll/HRM.BO/SearchReport/AuthorizedPerson.cs

296 lines
6.6 KiB
C#
Raw Permalink Normal View History

2024-10-14 10:01:49 +06:00

using Ease.Core.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
namespace HRM.BO
{
#region AuthorizedPerson
public class AuthorizedPerson : BasicBaseObject
{
#region Constructor
public AuthorizedPerson()
{
_personID = 0;
_name = string.Empty;
_designation = string.Empty;
_position = 0;
_signature = null;
}
#endregion
#region Properties
#region PersonID : ID
private int _personID;
public int PersonID
{
get { return _personID; }
set
{
_personID = value;
}
}
#endregion
#region name : string
private string _name;
public string Name
{
get { return _name; }
set
{
_name = value;
}
}
#endregion
#region designation : string
private string _designation;
public string Designation
{
get { return _designation; }
set
{
_designation = value;
}
}
#endregion
#region position : int
private int _position;
public int Position
{
get { return _position; }
set
{
_position = value;
}
}
#endregion
#region name : string
private string _filename;
public string FileName
{
get { return _filename; }
set
{
_filename = value;
}
}
#endregion
#region signature : byte
private byte[] _signature;
public byte[] Signature
{
get { return _signature; }
set
{
_signature = value;
}
}
#region email : string
private string _email;
public string Email
{
get { return _email; }
set
{
_email = value;
}
}
#endregion
private int _employeeId;
public int EmployeeId
{
get { return _employeeId; }
set
{
_employeeId = value;
}
}
#region phone : string
private string _phone;
public string Phone
{
get { return _phone; }
set
{
_phone = value;
}
}
#endregion
#region extension : string
private string _extension;
public string Extension
{
get { return _extension; }
set
{
_extension = value;
}
}
#endregion
public string SignatureFileTobase64 { get; set;}
public string ConnectionString { get; set; }
#endregion
//#region Service Factory IAuthorizedPersonService : IAuthorizedPersonService
//internal static IAuthorizedPersonService Service
//{
// get { return Services.Factory.CreateService<IAuthorizedPersonService>(typeof(IAuthorizedPersonService)); }
//}
//#endregion
#endregion
//#region Functions
//public static AuthorizedPerson Get(int nID)
//{
// AuthorizedPerson oAuthorizedPerson = null;
// #region Cache Header
// oAuthorizedPerson = (AuthorizedPerson)_cache["Get", nID];
// if (oAuthorizedPerson != null)
// return oAuthorizedPerson;
// #endregion
// oAuthorizedPerson = AuthorizedPerson.Service.Get(nID);
// #region Cache Footer
// _cache.Add(oAuthorizedPerson, "Get", nID);
// #endregion
// return oAuthorizedPerson;
//}
//public static List<AuthorizedPerson> Get()
//{
// #region Cache Header
// List<AuthorizedPerson> authorizedPersons = _cache["Get"] as List<AuthorizedPerson>;
// if (authorizedPersons != null)
// return authorizedPersons;
// #endregion
// try
// {
// authorizedPersons = Service.Get();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(authorizedPersons, "Get");
// #endregion
// return authorizedPersons;
//}
//public static List<AuthorizedPerson> GetByReportID(int reportID)
//{
// List<AuthorizedPerson> oAuthorizedPerson = null;
// #region Cache Header
// oAuthorizedPerson = (List<AuthorizedPerson>)_cache["GetByReportID", reportID];
// if (oAuthorizedPerson != null)
// return oAuthorizedPerson;
// #endregion
// oAuthorizedPerson = AuthorizedPerson.Service.GetByReportID(reportID);
// #region Cache Footer
// _cache.Add(oAuthorizedPerson, "GetByReportID", reportID);
// #endregion
// return oAuthorizedPerson;
//}
//public bool IsExist(string Name)
//{
// return AuthorizedPerson.Service.IsExist(Name);
//}
//public int Save()
//{
// base.SetAuditTrailProperties();
// return AuthorizedPerson.Service.Save(this);
//}
//public DataTable GetImage(int PersonID)
//{
// return AuthorizedPerson.Service.GetImage(PersonID);
//}
//public int Save(FileStream stream)
//{
// base.SetAuditTrailProperties();
// return AuthorizedPerson.Service.Save(this, stream);
//}
//public void Delete()
//{
// AuthorizedPerson.Service.Delete(ID);
//}
//#endregion
}
#endregion
#region IAuthorizedPerson Service
public interface IAuthorizedPersonService
{
AuthorizedPerson Get(int id);
List<AuthorizedPerson> Get();
int Save(AuthorizedPerson item);
void Delete(int id);
bool IsExist(string Name);
int Save(AuthorizedPerson oAuthorizedPerson, FileStream stream);
DataTable GetImage(int PersonID);
List<AuthorizedPerson> GetByReportID(int reportID);
}
#endregion
}