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(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 Get() //{ // ObjectsTemplate attendanceTracks = new ObjectsTemplate(); // 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 GetByEmployeeID(ID employeeID) //{ // ObjectsTemplate attendanceTracks = new ObjectsTemplate(); // 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 Get(); List Get(bool isActive); List 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 }