EchoTex_Payroll/HRM.BO/Fund/Transaction/GLTranUserRecord.cs
2024-10-14 10:01:49 +06:00

308 lines
7.9 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Ease.Core;
using Ease.CoreV35;
using Ease.Core.Utility;
namespace HRM.BO
{
#region GLTranUserRecord
[Serializable]
public class GLTranUserRecord : BasicBaseObject
{
#region Constructor
public GLTranUserRecord()
{
GLTranUserRecordID = 0;
GLID = 0;
GLTranID = 0;
GLTranDetailID = 0;
UserObject1ID = 0;
UserRecord1ID = 0;
UserObject2ID = 0;
UserRecord2ID = 0;
//_userObject1 = null;
//_userObject2 = null;
//_userRecord1 = null;
//_userRecord2 = null;
Description = string.Empty;
Amount = 0;
Modifiedby = 0;
ModifiedDate = DateTime.MinValue;
OperationalStatus = EnumOperationalStatus.None;
}
#endregion
#region Properties
#region GLTranUserRecordID
public int GLTranUserRecordID { get; set; }
#endregion
#region GLID
public int GLID { get; set; }
#endregion
#region GLTranID
public int GLTranID { get; set; }
#endregion
#region GLTranDetailID
public int GLTranDetailID { get; set; }
#endregion
#region UserObject1ID
public int UserObject1ID { get; set; }
#endregion
#region UserObjectOne
//private UserObject _userObject1;
//public UserObject UserObject1
//{
// get
// {
// if (_userObject1 == null)
// {
// _userObject1 = new UserObject();
// _userObject1 = _userObject1.Get(_nUserObject1ID);
// }
// return _userObject1;
// }
// set
// {
// _userObject1 = value;
// }
//}
#endregion
#region UserRecord1ID
public int UserRecord1ID { get; set; }
#endregion
#region UserRecordOne
//private UserRecord _userRecord1;
//public UserRecord UserRecord1
//{
// get
// {
// if (_userRecord1 == null)
// {
// _userRecord1 = new UserRecord();
// _userRecord1 = _userRecord1.Get(_nUserRecord1ID);
// }
// return _userRecord1;
// }
// set
// {
// _userRecord1 = value;
// }
//}
#endregion
#region Member
private object _member;
public object Member
{
get
{
if (_member == null)
{
throw new Exception("Member not yet Set");
}
return _member;
}
set
{
_member = value;
}
}
#endregion
#region UserObject2ID
public int UserObject2ID { get; set; }
#endregion
#region UserObjectTwo
//private UserObject _userObject2;
//public UserObject UserObject2
//{
// get
// {
// if (_userObject2 == null)
// {
// _userObject2 = new UserObject();
// _userObject2 = _userObject2.Get(_nUserObject2ID);
// }
// return _userObject2;
// }
//}
#endregion
#region UserRecord2ID
public int UserRecord2ID { get; set; }
#endregion
#region UserRecordTwo
//private UserRecord _userRecord2;
//public UserRecord UserRecord2
//{
// get
// {
// if (_userRecord2 == null)
// {
// _userRecord2 = new UserRecord();
// _userRecord2 = _userRecord2.Get(_nUserRecord2ID);
// }
// return _userRecord2;
// }
//}
#endregion
#region Description
public string Description { get; set; }
#endregion
#region Amount
public decimal Amount { get; set; }
#endregion
#region Modifiedby
public int Modifiedby { get; set; }
#endregion
#region ModifiedDate
public DateTime ModifiedDate { get; set; }
#endregion
#region Property OperationalStatus : EnumOperationalStatus
public EnumOperationalStatus OperationalStatus { get; set; }
#endregion
#endregion
#region Functions
//public GLTranUserRecord Get( ID nGLTranUserRecordID)
//{
// GLTranUserRecord oGLTranUserRecord = null;
// #region Cache Header
// oGLTranUserRecord = (GLTranUserRecord)_cache["Get", nGLTranUserRecordID];
// if (oGLTranUserRecord != null)
// return oGLTranUserRecord;
// #endregion
// oGLTranUserRecord = GLTranUserRecord.Service.Get(nGLTranUserRecordID);
// #region Cache Footer
// _cache.Add(oGLTranUserRecord, "Get", nGLTranUserRecordID);
// #endregion
// return oGLTranUserRecord;
//}
//public ID Save()
//{
// return GLTranUserRecord.Service.Save(this);
//}
//public void Delete()
//{
// GLTranUserRecord.Service.Delete(ID);
//}
#endregion
}
#endregion
//#region Collection of GLTranUserRecord
//[Serializable]
//public class GLTranUserRecords : IndexedBusinessObjects
//{
// #region Cache Store
// private static Cache _cache = new Cache(typeof(GLTranUserRecords));
// #endregion
// #region Collection Class Methods
// public void Add(GLTranUserRecord oItem)
// {
// AddItem(oItem);
// }
// public void Remove(GLTranUserRecord oItem)
// {
// RemoveItem(oItem);
// }
// public GLTranUserRecord this[int i]
// {
// get { return (GLTranUserRecord)GetItem(i); }
// }
// public int GetItemIndex(ID id)
// {
// return GetIndex(id);
// }
// #endregion
// #region Functions
// public static GLTranUserRecords Get()
// {
// GLTranUserRecords oGLTranUserRecords = null;
// #region Cache Header
// oGLTranUserRecords = (GLTranUserRecords)_cache["Get"];
// if (oGLTranUserRecords != null)
// return oGLTranUserRecords;
// #endregion
// oGLTranUserRecords = GLTranUserRecord.Service.Get();
// #region Cache Footer
// _cache.Add(oGLTranUserRecords, "Get");
// #endregion
// return oGLTranUserRecords;
// }
// public static GLTranUserRecords GetByGLTranID(ID gLTranID)
// {
// return GLTranUserRecord.Service.GetByGLTranID(gLTranID);
// }
// public static GLTranUserRecords GetByGLID(ID gLID)
// {
// return GLTranUserRecord.Service.GetByGLID(gLID);
// }
// public static GLTranUserRecords GetByGLTranDetailID(ID gLTranDetailID)
// {
// return GLTranUserRecord.Service.GetByGLTranDetailID(gLTranDetailID);
// }
// #endregion
//}
//#endregion
#region IGLTranUserRecord Service
public interface IGLTranUserRecordService
{
GLTranUserRecord Get(int id);
List<GLTranUserRecord> Get();
int Save(GLTranUserRecord oGLTranUserRecord);
List<GLTranUserRecord> GetByGLTranID(int gLTranID);
List<GLTranUserRecord> GetByGLTranDetailID(int gLTranDetailID);
void Delete(int id);
List<GLTranUserRecord> GetByGLID(int gLID);
}
#endregion
}