332 lines
10 KiB
C#
332 lines
10 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Data;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
using Ease.Core.Model;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region Class Member
|
|
[Serializable]
|
|
public class Member : AuditTrailBase
|
|
{
|
|
|
|
|
|
#region Constructor
|
|
public Member()
|
|
{
|
|
MemberID = 0;
|
|
EmpCode = string.Empty;
|
|
Name = string.Empty;
|
|
MembershipNo = string.Empty;
|
|
MembershipDate = DateTime.MinValue;
|
|
DOB = DateTime.MinValue;
|
|
DOJ = DateTime.MinValue;
|
|
CurrentBasic = 0;
|
|
CurrentGradeID =0;
|
|
CurrentGrade = null;
|
|
EmpCategoryID = 0;
|
|
EmpCategory = null;
|
|
CompanyName = string.Empty;
|
|
Status = EnumEmpStatus.All;
|
|
CurrentDeptID = 0;
|
|
CurrentDept = null;
|
|
CurrCCID = 0;
|
|
CurrCC = null;
|
|
IsSentToFAS = false;
|
|
ProjectID = 0;
|
|
SignumID = null;
|
|
CurrentDesig = null;
|
|
CurrentDesigID = 0;
|
|
Email = null;
|
|
LoginID = null;
|
|
IsProfitPartner = true;
|
|
DOL = DateTime.MinValue;
|
|
FinalSettlementDate = DateTime.MinValue;
|
|
}
|
|
#endregion
|
|
|
|
#region Property
|
|
public int MemberID { get; set; }
|
|
|
|
public string EmpCode { get; set; }
|
|
|
|
public string Name { get; set; }
|
|
|
|
public string MembershipNo { get; set; }
|
|
|
|
public DateTime? MembershipDate { get; set; }
|
|
|
|
public double MonthlyPension { get; set; }
|
|
|
|
public DateTime DOB { get; set; }
|
|
|
|
public DateTime DOJ { get; set; }
|
|
|
|
public double CurrentBasic { get; set; }
|
|
|
|
public int CurrentGradeID { get; set; }
|
|
|
|
public EmpSuuportDetails CurrentGrade { get; set; }
|
|
|
|
public bool IsSentToFAS { get; set; }
|
|
|
|
public int EmpCategoryID { get; set; }
|
|
|
|
public EmpSuuportDetails EmpCategory { get; set; }
|
|
|
|
public string CompanyName { get; set; }
|
|
|
|
public EnumEmpStatus Status { get; set; }
|
|
|
|
public int CurrentDeptID { get; set; }
|
|
|
|
public EmpSuuportDetails CurrentDept { get; set; }
|
|
|
|
public string SignumID { get; set; }
|
|
|
|
public int CurrCCID { get; set; }
|
|
|
|
public DateTime? DOL { get; set; }
|
|
|
|
public EmpSuuportDetails CurrCC { get; set; }
|
|
|
|
public int ProjectID { get; set; }
|
|
|
|
public string CurrentDesig { get; set; }
|
|
|
|
public int CurrentDesigID { get; set; }
|
|
|
|
public string Email { get; set; }
|
|
|
|
public bool IsProfitPartner { get; set; }
|
|
|
|
public DateTime? FinalSettlementDate { get; set; }
|
|
|
|
public string LoginID { get; set; }
|
|
|
|
|
|
#region Property Implementation of IFASTranObject And FASUserObject
|
|
public int iFASTranObject_ProcessID
|
|
{
|
|
get;
|
|
}
|
|
|
|
public int iFASTranObject_ActivityID
|
|
{
|
|
|
|
get;
|
|
}
|
|
|
|
public int iFASTranObject_SystemTranType
|
|
{
|
|
get;
|
|
}
|
|
|
|
public int iFASTranObject_ActivityRelated
|
|
{
|
|
get;
|
|
}
|
|
|
|
public ProjectProcess iFASTranObject_ProjectProcess
|
|
{
|
|
get;
|
|
}
|
|
|
|
public List<ProcessActivity> iFASTranObject_ProcessActivity
|
|
{
|
|
get;
|
|
}
|
|
|
|
public List<ActivityVoucherSetup> iFASTranObject_voucherSetups
|
|
{
|
|
get;
|
|
}
|
|
|
|
//public EaseFAS.BO.GLTrans iFASTranObject_glTrans
|
|
//{
|
|
// get; set;
|
|
//}
|
|
|
|
//public EaseFAS.BO.GLTranDetails iFASTranObject_glTranDetails
|
|
//{
|
|
// get;set;
|
|
//}
|
|
//public EaseFAS.BO.GLTranUserRecords iFASTranObject_glTranURs
|
|
//{
|
|
// get; set;
|
|
//}
|
|
|
|
//public List<HelperForSubsidiaryUpload> iFASUserObject_helperForSubsidiarysUpload
|
|
//{
|
|
// get
|
|
// {
|
|
// if (this.forVourcher_ihelperForSubsidiarysUpload == null)
|
|
// this.forVourcher_ihelperForSubsidiarysUpload = new List<HelperForSubsidiaryUpload>();
|
|
// return this.forVourcher_ihelperForSubsidiarysUpload;
|
|
// }
|
|
|
|
// set
|
|
// {
|
|
// if (this.forVourcher_ihelperForSubsidiarysUpload == null)
|
|
// this.forVourcher_ihelperForSubsidiarysUpload = new List<HelperForSubsidiaryUpload>();
|
|
// this.forVourcher_ihelperForSubsidiarysUpload = value;
|
|
// }
|
|
//}
|
|
|
|
#endregion
|
|
|
|
#endregion Property
|
|
|
|
#region Methods
|
|
|
|
//#region Implementation of Public Method of IFASTranObject
|
|
//public IFASTranObject PrepareFASTranObject(int processID, int activityID, int sytemTranType)
|
|
//{
|
|
// IFASTranObject oIFasTran = null;
|
|
// this.forVoucher_ProcessID = processID;
|
|
// this.forVoucher_ActivityID = activityID;
|
|
// this.forVoucher_SystemTranType = sytemTranType;
|
|
// ProjectProcess oPP = new ProjectProcess().Get(ID(processID));
|
|
// this.ForVoucher_ProjectProcess = oPP;
|
|
// this.ForVoucher_ProcessActivity = ProcessActivity.GetbyProcessID(oPP.ID);
|
|
// this.forVoucher_voucherSetups = new List<ActivityVoucherSetup>();
|
|
// foreach (ProcessActivity opA in this.ForVoucher_ProcessActivity)
|
|
// {
|
|
// this.ForVoucher_voucherSetups.AddRange(ActivityVoucherSetup.GetbyActivityid(opA.ID));
|
|
// }
|
|
// this.ForVoucher_glTrans = new EaseFAS.BO.GLTrans();
|
|
// this.ForVoucher_glTranURs = new EaseFAS.BO.GLTranUserRecords();
|
|
// oIFasTran = this;
|
|
// return oIFasTran;
|
|
//}
|
|
|
|
//public IFASTranObject PrepareFASTranObject(int processID, int ActivityRelatedID)
|
|
//{
|
|
// IFASTranObject oIFasTran = null;
|
|
// this.forVoucher_ProcessID = processID;
|
|
// ProjectProcess oPP = new ProjectProcess().Get(ID(processID));
|
|
// this.ForVoucher_ProjectProcess = oPP;
|
|
// this.forVoucher_SystemTranType = oPP.TranType;
|
|
// this.ForVoucher_ProcessActivity = ProcessActivity.GetbyProcessID(oPP.ID);
|
|
// this.forVoucher_voucherSetups = new List<ActivityVoucherSetup>();
|
|
// foreach (ProcessActivity opA in this.ForVoucher_ProcessActivity)
|
|
// {
|
|
// if (opA.RelatedValue == ActivityRelatedID)
|
|
// this.ForVoucher_voucherSetups.AddRange(ActivityVoucherSetup.GetbyActivityid(opA.ID));
|
|
// this.forVoucher_ActivityRelated = opA.ActivityRelatedTo;
|
|
// }
|
|
// this.ForVoucher_glTrans = new EaseFAS.BO.GLTrans();
|
|
// this.ForVoucher_glTranURs = new EaseFAS.BO.GLTranUserRecords();
|
|
// oIFasTran = this;
|
|
// return oIFasTran;
|
|
//}
|
|
|
|
//public List<IFASTranObject> PrepareFASTranObjectCol(int processID, int ActivityRelatedID)
|
|
//{
|
|
// List<IFASTranObject> oIFasTran = new List<IFASTranObject>();
|
|
|
|
// this.forVoucher_ProcessID = processID;
|
|
// ProjectProcess oPP = new ProjectProcess().Get(ID(processID));
|
|
// this.ForVoucher_ProjectProcess = oPP;
|
|
// this.forVoucher_SystemTranType = oPP.TranType;
|
|
// this.ForVoucher_ProcessActivity = ProcessActivity.GetbyProcessID(oPP.ID);
|
|
// this.forVoucher_voucherSetups = new List<ActivityVoucherSetup>();
|
|
// foreach (ProcessActivity opA in this.ForVoucher_ProcessActivity)
|
|
// {
|
|
// if (opA.RelatedValue == ActivityRelatedID)
|
|
// {
|
|
// this.ForVoucher_voucherSetups.AddRange(ActivityVoucherSetup.GetbyActivityid(opA.ID));
|
|
// this.forVoucher_ActivityID = opA.ID;
|
|
// this.forVoucher_ActivityRelated = opA.ActivityRelatedTo;
|
|
// }
|
|
// }
|
|
// this.ForVoucher_glTrans = new EaseFAS.BO.GLTrans();
|
|
// this.ForVoucher_glTranURs = new EaseFAS.BO.GLTranUserRecords();
|
|
// oIFasTran.Add((IFASTranObject)this);
|
|
// return oIFasTran;
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
//#region Validation Function
|
|
|
|
//public bool Validate(string code, string name, ref Member ob, ref string sMessage)
|
|
//{
|
|
// string s = code;
|
|
// Member Member = new Member();
|
|
// Member = ob;
|
|
// if (code == string.Empty)
|
|
// {
|
|
// sMessage = "Member Code can not be Empty";
|
|
// return false;
|
|
// }
|
|
// if (name == string.Empty)
|
|
// {
|
|
// sMessage = "Member Name can not be Empty";
|
|
// return false;
|
|
// }
|
|
|
|
// if (Member.IsNew)
|
|
// {
|
|
// if (Member.IsExist(code))
|
|
// {
|
|
// sMessage = "Duplicate Code";
|
|
// return false;
|
|
|
|
// }
|
|
// }
|
|
// else
|
|
// {
|
|
// if (Member.IsExist(code))
|
|
// {
|
|
// sMessage = "Duplcate Code";
|
|
// return false;
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
// return true;
|
|
|
|
//}
|
|
//#endregion
|
|
|
|
#endregion Methods
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Interface
|
|
public interface IMemberService
|
|
{
|
|
void UpdateMonthlyPension(List<Member> members);
|
|
int Save(Member item);
|
|
void Delete(int id);
|
|
Member Get(int id);
|
|
Member Get(string empCode);
|
|
Member Get(string empCode, string FMConn);
|
|
List<Member> Get();
|
|
List<Member> GetSettledMember(DateTime fromDate, DateTime toDate);
|
|
List<Member> GetLiveMemberOn(DateTime liveOnDate);
|
|
List<Member> GetAuditLiveMemberOn(DateTime YearEndLastDate, DateTime ActualAuditDate);
|
|
|
|
// List<Member> Get(int statusInInt);
|
|
DataTable GetTable();
|
|
bool IsExist(string sCode);
|
|
List<Member> GetMemberList(string nameOp, string name, EnumEmpStatus status, string membershipOperator, DateTime membershipFromDate, DateTime membershipToDate, string joiningOperator, DateTime joiningFromDate, DateTime joiningToDate, string sEmpNo, int projectID);
|
|
List<Member> Get(bool isHasMail);
|
|
void Save(List<Member> members);
|
|
|
|
DataTable GetBalance();
|
|
List<Member> Getmember(string sEmpID);
|
|
|
|
List<Member> GetMembers(DateTime fromDate, DateTime ToDate);
|
|
|
|
DataTable GetMembersMonthlyPension();
|
|
}
|
|
#endregion
|
|
}
|