189 lines
6.9 KiB
C#
189 lines
6.9 KiB
C#
using Ease.Core.DataAccess;
|
|
using Ease.Core.Model;
|
|
using Ease.Core.Utility;
|
|
using HRM.BO.Configuration;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region LoanApplication
|
|
[Serializable]
|
|
public class LoanApplication: BasicBaseObject, IworkflowInterface
|
|
{
|
|
#region Constructor
|
|
public LoanApplication()
|
|
{
|
|
ApplyDate = DateTime.Today;
|
|
LoanAmount = 0.0m;
|
|
NoOfInstallment = 0;
|
|
InstallmentAmount = 0.0m;
|
|
Principal = 0.0m;
|
|
Interest = 0.0m;
|
|
purposeID = enumLoanPurpose.None;
|
|
Remarks = string.Empty;
|
|
BasicSalary = 0.0m;
|
|
GrossSalary = 0.0m;
|
|
PreviouslyTakenLoan = false;
|
|
AccountUserID = null;
|
|
AccountAppDate = null;
|
|
AccountsRemarks = string.Empty;
|
|
HRUserID = null;
|
|
HRApproveDate = null;
|
|
HRApproveRemarks = string.Empty;
|
|
TrusteesID = null;
|
|
SecondTrusteesID = null;
|
|
TrusteesApproveDate = null;
|
|
TrusteesApproveRemarks = string.Empty;
|
|
WFStatus = EnumLoanWFStatus.Not_Initiated;
|
|
|
|
}
|
|
#endregion Constructor
|
|
|
|
#region Properties
|
|
public int LoanAppID { get; set; }
|
|
public int LoanAppNO { get; set; }
|
|
public DateTime ApplyDate { get; set; }
|
|
public int MemberID { get; set; }
|
|
public Member Member { get; set; }
|
|
public string MemberCode { get; set; }
|
|
public int EmployeeID { get; set; }
|
|
public decimal LoanAmount { get; set; }
|
|
public int NoOfInstallment { get; set; }
|
|
public decimal InstallmentAmount { get; set; }
|
|
public decimal Principal { get; set; }
|
|
public decimal Interest { get; set; }
|
|
public enumLoanPurpose purposeID { get; set; }
|
|
public string Remarks { get; set; }
|
|
public DateTime FundJoining { get; set; }
|
|
public decimal BasicSalary { get; set; }
|
|
public decimal GrossSalary { get; set; }
|
|
public bool PreviouslyTakenLoan { get; set; }
|
|
public DateTime CreatedDate { get; set; }
|
|
public int CreatedBy { get; set; }
|
|
public int? AccountUserID { get; set; }
|
|
public DateTime? AccountAppDate { get; set; }
|
|
public string AccountsRemarks { get; set; }
|
|
public int? HRUserID { get; set; }
|
|
public DateTime? HRApproveDate { get; set; }
|
|
public string HRApproveRemarks { get; set; }
|
|
public int? TrusteesID { get; set; }
|
|
public DateTime? TrusteesApproveDate { get; set; }
|
|
public string TrusteesApproveRemarks { get; set; }
|
|
public int? SecondTrusteesID { get; set; }
|
|
public DateTime? SecondTrusteesApproveDate { get; set; }
|
|
public string SecondTrusteesApproveRemarks { get; set; }
|
|
public DateTime? DepositDate { get; set; }
|
|
public string? LoanApprovalStatus { get; set; }
|
|
public bool isRejected { get; set; }
|
|
public int FundTypeID { get; set; }
|
|
public int LoanCategoryID { get; set; }
|
|
|
|
public EnumLoanWFStatus WFStatus { get; set; }
|
|
//public Member member { get; set; }
|
|
|
|
#region Property LoanAttachments : LoanAttachment
|
|
|
|
private List<FMLoanAttachment> _loanAttachment;
|
|
|
|
public List<FMLoanAttachment> LoanAttachments
|
|
{
|
|
get
|
|
{
|
|
//if (_attnProcessRunDetail == null && !this.ID.IsUnassigned && this.ID.Integer > 0)
|
|
//{
|
|
// _attnProcessRunDetail = Service.GetAttnProcessRunDetails(this.ID);
|
|
|
|
//}
|
|
return _loanAttachment;
|
|
}
|
|
set { _loanAttachment = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion Properties
|
|
public string ObjectDescription
|
|
{
|
|
get
|
|
{
|
|
string str = "";
|
|
|
|
return str;
|
|
}
|
|
}
|
|
|
|
public int SetupID
|
|
{
|
|
get
|
|
{
|
|
return 301;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// this property is used for work flow, which return leave entry id
|
|
/// </summary>
|
|
public int ObjectID
|
|
{
|
|
get { return this.ID; }
|
|
}
|
|
public string WFDesciption()
|
|
{
|
|
string sDescription;
|
|
|
|
sDescription = this.ObjectDescription;
|
|
return sDescription;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region ILoanApplicationService
|
|
|
|
public interface ILoanApplicationService
|
|
{
|
|
LoanApplication Get(int EmpId);
|
|
DataSet GetLoanApplicationData(int EmpId);
|
|
List<LoanApplication> GetAll();
|
|
//List<LoanApplication> Get(Employee oEmployee);
|
|
int Save(LoanApplication item);
|
|
void Delete(int id);
|
|
List<LoanApplication> GetAllByDate(DateTime FromDate, DateTime ToDate, int fundtypeid);
|
|
void UpdateLoanApproveByTrustees(LoanApplication oLoanApplication);
|
|
void UpdateLoanDepositByHr(LoanApplication oLoanApplication);
|
|
|
|
|
|
//double GetEmpBasicSalary(int ID);
|
|
|
|
LoanApplication GetLoanAppById(int LoanAppId);
|
|
|
|
DataTable GetLoanScheduleByLoanID(int LoanID);
|
|
|
|
DataTable GetLoanApps(int MemberID);
|
|
List<LoanApplication> GetLoanAppsByMemberID(int MemberID);
|
|
string SendMailOfTheRejectedPFWithdrawalByFirstTrusteeToHR(PFWithdrawalRequest oPfWithdrawalRequest, string HrNo, EmailSettings emailSettings);
|
|
string SendMailToTheRejectedPFWithdrawalRequestApplicant(PFWithdrawalRequest oPfWithdrawalRequest, EmailSettings emailSettings);
|
|
int UpdateLoanApproveByHr(LoanApplication item);
|
|
int UpdateLoanApproveBySecondTrustees(LoanApplication item);
|
|
string SendMailToTheApplicant(LoanApplication oLoanApplication, EmailSettings emailSettings);
|
|
string SendMailToTrustees(LoanApplication oLoanApplication, EmailSettings emailSettings);
|
|
string SendMailToTheApprovedLoanHR(LoanApplication oLoanApplication, EmailSettings emailSettings);
|
|
string SendMailToTheApprovedLoanApplicant(LoanApplication oLoanApplication, EmailSettings emailSettings);
|
|
string SendMailToTheRejectedLoanApplicant(LoanApplication oLoanApplication, EmailSettings emailSettings);
|
|
public string SendRejectionMailOfEmployeeToSecondTrustee(LoanApplication oLoanApplication, EmailSettings emailSettings);
|
|
public string SendRejectionMailOfEmployeeToTrustee(LoanApplication oLoanApplication, EmailSettings emailSettings);
|
|
string SendMailOfTheRejectedLoanApplicantBySecondTrusteeToHR(LoanApplication oLoanApplication, EmailSettings emailSettings);
|
|
string SendMailOfTheRejectedLoanApplicantByFirstTrusteeToHR(LoanApplication oLoanApplication, EmailSettings emailSettings);
|
|
|
|
void ApproveLoanapplication(WFMovementTran approver, CurrentUser currentUser);
|
|
void LoanApplicationReject(WFMovementTran rejectTran);
|
|
|
|
}
|
|
|
|
#endregion
|
|
}
|