1102 lines
45 KiB
C#
1102 lines
45 KiB
C#
using Ease.Core.DataAccess;
|
|
using Ease.Core.Model;
|
|
using Ease.Core.Utility;
|
|
using HRM.BO;
|
|
using HRM.BO.Configuration;
|
|
using Payroll.BO;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using static iTextSharp.text.pdf.AcroFields;
|
|
|
|
namespace HRM.DA
|
|
{
|
|
public class LoanApplicationService : ServiceTemplate,ILoanApplicationService
|
|
{
|
|
#region Map Object
|
|
private void MapObject(LoanApplication oLoanApplication, DataReader oReader)
|
|
{
|
|
SetObjectID(oLoanApplication, oReader.GetInt32("LoanAppID").Value);
|
|
oLoanApplication.LoanAppID = oReader.GetInt32("LoanAppID").Value;
|
|
oLoanApplication.LoanAppNO = oReader.GetInt32("LoanAppNO").Value;
|
|
oLoanApplication.ApplyDate = oReader.GetDateTime("ApplyDate").Value;
|
|
oLoanApplication.MemberID = oReader.GetInt32("MemberID").Value;
|
|
oLoanApplication.EmployeeID = oReader.GetInt32("EmployeeID").Value;
|
|
oLoanApplication.LoanAmount = oReader.GetDecimal("LoanAmount").Value;
|
|
oLoanApplication.NoOfInstallment = oReader.GetInt32("NoOfInstallment").Value;
|
|
oLoanApplication.InstallmentAmount = oReader.GetDecimal("InstallmentAmount").Value;
|
|
oLoanApplication.Principal = oReader.GetDecimal("Principal").Value;
|
|
oLoanApplication.Interest = oReader.GetDecimal("Interest").Value;
|
|
oLoanApplication.purposeID = (enumLoanPurpose)oReader.GetInt32("purposeID").Value;
|
|
oLoanApplication.Remarks = oReader.GetString("Remarks");
|
|
oLoanApplication.FundJoining = oReader.GetDateTime("FundJoining").Value;
|
|
oLoanApplication.BasicSalary = oReader.GetDecimal("BasicSalary").Value;
|
|
oLoanApplication.GrossSalary = oReader.GetDecimal("GrossSalary").Value;
|
|
oLoanApplication.PreviouslyTakenLoan = oReader.GetBoolean("PreviouslyTakenLoan").GetValueOrDefault();
|
|
oLoanApplication.CreatedDate = oReader.GetDateTime("CreatedDate").Value;
|
|
oLoanApplication.CreatedBy = oReader.GetInt32("CreatedBy").Value;
|
|
oLoanApplication.AccountUserID = oReader.GetInt32("AccountUserID");
|
|
oLoanApplication.AccountAppDate = oReader.GetDateTime("AccountAppDate");
|
|
oLoanApplication.AccountsRemarks = oReader.GetString("AccountsRemarks");
|
|
oLoanApplication.HRUserID = oReader.GetInt32("HRUserID");
|
|
oLoanApplication.HRApproveDate = oReader.GetDateTime("HRApproveDate");
|
|
oLoanApplication.HRApproveRemarks = oReader.GetString("HRApproveRemarks");
|
|
oLoanApplication.TrusteesID = oReader.GetInt32("TrusteesID");
|
|
oLoanApplication.TrusteesApproveDate = oReader.GetDateTime("TrusteesApproveDate");
|
|
oLoanApplication.TrusteesApproveRemarks = oReader.GetString("TrusteesApproveRemarks");
|
|
oLoanApplication.SecondTrusteesID = oReader.GetInt32("SecondTrusteesID");
|
|
oLoanApplication.SecondTrusteesApproveDate = oReader.GetDateTime("SecondTrusteesApproveDate");
|
|
oLoanApplication.SecondTrusteesApproveRemarks = oReader.GetString("SecondTrusteesApproveRemarks");
|
|
oLoanApplication.DepositDate = oReader.GetDateTime("DepositDate");
|
|
oLoanApplication.LoanCategoryID = oReader.GetInt32("LoanCategoryID") == null ? 0 : oReader.GetInt32("LoanCategoryID").Value;
|
|
oLoanApplication.WFStatus = (EnumLoanWFStatus)oReader.GetInt32("WFSTATUS",1);
|
|
|
|
// Set the object state
|
|
SetObjectState(oLoanApplication, Ease.Core.ObjectState.Saved);
|
|
}
|
|
|
|
protected override T CreateObject<T>(DataReader oReader)
|
|
{
|
|
LoanApplication oLoanApplication = new LoanApplication();
|
|
MapObject(oLoanApplication, oReader);
|
|
return oLoanApplication as T;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Get
|
|
|
|
public LoanApplication Get(int EmpId)
|
|
{
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
var oLoanApplication = new LoanApplication();
|
|
tc = TransactionContext.Begin();
|
|
DataReader oreader = new DataReader(LoanApplicationDA.Get(tc, EmpId));
|
|
if (oreader.Read())
|
|
{
|
|
oLoanApplication = this.CreateObject<LoanApplication>(oreader);
|
|
}
|
|
|
|
oreader.Close();
|
|
tc.End();
|
|
return oLoanApplication;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
|
|
public List<LoanApplication> GetAllByDate(DateTime FromDate, DateTime ToDate, int fundtypeid)
|
|
{
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin();
|
|
DataReader dr = new DataReader(LoanApplicationDA.GetAllByDate(tc, FromDate, ToDate, fundtypeid));
|
|
var oLoanApplications = this.CreateObjects<LoanApplication>(dr);
|
|
|
|
foreach (LoanApplication item in oLoanApplications)
|
|
{
|
|
item.LoanAttachments = new FMLoanAttachmentService().LoadLoanAttachments(tc, item);
|
|
item.Member = new MemberService().Get(item.MemberID);
|
|
//For Loan Status
|
|
if (item.isRejected != false)
|
|
{
|
|
|
|
if (item.HRApproveDate != null && item.TrusteesApproveDate != null && item.SecondTrusteesApproveDate != null)
|
|
{
|
|
item.LoanApprovalStatus = "Rejected (Trustee-2)";
|
|
}
|
|
else if (item.HRApproveDate != null && item.TrusteesApproveDate != null && item.SecondTrusteesApproveDate == null)
|
|
{
|
|
item.LoanApprovalStatus = "Rejected (Trustee-1) ";
|
|
}
|
|
else if (item.HRApproveDate != null && item.TrusteesApproveDate == null && item.SecondTrusteesApproveDate != null)
|
|
{
|
|
item.LoanApprovalStatus = "Rejected (Trustee-1)";
|
|
}
|
|
else if (item.HRApproveDate != null && item.TrusteesApproveDate == null && item.SecondTrusteesApproveDate == null)
|
|
{
|
|
item.LoanApprovalStatus = "Rejected (HR Admin) ";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (item.HRApproveDate == null && item.TrusteesApproveDate == null && item.SecondTrusteesApproveDate == null)
|
|
{
|
|
item.LoanApprovalStatus = "On Approval (HR)";
|
|
}
|
|
else if ((item.HRApproveDate != null && item.TrusteesApproveDate == null && item.SecondTrusteesApproveDate != null) ||
|
|
(item.HRApproveDate != null && item.TrusteesApproveDate == null && item.SecondTrusteesApproveDate == null))
|
|
{
|
|
item.LoanApprovalStatus = "On Approval (Trustee-1)";
|
|
}
|
|
else if ((item.HRApproveDate != null && item.TrusteesApproveDate != null && item.SecondTrusteesApproveDate == null) ||
|
|
(item.HRApproveDate != null && item.TrusteesApproveDate == null && item.SecondTrusteesApproveDate == null))
|
|
{
|
|
item.LoanApprovalStatus = "On Approval (Trustee-2)";
|
|
}
|
|
else if (item.HRApproveDate != null && item.TrusteesApproveDate != null && item.SecondTrusteesApproveDate != null && item.DepositDate == null)
|
|
{
|
|
item.LoanApprovalStatus = "All Approved (Bank transaction pending)";
|
|
}
|
|
else if (item.HRApproveDate != null && item.TrusteesApproveDate != null && item.SecondTrusteesApproveDate != null && item.DepositDate != null)
|
|
{
|
|
if (((DateTime)item.DepositDate).Day >= 11 && ((DateTime)item.DepositDate).Day <= 15)
|
|
{
|
|
item.LoanApprovalStatus = "Bank transaction between 11th-15th";
|
|
}
|
|
else if (((DateTime)item.DepositDate).Day >= 25 && ((DateTime)item.DepositDate).Day <= 30)
|
|
{
|
|
item.LoanApprovalStatus = "Bank transaction between 25th-30th";
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
dr.Close();
|
|
tc.End();
|
|
return oLoanApplications;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
|
|
public LoanApplication GetLoanAppById(int LoanAppId)
|
|
{
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
var oLoanApplication = new LoanApplication();
|
|
tc = TransactionContext.Begin();
|
|
DataReader oreader = new DataReader(LoanApplicationDA.GetLoanAppById(tc, LoanAppId));
|
|
if (oreader.Read())
|
|
{
|
|
oLoanApplication = this.CreateObject<LoanApplication>(oreader);
|
|
}
|
|
oLoanApplication.LoanAttachments = new FMLoanAttachmentService().LoadLoanAttachments(tc, oLoanApplication);
|
|
oreader.Close();
|
|
tc.End();
|
|
return oLoanApplication;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
public DataSet GetLoanApplicationData(int EmpID)
|
|
{
|
|
DataSet oGetLoanApplicationData = new DataSet();
|
|
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin();
|
|
oGetLoanApplicationData = LoanApplicationDA.GetLoanApplicationData(tc, EmpID);
|
|
tc.End();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
|
|
return oGetLoanApplicationData;
|
|
}
|
|
#endregion
|
|
|
|
#region Get All
|
|
|
|
public List<LoanApplication> GetAll()
|
|
{
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin();
|
|
DataReader dr = new DataReader(LoanApplicationDA.GetAll(tc));
|
|
var oLoanApplication = this.CreateObjects<LoanApplication>(dr);
|
|
dr.Close();
|
|
tc.End();
|
|
return oLoanApplication;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Save
|
|
|
|
public int Save(LoanApplication oLoanApplication)
|
|
{
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin(true);
|
|
bool isnew = oLoanApplication.IsNew;
|
|
if (oLoanApplication.IsNew)
|
|
{
|
|
int id = tc.GenerateID("FM_LoanApplication", "LoanAppID");
|
|
oLoanApplication.LoanAppID = id;
|
|
base.SetObjectID(oLoanApplication, id);
|
|
LoanApplicationDA.Insert(tc, oLoanApplication);
|
|
}
|
|
else
|
|
{
|
|
LoanApplicationDA.Update(tc, oLoanApplication);
|
|
|
|
#region Delete Childs
|
|
|
|
new FMLoanAttachmentService().DeleteByLoanAppID(tc, oLoanApplication.LoanAppID);
|
|
|
|
#endregion
|
|
}
|
|
|
|
#region Insert Childs
|
|
if (oLoanApplication.LoanAttachments != null && oLoanApplication.LoanAttachments.Count > 0)
|
|
{
|
|
foreach (FMLoanAttachment item in oLoanApplication.LoanAttachments)
|
|
{
|
|
if (item != null)
|
|
{
|
|
if (item.ID <= 0 && item.FileData != null)
|
|
{
|
|
item.LoanAppID = oLoanApplication.ID;
|
|
item.uploadDate = DateTime.Now;
|
|
item.uploadBy = oLoanApplication.MemberID;
|
|
new FMLoanAttachmentService().Save(tc, item);
|
|
}
|
|
//else
|
|
//{
|
|
// item.LoanAppID = oLoanApplication.LoanAppID;
|
|
// item.FileData = null;
|
|
// item.FileName = null;
|
|
// base.SetObjectID(item, attid);
|
|
// LoanApplicationDA.InsertLoanAttachment(tc, item);
|
|
// attid = attid + 1;
|
|
//}
|
|
}
|
|
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
if (isnew == true)
|
|
{
|
|
string subject = oLoanApplication.Member.EmpCode + "-" + oLoanApplication.Member.Name + ", has applied for"+ " "+oLoanApplication.LoanAmount + " PF Loan," + " Your Approval is required";
|
|
WFManager<IworkflowInterface> om = new WFManager<IworkflowInterface>(oLoanApplication);
|
|
om.InitiateProcess(tc, oLoanApplication.EmployeeID, oLoanApplication.SetupID, oLoanApplication.ID, "", subject);
|
|
}
|
|
//else if (oLoanApplication.WFStatus == EnumLoanWFStatus.)
|
|
//{
|
|
// new DailyAttnProcessService().UpdateLeave(tc, oLeaveEntry.EmpID, oLeaveEntry.LeaveID, oLeaveEntry.CreatedBy, oLeaveEntry.ApprovedFromDate, oLeaveEntry.ApprovedToDate);
|
|
|
|
//}
|
|
|
|
|
|
tc.End();
|
|
return oLoanApplication.ID;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
#endregion Save
|
|
|
|
|
|
|
|
#region Save
|
|
|
|
public void ApproveLoanapplication(WFMovementTran approver, CurrentUser currentUser)
|
|
{
|
|
TransactionContext tc = null;
|
|
LoanApplication oloan = new LoanApplicationService().GetLoanAppById(approver.ObjectID);
|
|
Member member = new MemberService().Get(approver.ObjectID);
|
|
Employee employee = new EmployeeService().Get(approver.FromEmployeeID);
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin(true);
|
|
string approveString = currentUser.LoginID + "-" + currentUser.UserName + ", has approved "+ member.EmpCode + "-"+ member.Name + " loan request, amount "+oloan.LoanAmount;
|
|
WFMovementTran newTran = new WFManager<IworkflowInterface>().Approve(tc, approver.ID, approver.FromEmployeeID, approver.Remarks, approveString);
|
|
|
|
if (newTran.Status == EnumwfStatus.End)
|
|
{
|
|
LoanApplicationDA.UpdateLoanStatus(tc, approver.ObjectID, EnumLoanWFStatus.appvored) ;
|
|
}
|
|
else
|
|
{
|
|
LoanApplicationDA.UpdateLoanStatus(tc, approver.ObjectID, EnumLoanWFStatus.On_TrusteeApproval);
|
|
}
|
|
tc.End();
|
|
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
#endregion Save
|
|
|
|
|
|
public void LoanApplicationReject(WFMovementTran rejectTran)
|
|
{
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
SearchEmployee s = new SearchEmployeeService().get(rejectTran.FromEmployeeID);
|
|
LeaveEntry le = new LeaveEntryService().Get(rejectTran.ObjectID);
|
|
|
|
LoanApplication oloan = new LoanApplicationService().GetLoanAppById(rejectTran.ObjectID);
|
|
tc = TransactionContext.Begin(true);
|
|
string rejectString = s.EmployeeNo + "-" + s.Name + ", has rejected your loan request " + oloan.ObjectDescription + " amount " + oloan.LoanAmount;
|
|
|
|
new WFManager<IworkflowInterface>().Reject(tc, rejectTran.ID, rejectTran.FromEmployeeID, rejectTran.Remarks, rejectString);
|
|
|
|
LoanApplicationDA.UpdateLoanStatus(tc, rejectTran.ObjectID, EnumLoanWFStatus.Reject);
|
|
tc.End();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
|
|
#region Delete
|
|
public void Delete(int id)
|
|
{
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin(true);
|
|
LoanApplicationDA.Delete(tc, id);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
finally
|
|
{
|
|
tc.End();
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
public string SendMailToTheApplicant(LoanApplication oLoanApplication, EmailSettings emailSettings)
|
|
{
|
|
var oApplicant = new MemberService().Get((int)oLoanApplication.MemberID);
|
|
DataTable applicantInfo = new DataTable();
|
|
applicantInfo = new MemberService().GetDashboardMember(oApplicant.EmpCode);
|
|
|
|
string mailAddress = applicantInfo.Rows[0]["EMAILADDRESS"].ToString();
|
|
string EmployeeCode = applicantInfo.Rows[0]["EmpCode"].ToString();
|
|
string Name = applicantInfo.Rows[0]["Name"].ToString();
|
|
string error = string.Empty;
|
|
string body =
|
|
"Dear <<TOEMPLOYEE>>," +
|
|
"<br/><br/>" +
|
|
"Your loan application has been successfully submitted. Now pending review and approval will notified.<br/>" +
|
|
"Please go to " + emailSettings.WebAddress + " for status update."
|
|
+ "<br/><br/>" +
|
|
"****Bank transactions will occur twice a month: once between the 11th and 15th, and again between the 25th and 30th. Deductions for loan installments will commence after a one - month calculation period."
|
|
+ "<br/><br/>";
|
|
|
|
try
|
|
{
|
|
body = body.Replace("<<TOEMPLOYEE>>", Name);
|
|
body = body.Replace("<<TOEMPLOYEEID>>", EmployeeCode);
|
|
|
|
MailSender mailSender = new MailSender();
|
|
mailSender.AddTo(mailAddress);
|
|
mailSender.Subject = "Loan Applied";
|
|
mailSender.Body = "<p>" + body + "</p>";
|
|
mailSender.ThreadSendMail(emailSettings);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
error = "Could Not Send Mail to " + Name + " [" + EmployeeCode + "]";
|
|
}
|
|
|
|
return error;
|
|
}
|
|
public string SendToSelectedTrustee(Member Approver, DataTable applicantInfo, EmailSettings emailSettings)
|
|
{
|
|
DataTable empInfo = new DataTable();
|
|
empInfo = new MemberService().GetDashboardMember(Approver.EmpCode);
|
|
|
|
string mailAddress = empInfo.Rows[0]["EMAILADDRESS"].ToString();
|
|
string EmployeeCode = empInfo.Rows[0]["EmpCode"].ToString();
|
|
string Name = empInfo.Rows[0]["Name"].ToString();
|
|
string error = string.Empty;
|
|
string body =
|
|
"Dear <<TOEMPLOYEE>>," +
|
|
"<br/><br/>" +
|
|
"A Loan Application was submitted by " + applicantInfo.Rows[0]["Name"].ToString() + " [" + applicantInfo.Rows[0]["EmpCode"].ToString()
|
|
+ "]<br/> and sent to you by Hr for approval.<br/>Please go to " + emailSettings.WebAddress + " for details.";
|
|
|
|
try
|
|
{
|
|
body = body.Replace("<<TOEMPLOYEE>>", Name);
|
|
body = body.Replace("<<TOEMPLOYEEID>>", EmployeeCode);
|
|
//body = body.Replace(" <<PFLoanType>>", oLoanApplication.);
|
|
//body = body.Replace("<<FROMDATE>>", Convert.ToDateTime(item["FROMDATE"].ToString()).ToString("dd MMM yyyy"));
|
|
|
|
MailSender mailSender = new MailSender();
|
|
mailSender.AddTo(mailAddress);
|
|
mailSender.Subject = "Loan Approval Request";
|
|
mailSender.Body = "<p>" + body + "</p>";
|
|
mailSender.ThreadSendMail(emailSettings);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
error = "Could Not Send Mail to " + Name + " [" + EmployeeCode + "]";
|
|
}
|
|
return error;
|
|
}
|
|
|
|
public string SendMailToTrustees(LoanApplication oLoanApplication, EmailSettings emailSettings)
|
|
{
|
|
var oApplicant = new MemberService().Get((int)oLoanApplication.MemberID);
|
|
DataTable applicantInfo = new DataTable();
|
|
applicantInfo = new MemberService().GetDashboardMember(oApplicant.EmpCode);
|
|
|
|
string error = string.Empty;
|
|
var Trustee = new MemberService().Get((int)oLoanApplication.TrusteesID);
|
|
error = this.SendToSelectedTrustee(Trustee, applicantInfo, emailSettings);
|
|
|
|
var SecondTrustee = new MemberService().Get((int)oLoanApplication.SecondTrusteesID);
|
|
error = this.SendToSelectedTrustee(SecondTrustee, applicantInfo, emailSettings);
|
|
|
|
return error;
|
|
}
|
|
public string SendMailToTheApprovedLoanHR(LoanApplication oLoanApplication, EmailSettings emailSettings)
|
|
{
|
|
var oApplicant = new MemberService().Get((int)oLoanApplication.MemberID);
|
|
DataTable applicantInfo = new DataTable();
|
|
applicantInfo = new MemberService().GetDashboardMember(oApplicant.EmpCode);
|
|
|
|
var oHr = new MemberService().Get((int)oLoanApplication.HRUserID);
|
|
DataTable hrInfo = new DataTable();
|
|
hrInfo = new MemberService().GetDashboardMember(oHr.EmpCode);
|
|
|
|
string mailAddress = hrInfo.Rows[0]["EMAILADDRESS"].ToString();
|
|
string EmployeeCode = hrInfo.Rows[0]["EmpCode"].ToString();
|
|
string Name = hrInfo.Rows[0]["Name"].ToString();
|
|
string error = string.Empty;
|
|
string body =
|
|
"Dear <<TOEMPLOYEE>>," +
|
|
"<br/><br/>" +
|
|
"A Loan Application has been submitted by " + applicantInfo.Rows[0]["Name"].ToString() + " [" + applicantInfo.Rows[0]["EmpCode"].ToString()
|
|
+ "]<br/>Please go to " + emailSettings.WebAddress + " for details.";
|
|
|
|
try
|
|
{
|
|
body = body.Replace("<<TOEMPLOYEE>>", Name);
|
|
body = body.Replace("<<TOEMPLOYEEID>>", EmployeeCode);
|
|
|
|
MailSender mailSender = new MailSender();
|
|
mailSender.AddTo(mailAddress);
|
|
mailSender.Subject = "Loan Applied";
|
|
mailSender.Body = "<p>" + body + "</p>";
|
|
mailSender.ThreadSendMail(emailSettings);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
error = "Could Not Send Mail to " + Name + " [" + EmployeeCode + "]";
|
|
}
|
|
|
|
return error;
|
|
}
|
|
public string SendMailToTheApprovedLoanApplicant(LoanApplication oLoanApplication, EmailSettings emailSettings)
|
|
{
|
|
var omember = new MemberService().Get(oLoanApplication.MemberID);
|
|
|
|
DataTable empInfo = new DataTable();
|
|
empInfo = new MemberService().GetDashboardMember(omember.EmpCode);
|
|
|
|
string mailAddress = empInfo.Rows[0]["EMAILADDRESS"].ToString();
|
|
string EmployeeCode = empInfo.Rows[0]["EmpCode"].ToString();
|
|
string Name = empInfo.Rows[0]["Name"].ToString();
|
|
string error = string.Empty;
|
|
string body =
|
|
"Dear <<TOEMPLOYEE>>," +
|
|
"<br/><br/>" +
|
|
"Your PF Loan Application is approved. Loan will be disbursed to your salary account according to the schedule " +
|
|
"(** Bank transactions will occur twice a month: once between the 11th and 15th, and again between the 25th and 30th. " +
|
|
"Deductions for loan installment will commence after a one-month calculation period.)**<br/>" +
|
|
"Please go to " + emailSettings.WebAddress + " for details.<br/><br/>";
|
|
|
|
try
|
|
{
|
|
body = body.Replace("<<TOEMPLOYEE>>", Name);
|
|
body = body.Replace("<<TOEMPLOYEEID>>", EmployeeCode);
|
|
//body = body.Replace(" <<PFLoanType>>", oLoanApplication.);
|
|
//body = body.Replace("<<FROMDATE>>", Convert.ToDateTime(item["FROMDATE"].ToString()).ToString("dd MMM yyyy"));
|
|
|
|
MailSender mailSender = new MailSender();
|
|
mailSender.AddTo(mailAddress);
|
|
mailSender.Subject = "Loan Approved";
|
|
mailSender.Body = "<p>" + body + "</p>";
|
|
mailSender.ThreadSendMail(emailSettings);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
error = "Could Not Send Mail to " + Name + " [" + EmployeeCode + "]";
|
|
}
|
|
|
|
return error;
|
|
}
|
|
public string SendMailToTheRejectedLoanApplicant(LoanApplication oLoanApplication, EmailSettings emailSettings)
|
|
{
|
|
var omember = new MemberService().Get(oLoanApplication.MemberID);
|
|
|
|
DataTable empInfo = new DataTable();
|
|
empInfo = new MemberService().GetDashboardMember(omember.EmpCode);
|
|
|
|
string mailAddress = empInfo.Rows[0]["EMAILADDRESS"].ToString();
|
|
string EmployeeCode = empInfo.Rows[0]["EmpCode"].ToString();
|
|
string Name = empInfo.Rows[0]["Name"].ToString();
|
|
string error = string.Empty;
|
|
string body =
|
|
"Dear <<TOEMPLOYEE>>," +
|
|
"<br/><br/>" +
|
|
"Your PF Loan Application is Rejected." +
|
|
"Please go to " + emailSettings.WebAddress + " for details.<br/><br/>";
|
|
|
|
try
|
|
{
|
|
body = body.Replace("<<TOEMPLOYEE>>", Name);
|
|
body = body.Replace("<<TOEMPLOYEEID>>", EmployeeCode);
|
|
//body = body.Replace(" <<PFLoanType>>", oLoanApplication.);
|
|
//body = body.Replace("<<FROMDATE>>", Convert.ToDateTime(item["FROMDATE"].ToString()).ToString("dd MMM yyyy"));
|
|
|
|
MailSender mailSender = new MailSender();
|
|
mailSender.AddTo(mailAddress);
|
|
mailSender.Subject = "Loan Rejected";
|
|
mailSender.Body = "<p>" + body + "</p>";
|
|
mailSender.ThreadSendMail(emailSettings);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
error = "Could Not Send Mail to " + Name + " [" + EmployeeCode + "]";
|
|
}
|
|
|
|
return error;
|
|
}
|
|
public string SendRejectionMailOfEmployeeToSecondTrustee(LoanApplication oLoanApplication, EmailSettings emailSettings)
|
|
{
|
|
var omember = new MemberService().Get(oLoanApplication.MemberID);
|
|
Member trustee = new MemberService().Get((int)oLoanApplication.TrusteesID);
|
|
Member secondTrustee = new MemberService().Get((int)oLoanApplication.SecondTrusteesID);
|
|
|
|
DataTable empInfo = new DataTable();
|
|
empInfo = new MemberService().GetDashboardMember(omember.EmpCode);
|
|
|
|
|
|
DataTable secondTrusteeMail = new DataTable();
|
|
secondTrusteeMail = new MemberService().GetDashboardMember(secondTrustee.EmpCode);
|
|
|
|
string mailAddress = secondTrusteeMail.Rows[0]["EMAILADDRESS"].ToString();
|
|
string EmployeeCode = empInfo.Rows[0]["EmpCode"].ToString();
|
|
string Name = empInfo.Rows[0]["Name"].ToString();
|
|
string error = string.Empty;
|
|
string body =
|
|
"Dear <<TOSECONDTRUSTEE>>," +
|
|
"<br/><br/>" +
|
|
"A Loan Application of <<TOEMPLOYEE>> [<<TOEMPLOYEEID>>] was rejected by <<TOTRUSTEE>>." +
|
|
"Please go to " + emailSettings.WebAddress + " for details.<br/><br/>";
|
|
|
|
try
|
|
{
|
|
body = body.Replace("<<TOTRUSTEE>>", trustee.Name);
|
|
body = body.Replace("<<TOSECONDTRUSTEE>>", secondTrustee.Name);
|
|
body = body.Replace("<<TOEMPLOYEE>>", Name);
|
|
body = body.Replace("<<TOEMPLOYEEID>>", EmployeeCode);
|
|
MailSender mailSender = new MailSender();
|
|
mailSender.AddTo(mailAddress);
|
|
mailSender.Subject = "Employee Loan Rejected";
|
|
mailSender.Body = "<p>" + body + "</p>";
|
|
mailSender.ThreadSendMail(emailSettings);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
error = "Could Not Send Mail to " + Name + " [" + EmployeeCode + "]";
|
|
}
|
|
|
|
return error;
|
|
}
|
|
public string SendRejectionMailOfEmployeeToTrustee(LoanApplication oLoanApplication, EmailSettings emailSettings)
|
|
{
|
|
var omember = new MemberService().Get(oLoanApplication.MemberID);
|
|
Member trustee = new MemberService().Get((int)oLoanApplication.TrusteesID);
|
|
Member secondTrustee = new MemberService().Get((int)oLoanApplication.SecondTrusteesID);
|
|
DataTable empInfo = new DataTable();
|
|
empInfo = new MemberService().GetDashboardMember(omember.EmpCode);
|
|
|
|
DataTable trusteeEmail = new DataTable();
|
|
trusteeEmail = new MemberService().GetDashboardMember(trustee.EmpCode);
|
|
|
|
string mailAddress = trusteeEmail.Rows[0]["EMAILADDRESS"].ToString();
|
|
string EmployeeCode = empInfo.Rows[0]["EmpCode"].ToString();
|
|
string Name = empInfo.Rows[0]["Name"].ToString();
|
|
string error = string.Empty;
|
|
string body =
|
|
"Dear <<TOTRUSTEE>>," +
|
|
"<br/><br/>" +
|
|
"A Loan Application of <<TOEMPLOYEE>> [<<TOEMPLOYEEID>>] was rejected by <<TOSECONDTRUSTEE>>." +
|
|
"Please go to " + emailSettings.WebAddress + " for details.<br/><br/>";
|
|
|
|
try
|
|
{
|
|
body = body.Replace("<<TOTRUSTEE>>", trustee.Name);
|
|
body = body.Replace("<<TOSECONDTRUSTEE>>", secondTrustee.Name);
|
|
body = body.Replace("<<TOEMPLOYEE>>", Name);
|
|
body = body.Replace("<<TOEMPLOYEEID>>", EmployeeCode);
|
|
MailSender mailSender = new MailSender();
|
|
mailSender.AddTo(mailAddress);
|
|
mailSender.Subject = "Employee Loan Rejected";
|
|
mailSender.Body = "<p>" + body + "</p>";
|
|
mailSender.ThreadSendMail(emailSettings);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
error = "Could Not Send Mail to " + Name + " [" + EmployeeCode + "]";
|
|
}
|
|
|
|
return error;
|
|
}
|
|
public int UpdateLoanApproveByHr(LoanApplication oLoanApplication)
|
|
{
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin(true);
|
|
LoanApplicationDA.UpdateLoanApproveByHr(tc, oLoanApplication);
|
|
return oLoanApplication.ID;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
finally
|
|
{
|
|
tc.End();
|
|
}
|
|
}
|
|
public string SendMailOfTheRejectedLoanApplicantByFirstTrusteeToHR(LoanApplication oLoanApplication, EmailSettings emailSettings)
|
|
{
|
|
var omember = new MemberService().Get(oLoanApplication.MemberID);
|
|
|
|
DataTable empInfo = new DataTable();
|
|
empInfo = new MemberService().GetDashboardMember(omember.EmpCode);
|
|
|
|
var oHr = new MemberService().Get((int)oLoanApplication.HRUserID);
|
|
DataTable hrInfo = new DataTable();
|
|
hrInfo = new MemberService().GetDashboardMember(oHr.EmpCode);
|
|
|
|
Member firstTrustee = new MemberService().Get((int)oLoanApplication.TrusteesID);
|
|
|
|
string mailAddress = hrInfo.Rows[0]["EMAILADDRESS"].ToString();
|
|
string EmployeeCode = empInfo.Rows[0]["EmpCode"].ToString();
|
|
string Name = empInfo.Rows[0]["Name"].ToString();
|
|
string hrName = hrInfo.Rows[0]["Name"].ToString();
|
|
string error = string.Empty;
|
|
string body =
|
|
"Dear <<HR>>," +
|
|
"<br/><br/>" +
|
|
"A Loan Application of <<TOEMPLOYEE>> [<<TOEMPLOYEEID>>] was rejected by <<Trustee>>." +
|
|
" Please go to " + emailSettings.WebAddress + " for details.<br/><br/>";
|
|
|
|
try
|
|
{
|
|
body = body.Replace("<<TOEMPLOYEE>>", Name);
|
|
body = body.Replace("<<TOEMPLOYEEID>>", EmployeeCode);
|
|
body = body.Replace("<<HR>>", hrName);
|
|
body = body.Replace("<<Trustee>>", firstTrustee.Name);
|
|
//body = body.Replace(" <<PFLoanType>>", oLoanApplication.);
|
|
//body = body.Replace("<<FROMDATE>>", Convert.ToDateTime(item["FROMDATE"].ToString()).ToString("dd MMM yyyy"));
|
|
|
|
MailSender mailSender = new MailSender();
|
|
mailSender.AddTo(mailAddress);
|
|
mailSender.Subject = "Loan Rejected";
|
|
mailSender.Body = "<p>" + body + "</p>";
|
|
mailSender.ThreadSendMail(emailSettings);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
error = "Could Not Send Mail to " + Name + " [" + EmployeeCode + "]";
|
|
}
|
|
|
|
return error;
|
|
}
|
|
public string SendMailOfTheRejectedLoanApplicantBySecondTrusteeToHR(LoanApplication oLoanApplication, EmailSettings emailSettings)
|
|
{
|
|
var omember = new MemberService().Get(oLoanApplication.MemberID);
|
|
|
|
DataTable empInfo = new DataTable();
|
|
empInfo = new MemberService().GetDashboardMember(omember.EmpCode);
|
|
|
|
var oHr = new MemberService().Get((int)oLoanApplication.HRUserID);
|
|
DataTable hrInfo = new DataTable();
|
|
hrInfo = new MemberService().GetDashboardMember(oHr.EmpCode);
|
|
|
|
Member secondTrustee = new MemberService().Get((int)oLoanApplication.SecondTrusteesID);
|
|
|
|
string mailAddress = hrInfo.Rows[0]["EMAILADDRESS"].ToString();
|
|
string EmployeeCode = empInfo.Rows[0]["EmpCode"].ToString();
|
|
string Name = empInfo.Rows[0]["Name"].ToString();
|
|
string hrName = hrInfo.Rows[0]["Name"].ToString();
|
|
string error = string.Empty;
|
|
string body =
|
|
"Dear <<HR>>," +
|
|
"<br/><br/>" +
|
|
"A Loan Application of <<TOEMPLOYEE>> [<<TOEMPLOYEEID>>] was rejected by <<Trustee>>." +
|
|
" Please go to " + emailSettings.WebAddress + " for details.<br/><br/>";
|
|
|
|
try
|
|
{
|
|
body = body.Replace("<<TOEMPLOYEE>>", Name);
|
|
body = body.Replace("<<TOEMPLOYEEID>>", EmployeeCode);
|
|
body = body.Replace("<<HR>>", hrName);
|
|
body = body.Replace("<<Trustee>>", secondTrustee.Name);
|
|
//body = body.Replace(" <<PFLoanType>>", oLoanApplication.);
|
|
//body = body.Replace("<<FROMDATE>>", Convert.ToDateTime(item["FROMDATE"].ToString()).ToString("dd MMM yyyy"));
|
|
|
|
MailSender mailSender = new MailSender();
|
|
mailSender.AddTo(mailAddress);
|
|
mailSender.Subject = "Loan Rejected";
|
|
mailSender.Body = "<p>" + body + "</p>";
|
|
mailSender.ThreadSendMail(emailSettings);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
error = "Could Not Send Mail to " + Name + " [" + EmployeeCode + "]";
|
|
}
|
|
|
|
return error;
|
|
}
|
|
|
|
public void UpdateLoanApproveByTrustees(LoanApplication oLoanApplication)
|
|
{
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin(true);
|
|
LoanApplicationDA.UpdateLoanApproveByTrustees(tc, oLoanApplication);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
finally
|
|
{
|
|
tc.End();
|
|
}
|
|
}
|
|
public void UpdateLoanDepositByHr(LoanApplication oLoanApplication)
|
|
{
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin(true);
|
|
LoanApplicationDA.UpdateLoanDepositByHr(tc, oLoanApplication);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
finally
|
|
{
|
|
tc.End();
|
|
}
|
|
}
|
|
|
|
public DataTable GetLoanScheduleByLoanID(int LoanID)
|
|
{
|
|
DataTable dt = null;
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin();
|
|
dt = LoanApplicationDA.GetLoanScheduleByLoanID(tc, LoanID);
|
|
tc.End();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
|
|
return dt;
|
|
}
|
|
public DataTable GetLoanApps(int MemberID)
|
|
{
|
|
DataSet dSet = null;
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin();
|
|
dSet = LoanApplicationDA.GetLoanApps(tc, MemberID);
|
|
tc.End();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
|
|
return dSet.Tables[0];
|
|
}
|
|
public List<LoanApplication> GetLoanAppsByMemberID(int MemberID)
|
|
{
|
|
List<LoanApplication> applications = new List<LoanApplication>();
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin();
|
|
|
|
DataReader dr = new DataReader(LoanApplicationDA.GetLoanAppsByMemberID(tc, MemberID));
|
|
applications = this.CreateObjects<LoanApplication>(dr);
|
|
dr.Close();
|
|
tc.End();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
|
|
return applications;
|
|
}
|
|
|
|
public string SendMailOfTheRejectedPFWithdrawalByFirstTrusteeToHR(PFWithdrawalRequest oPfWithdrawalRequest, string HrNo, EmailSettings emailSettings)
|
|
{
|
|
var omember = new MemberService().Get(oPfWithdrawalRequest.RequestMemberID);
|
|
|
|
DataTable empInfo = new DataTable();
|
|
empInfo = new MemberService().GetDashboardMember(omember.EmpCode);
|
|
|
|
|
|
DataTable hrInfo = new DataTable();
|
|
hrInfo = new MemberService().GetDashboardMember(HrNo);
|
|
|
|
|
|
Member firstTrustee = new MemberService().Get((int)oPfWithdrawalRequest.TrusteesID);
|
|
|
|
string mailAddress = hrInfo.Rows[0]["EMAILADDRESS"].ToString();
|
|
string EmployeeCode = empInfo.Rows[0]["EmpCode"].ToString();
|
|
string Name = empInfo.Rows[0]["Name"].ToString();
|
|
string hrName = hrInfo.Rows[0]["Name"].ToString();
|
|
string error = string.Empty;
|
|
string body =
|
|
"Dear <<HR>>," +
|
|
"<br/><br/>" +
|
|
"A PF Withdrawal Request of <<TOEMPLOYEE>> [<<TOEMPLOYEEID>>] was rejected by <<Trustee>>.<br/>" +
|
|
"Please go to " + emailSettings.WebAddress + " for details.<br/><br/>";
|
|
|
|
try
|
|
{
|
|
body = body.Replace("<<TOEMPLOYEE>>", Name);
|
|
body = body.Replace("<<TOEMPLOYEEID>>", EmployeeCode);
|
|
body = body.Replace("<<HR>>", hrName);
|
|
body = body.Replace("<<Trustee>>", firstTrustee.Name);
|
|
//body = body.Replace(" <<PFLoanType>>", oLoanApplication.);
|
|
//body = body.Replace("<<FROMDATE>>", Convert.ToDateTime(item["FROMDATE"].ToString()).ToString("dd MMM yyyy"));
|
|
|
|
MailSender mailSender = new MailSender();
|
|
mailSender.AddTo(mailAddress);
|
|
mailSender.Subject = "PF Withdrawal Request Rejected";
|
|
mailSender.Body = "<p>" + body + "</p>";
|
|
mailSender.ThreadSendMail(emailSettings);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
error = "Could Not Send Mail to " + Name + " [" + EmployeeCode + "]";
|
|
}
|
|
|
|
return error;
|
|
}
|
|
|
|
public string SendMailToTheRejectedPFWithdrawalRequestApplicant(PFWithdrawalRequest oPfWithdrawalRequest, EmailSettings emailSettings)
|
|
{
|
|
var omember = new MemberService().Get(oPfWithdrawalRequest.RequestMemberID);
|
|
|
|
DataTable empInfo = new DataTable();
|
|
empInfo = new MemberService().GetDashboardMember(omember.EmpCode);
|
|
|
|
string mailAddress = empInfo.Rows[0]["EMAILADDRESS"].ToString();
|
|
string EmployeeCode = empInfo.Rows[0]["EmpCode"].ToString();
|
|
string Name = empInfo.Rows[0]["Name"].ToString();
|
|
string error = string.Empty;
|
|
string body =
|
|
"Dear <<TOEMPLOYEE>>," +
|
|
"<br/><br/>" +
|
|
"Your PF Withdrawal Request Application is Rejected.<br/>" +
|
|
"Please go to " + emailSettings.WebAddress + " for details.<br/><br/>"
|
|
;
|
|
|
|
try
|
|
{
|
|
body = body.Replace("<<TOEMPLOYEE>>", Name);
|
|
body = body.Replace("<<TOEMPLOYEEID>>", EmployeeCode);
|
|
//body = body.Replace(" <<PFLoanType>>", oLoanApplication.);
|
|
//body = body.Replace("<<FROMDATE>>", Convert.ToDateTime(item["FROMDATE"].ToString()).ToString("dd MMM yyyy"));
|
|
|
|
MailSender mailSender = new MailSender();
|
|
mailSender.AddTo(mailAddress);
|
|
mailSender.Subject = "PF Withdrawal Request Rejected";
|
|
mailSender.Body = "<p>" + body + "</p>";
|
|
mailSender.ThreadSendMail(emailSettings);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
error = "Could Not Send Mail to " + Name + " [" + EmployeeCode + "]";
|
|
}
|
|
|
|
return error;
|
|
}
|
|
public int UpdateLoanApproveBySecondTrustees(LoanApplication oLoanApplication)
|
|
{
|
|
TransactionContext tc = null;
|
|
try
|
|
{
|
|
tc = TransactionContext.Begin(true);
|
|
LoanApplicationDA.UpdateLoanApproveBySecondTrustees(tc, oLoanApplication);
|
|
return oLoanApplication.ID;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
#region Handle Exception
|
|
|
|
if (tc != null)
|
|
tc.HandleError();
|
|
ExceptionLog.Write(e);
|
|
throw new ServiceException(e.Message, e);
|
|
|
|
#endregion
|
|
}
|
|
finally
|
|
{
|
|
tc.End();
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|