EchoTex_Payroll/HRM.BO/Attendance/EmpMobile.cs

142 lines
3.7 KiB
C#
Raw Normal View History

2024-10-14 10:01:49 +06:00
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Ease.Core;
namespace HRM.BO
{
public class EmpMobile : BasicBaseObject
{
public EmpMobile()
{
EmpID = 0;
DeviceNO = string.Empty;
IsActive = false;
EmpNo = string.Empty;
EmpName = string.Empty;
}
#region Properties
public int EmpID { get; set; }
public string EmailAddress { get; set; }
public string DeviceNO { get; set; }
public bool IsActive { get; set; }
#region for view only
public string EmpNo { get; set; }
public string EmpName { get; set; }
#endregion
#endregion
#region Service Factory Service : IEmpMobileAttendanceService
//internal static IEmpMobileService Service
//{
// get { return Services.Factory.CreateService<IEmpMobileService>(typeof(IEmpMobileService)); }
//}
#endregion
#region Functions
//public static EmpMobile Get(int EmployeeID, string deviceNo)
//{
// EmpMobile attendanceTrack = null;
// attendanceTrack = Service.Get(EmployeeID, deviceNo);
// return attendanceTrack;
//}
//public static ObjectsTemplate<EmpMobile> Get()
//{
// ObjectsTemplate<EmpMobile> attendanceTracks = new ObjectsTemplate<EmpMobile>();
// try
// {
// attendanceTracks = Service.Get();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// return attendanceTracks;
//}
//public static EmpMobile Get(ID nID)
//{
// EmpMobile attendanceTrack = null;
// attendanceTrack = Service.Get(nID);
// return attendanceTrack;
//}
//public static ObjectsTemplate<EmpMobile> GetByEmployeeID(ID employeeID)
//{
// ObjectsTemplate<EmpMobile> attendanceTracks = new ObjectsTemplate<EmpMobile>();
// try
// {
// attendanceTracks = Service.GetByEmployeeID(employeeID);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// return attendanceTracks;
//}
//public static EmpMobile Get(string deviceNo)
//{
// EmpMobile attendanceTrack = null;
// attendanceTrack = Service.Get(deviceNo);
// return attendanceTrack;
//}
//public ID Save()
//{
// base.SetAuditTrailProperties();
// return Service.Save(this);
//}
//public ID Delete()
//{
// return Service.Delete(this);
//}
#endregion
}
#region IEmpMobileAttendanceService : Service
public interface IEmpMobileService
{
List<EmpMobile> Get();
List<EmpMobile> Get(bool isActive);
List<EmpMobile> GetByEmployeeID(int employeeID);
EmpMobile Get(int nID);
EmpMobile Get(string deviceNo);
EmpMobile Get(int EmployeeID, string deviceNo);
int Save(EmpMobile obj);
int Save(string ids);
int Delete(EmpMobile obj);
int Delete(string ids);
DataTable GetEmpForMobileLogin(int id);
DataTable GetEmpForMobileLogin(string DeviceNo);
DataTable GetEmpForMobileLogin(string DeviceNo, int EmpID);
DataTable GetEmpForMobileLoginByEmpNo(string EmpNo);
DataSet getActiveDevice(bool isActive);
bool UnRegisterUserDevice(int EmpID, string DeviceNo);
}
#endregion
}