2192 lines
74 KiB
C#
2192 lines
74 KiB
C#
|
|
using Ease.Core.Model;
|
|
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
public class HRRequest : BasicBaseObject//, IworkflowInterface
|
|
{
|
|
#region Constructor
|
|
public HRRequest()
|
|
{
|
|
_nEmployeeID = (0);
|
|
_sDescription = string.Empty;
|
|
_nAmount = 0;
|
|
_nTaxable = 0;
|
|
_nNonTaxable = 0;
|
|
_nTaxAmount = 0;
|
|
_sRemarks = string.Empty;
|
|
_bSubmittedOriginalPaper = false;
|
|
_eWfStatus = EnumwfStatus.Received;
|
|
HRRequestDetails = null;
|
|
_nLetterTypeID = (0);
|
|
_sIssuerAddress = string.Empty;
|
|
_dFromDate = DateTime.MinValue;
|
|
_dToDate = DateTime.MinValue;
|
|
_nLoanID = (0);
|
|
_sLoanName = string.Empty;
|
|
_bIsOfficial = false;
|
|
_bIsWithFamily = false;
|
|
HRRequestMedicals = null;
|
|
_requestCompleted = false;
|
|
_Justification = "";
|
|
_sPurpose = string.Empty;
|
|
_sTypeOfProperty = string.Empty;
|
|
_sLand = string.Empty;
|
|
_ValueofProperty = 0.0;
|
|
_ExoectedDateofCompletion = DateTime.Today;
|
|
_NameofVendor = "";
|
|
_AddressofVendor = "";
|
|
_Teleohone = "";
|
|
_Dependency = string.Empty;
|
|
_DependencyAges = string.Empty;
|
|
_ExceptionReason = string.Empty;
|
|
_Vendor = string.Empty;
|
|
_CostEstimate = 0.0;
|
|
_InsuranceDate = DateTime.Today;
|
|
_ExpectedDateofRegistration = DateTime.Today;
|
|
_payRequestDate = null;
|
|
_IsPaymentRequested = false;
|
|
_BankID = 0;
|
|
_AccountNo = string.Empty;
|
|
_PaidDate = DateTime.Today;
|
|
_PaidRemarks = string.Empty;
|
|
_PaymentMode = EnumPaymentMode.BankTransfer;
|
|
_MailingAddress = string.Empty;
|
|
_LocationofProperty = string.Empty;
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region IsPaymentRequested : bool
|
|
private bool _IsPaymentRequested;
|
|
public bool IsPaymentRequested
|
|
{
|
|
get { return _IsPaymentRequested; }
|
|
set { _IsPaymentRequested = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region BankID : int
|
|
private int _BankID;
|
|
public int BankID
|
|
{
|
|
get { return _BankID; }
|
|
set { _BankID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region AccountNo : string
|
|
private string _AccountNo;
|
|
public string AccountNo
|
|
{
|
|
get { return _AccountNo; }
|
|
set { _AccountNo = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Remarks : string
|
|
private string _PaidRemarks;
|
|
public string PaidRemarks
|
|
{
|
|
get { return _PaidRemarks; }
|
|
set { _PaidRemarks = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region PaidDate : DateTime
|
|
private DateTime _PaidDate;
|
|
public DateTime PaidDate
|
|
{
|
|
get { return _PaidDate; }
|
|
set { _PaidDate = value; }
|
|
}
|
|
#endregion
|
|
#region PaidDate : DateTime
|
|
private EnumPaymentMode _PaymentMode;
|
|
public EnumPaymentMode PaymentMode
|
|
{
|
|
get { return _PaymentMode; }
|
|
set { _PaymentMode = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Properties
|
|
#region ExpectedDateofRegistration : Datetime
|
|
|
|
private DateTime _ExpectedDateofRegistration;
|
|
public DateTime ExpectedDateofRegistration
|
|
{
|
|
get { return _ExpectedDateofRegistration; }
|
|
set
|
|
{
|
|
|
|
_ExpectedDateofRegistration = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Dependency : string
|
|
|
|
private string _Dependency;
|
|
public string Dependency
|
|
{
|
|
get { return _Dependency; }
|
|
set
|
|
{
|
|
|
|
_Dependency = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region InsuranceVendor : string
|
|
|
|
private string _Vendor;
|
|
public string InsuranceVendor
|
|
{
|
|
get { return _Vendor; }
|
|
set
|
|
{
|
|
|
|
_Vendor = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DependencyAges : string
|
|
|
|
private string _DependencyAges;
|
|
public string DependencyAges
|
|
{
|
|
get { return _DependencyAges; }
|
|
set
|
|
{
|
|
|
|
_DependencyAges = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ExceptionReason : string
|
|
|
|
private string _ExceptionReason;
|
|
public string ExceptionReason
|
|
{
|
|
get { return _ExceptionReason; }
|
|
set
|
|
{
|
|
|
|
_ExceptionReason = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region InsuranceDate : Datetime
|
|
|
|
private DateTime _InsuranceDate;
|
|
public DateTime InsuranceDate
|
|
{
|
|
get { return _InsuranceDate; }
|
|
set
|
|
{
|
|
|
|
_InsuranceDate = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region CostEstimate : double
|
|
private double _CostEstimate;
|
|
public double CostEstimate
|
|
{
|
|
get { return _CostEstimate; }
|
|
set { _CostEstimate = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region ValueofProperty : double
|
|
private double _ValueofProperty;
|
|
public double ValueofProperty
|
|
{
|
|
get { return _ValueofProperty; }
|
|
set { _ValueofProperty = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region ExoectedDateofCompletion : Datetime
|
|
|
|
private DateTime _ExoectedDateofCompletion;
|
|
public DateTime ExoectedDateofCompletion
|
|
{
|
|
get { return _ExoectedDateofCompletion; }
|
|
set
|
|
{
|
|
|
|
_ExoectedDateofCompletion = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region NameofVendor : string
|
|
|
|
private string _NameofVendor;
|
|
public string NameofVendor
|
|
{
|
|
get { return _NameofVendor; }
|
|
set
|
|
{
|
|
|
|
_NameofVendor = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region AddressofVendor : string
|
|
|
|
private string _AddressofVendor;
|
|
public string AddressofVendor
|
|
{
|
|
get { return _AddressofVendor; }
|
|
set
|
|
{
|
|
|
|
_AddressofVendor = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Teleohone : string
|
|
|
|
private string _Teleohone;
|
|
public string Teleohone
|
|
{
|
|
get { return _Teleohone; }
|
|
set
|
|
{
|
|
|
|
_Teleohone = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region LocationofProperty : string
|
|
|
|
private string _LocationofProperty;
|
|
public string LocationofProperty
|
|
{
|
|
get { return _LocationofProperty; }
|
|
set
|
|
{
|
|
|
|
_LocationofProperty = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region MailingAddress : string
|
|
|
|
private string _MailingAddress;
|
|
public string MailingAddress
|
|
{
|
|
get { return _MailingAddress; }
|
|
set
|
|
{
|
|
|
|
_MailingAddress = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Justification : string
|
|
|
|
private string _Justification;
|
|
public string Justification
|
|
{
|
|
get { return _Justification; }
|
|
set
|
|
{
|
|
|
|
_Justification = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ClaimNumber : string
|
|
private string _sClaimNumber;
|
|
public string ClaimNumber
|
|
{
|
|
get { return _sClaimNumber; }
|
|
set { _sClaimNumber = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region EmployeeID : ID
|
|
private int _nEmployeeID;
|
|
public int EmployeeID
|
|
{
|
|
get { return _nEmployeeID; }
|
|
set { _nEmployeeID = value; }
|
|
}
|
|
#endregion
|
|
|
|
public Employee Employee { get; set; }
|
|
|
|
#region Description : string
|
|
private string _sDescription;
|
|
public string Description
|
|
{
|
|
get { return _sDescription; }
|
|
set { _sDescription = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Amount : double
|
|
private double _nAmount;
|
|
public double Amount
|
|
{
|
|
get { return _nAmount; }
|
|
set { _nAmount = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Taxable : double
|
|
private double _nTaxable;
|
|
public double Taxable
|
|
{
|
|
get { return _nTaxable; }
|
|
set { _nTaxable = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region NonTaxable : double
|
|
private double _nNonTaxable;
|
|
public double NonTaxable
|
|
{
|
|
get { return _nNonTaxable; }
|
|
set { _nNonTaxable = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region TaxAmount : double
|
|
|
|
private double _nTaxAmount;
|
|
public double TaxAmount
|
|
{
|
|
get { return _nTaxAmount; }
|
|
set { _nTaxAmount = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Purpose : string
|
|
private string _sPurpose;
|
|
public string Purpose
|
|
{
|
|
get { return _sPurpose; }
|
|
set { _sPurpose = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region TypeOfProperty : string
|
|
private string _sTypeOfProperty;
|
|
public string TypeOfProperty
|
|
{
|
|
get { return _sTypeOfProperty; }
|
|
set { _sTypeOfProperty = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Land : string
|
|
private string _sLand;
|
|
public string Land
|
|
{
|
|
get { return _sLand; }
|
|
set { _sLand = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region RequestType: EnumRequestType
|
|
private EnumRequestType _eRequestType;
|
|
public EnumRequestType RequestType
|
|
{
|
|
get { return _eRequestType; }
|
|
set { _eRequestType = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Remarks : string
|
|
private string _sRemarks;
|
|
public string Remarks
|
|
{
|
|
get { return _sRemarks; }
|
|
set { _sRemarks = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region RequestDate : DateTime
|
|
private DateTime _dRequestDate;
|
|
public DateTime RequestDate
|
|
{
|
|
get { return _dRequestDate; }
|
|
set { _dRequestDate = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region SubmittedOriginalPaper : bool
|
|
|
|
private bool _bSubmittedOriginalPaper;
|
|
public bool SubmittedOriginalPaper
|
|
{
|
|
get { return _bSubmittedOriginalPaper; }
|
|
set { _bSubmittedOriginalPaper = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region WfStatus : enumwfStatus
|
|
|
|
private EnumwfStatus _eWfStatus;
|
|
public EnumwfStatus WfStatus
|
|
{
|
|
get { return _eWfStatus; }
|
|
set { _eWfStatus = value; }
|
|
}
|
|
#endregion
|
|
|
|
public List<HRRequestDetail> HRRequestDetails { get; set; }
|
|
public List<HRRequestMedical> HRRequestMedicals { get; set; }
|
|
public List<HRRequestLoan> HRRequestLoans { get; set; }
|
|
public List<HRRequestLoanDetail> HRRequestLoanDetails { get; set; }
|
|
public List<HRRequestPaymentSchedule> HRRequestPaymentSchedules { get; set; }
|
|
|
|
//#region HRRequestDetails : List<HRRequestDetail>
|
|
|
|
//private List<HRRequestDetail> _oHRRequestDetails;
|
|
//public List<HRRequestDetail> HRRequestDetails
|
|
//{
|
|
// get
|
|
// {
|
|
// if (this.int != null && _oHRRequestDetails == null)
|
|
// {
|
|
// _oHRRequestDetails = HRRequest.Service.GetHRequestDetails(this.ID);
|
|
// }
|
|
// return _oHRRequestDetails;
|
|
// }
|
|
// set { _oHRRequestDetails = value; }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
//#region HRRequestMedicals : List<HRRequestMedical>
|
|
|
|
//private List<HRRequestMedical> _oHRRequestMedicals;
|
|
//public List<HRRequestMedical> HRRequestMedicals
|
|
//{
|
|
// get
|
|
// {
|
|
// if (this.int != null && _oHRRequestMedicals == null)
|
|
// {
|
|
// _oHRRequestMedicals = HRRequest.Service.GetHRRequestPassports(this.ID);
|
|
// }
|
|
// return _oHRRequestMedicals;
|
|
// }
|
|
// set { _oHRRequestMedicals = value; }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
//#region HRRequestLoan : List<HRRequestLoan>
|
|
|
|
//private List<HRRequestLoan> _oHRRequestLoans;
|
|
//public List<HRRequestLoan> HRRequestLoans
|
|
//{
|
|
// get
|
|
// {
|
|
// if (this.int != null && _oHRRequestLoans == null)
|
|
// {
|
|
// _oHRRequestLoans = HRRequest.Service.GetHRRequestLoans(this.ID);
|
|
// }
|
|
// return _oHRRequestLoans;
|
|
// }
|
|
// set { _oHRRequestLoans = value; }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
//#region HRRequestLoanDetail : List<HRRequestLoan>
|
|
|
|
//private List<HRRequestLoanDetail> _oHRRequestLoanDetails;
|
|
//public List<HRRequestLoanDetail> HRRequestLoanDetails
|
|
//{
|
|
// get
|
|
// {
|
|
// if (this.int != null && _oHRRequestLoanDetails == null)
|
|
// {
|
|
// _oHRRequestLoanDetails = HRRequest.Service.GetHRRequestLoanDetails(this.ID);
|
|
// }
|
|
// return _oHRRequestLoanDetails;
|
|
// }
|
|
// set { _oHRRequestLoanDetails = value; }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
//#region HRRequestLoanDetail : List<HRRequestLoan>
|
|
|
|
//private List<HRRequestPaymentSchedule> _oHRRequestPaymentSchedules;
|
|
//public List<HRRequestPaymentSchedule> HRRequestPaymentSchedules
|
|
//{
|
|
// get
|
|
// {
|
|
// if (this.int != null && _oHRRequestPaymentSchedules == null)
|
|
// {
|
|
// _oHRRequestPaymentSchedules = HRRequest.Service.GetHRRequestPaymentSchedules(this.ID);
|
|
// }
|
|
// return _oHRRequestPaymentSchedules;
|
|
// }
|
|
// set { _oHRRequestPaymentSchedules = value; }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
#region LetterTypeID : ID
|
|
private int _nLetterTypeID;
|
|
public int LetterTypeID
|
|
{
|
|
get { return _nLetterTypeID; }
|
|
set { _nLetterTypeID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region IssuerAddress : string
|
|
private string _sIssuerAddress;
|
|
public string IssuerAddress
|
|
{
|
|
get { return _sIssuerAddress; }
|
|
set { _sIssuerAddress = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region LoanID : ID
|
|
private int _nLoanID;
|
|
public int LoanID
|
|
{
|
|
get { return _nLoanID; }
|
|
set { _nLoanID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region LoanName : string
|
|
private string _sLoanName;
|
|
public string LoanName
|
|
{
|
|
get { return _sLoanName; }
|
|
set { _sLoanName = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region FromDate : DateTime
|
|
private DateTime _dFromDate;
|
|
public DateTime FromDate
|
|
{
|
|
get { return _dFromDate; }
|
|
set { _dFromDate = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region ToDate : DateTime
|
|
private DateTime _dToDate;
|
|
public DateTime ToDate
|
|
{
|
|
get { return _dToDate; }
|
|
set { _dToDate = value; }
|
|
}
|
|
#endregion
|
|
#region PayRequestDate : DateTime
|
|
private DateTime? _payRequestDate;
|
|
public DateTime? PayRequestDate
|
|
{
|
|
get { return _payRequestDate; }
|
|
set { _payRequestDate = value; }
|
|
}
|
|
#endregion
|
|
//IsOfficial type changed from bool to int because of Oracle Server's syntax
|
|
#region IsOfficial : int
|
|
|
|
private bool _bIsOfficial;
|
|
public bool IsOfficial
|
|
{
|
|
get { return _bIsOfficial; }
|
|
set { _bIsOfficial = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region IsWithFamily : bool
|
|
|
|
private bool _bIsWithFamily;
|
|
public bool IsWithFamily
|
|
{
|
|
get { return _bIsWithFamily; }
|
|
set { _bIsWithFamily = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region RequestCompleted : bool
|
|
|
|
private bool _requestCompleted;
|
|
public bool RequestComplted
|
|
{
|
|
get { return _requestCompleted; }
|
|
set { _requestCompleted = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region OnbehalfEmpID : ID
|
|
private int _onbehalfEmpID;
|
|
public int OnbehalfEmpID
|
|
{
|
|
get { return _onbehalfEmpID; }
|
|
set { _onbehalfEmpID = value; }
|
|
}
|
|
#endregion
|
|
#region Service Factory
|
|
internal static IHRRequestService Service
|
|
{
|
|
get { return Services.Factory.CreateService<IHRRequestService>(typeof(IHRRequestService)); }
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
//#region Functions
|
|
|
|
//public static HRRequest Get(int id)
|
|
//{
|
|
// HRRequest oreq = new HRRequest();
|
|
// oreq = HRRequest.Service.Get(id);
|
|
// return oreq;
|
|
//}
|
|
|
|
//private static DataTable CreateLFAMedInsranceTable(List<HRRequest> oReqests)
|
|
//{
|
|
// List<Bank> oBanks = Bank.Get(EnumStatus.Active).ToList();
|
|
// DataTable dt = new DataTable();
|
|
// dt.Columns.Add("HRRequestID");
|
|
// dt.Columns.Add("ClaimNo");
|
|
// dt.Columns.Add("Description");
|
|
// dt.Columns.Add("Amount");
|
|
// dt.Columns.Add("ReqType");
|
|
// dt.Columns.Add("WfStatus");
|
|
// dt.Columns.Add("ReqDate");
|
|
// dt.Columns.Add("PaymentStatus");
|
|
|
|
// foreach (HRRequest item in oReqests)
|
|
// {
|
|
// DataRow dr = dt.NewRow();
|
|
// dr["HRRequestID"] = item.ID.Integer;
|
|
// dr["ClaimNo"] = item.ClaimNumber;
|
|
// dr["Description"] = item.Description;
|
|
// dr["Amount"] = item.Amount;
|
|
// dr["ReqType"] = item.RequestType.ToString();
|
|
// dr["ReqDate"] = item.RequestDate.ToString("dd MMM yyyy");
|
|
// if (item.AccountNo != null && item.AccountNo.Trim() != string.Empty)
|
|
// {
|
|
// string chkOrAccNo = item.PaymentMode == EnumPaymentMode.CashPayment ? "Account No:" : "Check No:";
|
|
// string chkDateOrPaymentDate = item.PaymentMode == EnumPaymentMode.CashPayment ? "Payment Date:" : "Check Date:";
|
|
// Bank oBank = oBanks.Where(o => o.int == item.BankID).SingleOrDefault();
|
|
// dr["PaymentStatus"] = String.Format(@"Payment Completed:Payment Mode:{0},
|
|
// {1}{2}:{3},{4}:{5},Remarks:{6}", item.PaymentMode.ToString(), (oBank != null ? ("Bank:" + oBank.Name + ",") : ""), chkOrAccNo, item.AccountNo, chkDateOrPaymentDate, item.PaidDate.ToString("dd MMM yyyy"), item.PaidRemarks);
|
|
// }
|
|
// else
|
|
// {
|
|
// dr["PaymentStatus"] = "Payment Not Done";
|
|
// }
|
|
// switch (item.WfStatus)
|
|
// {
|
|
// case enumwfStatus.Not_yet_Initiated:
|
|
// case enumwfStatus.Received:
|
|
// case enumwfStatus.Passed:
|
|
// dr["WfStatus"] = "In Process";
|
|
// break;
|
|
// case enumwfStatus.Approve:
|
|
// case enumwfStatus.End:
|
|
// dr["WfStatus"] = "Approved";
|
|
// break;
|
|
// case enumwfStatus.Revert:
|
|
// dr["WfStatus"] = "Reverted";
|
|
// break;
|
|
// default:
|
|
// dr["WfStatus"] = item.WfStatus.ToString().Replace('_', ' ');
|
|
// break;
|
|
// }
|
|
// if (item.RequestComplted)
|
|
// dr["WfStatus"] = "Terminated";
|
|
// dt.Rows.Add(dr);
|
|
// }
|
|
// return dt;
|
|
//}
|
|
|
|
//private static DataTable CreateMedicalClaimTable(List<HRRequest> oReqests)
|
|
//{
|
|
// List<Bank> oBanks = Bank.Get(EnumStatus.Active).ToList();
|
|
// DataTable dt = new DataTable();
|
|
// dt.Columns.Add("HRRequestID");
|
|
// dt.Columns.Add("ClaimNo");
|
|
// dt.Columns.Add("Description");
|
|
// dt.Columns.Add("Amount");
|
|
// dt.Columns.Add("ReqType");
|
|
// dt.Columns.Add("WfStatus");
|
|
// dt.Columns.Add("ReqDate");
|
|
// dt.Columns.Add("PaymentStatus");
|
|
|
|
// foreach (HRRequest item in oReqests)
|
|
// {
|
|
// DataRow dr = dt.NewRow();
|
|
// dr["HRRequestID"] = item.ID.Integer;
|
|
// dr["ClaimNo"] = item.ClaimNumber;
|
|
// dr["Description"] = item.Description;
|
|
// dr["Amount"] = item.RequestComplted ? item.Amount : 0.0;
|
|
// dr["ReqType"] = item.RequestType.ToString();
|
|
// dr["ReqDate"] = item.RequestDate.ToString("dd MMM yyyy");
|
|
// if (item.AccountNo != null && item.AccountNo.Trim() != string.Empty)
|
|
// {
|
|
// string chkOrAccNo = item.PaymentMode == EnumPaymentMode.CashPayment ? "Account No:" : "Check No:";
|
|
// string chkDateOrPaymentDate = item.PaymentMode == EnumPaymentMode.CashPayment ? "Payment Date:" : "Check Date:";
|
|
// Bank oBank = oBanks.Where(o => o.int == item.BankID).SingleOrDefault();
|
|
// dr["PaymentStatus"] = String.Format(@"Payment Completed:Payment Mode:{0},
|
|
// {1}{2}:{3},{4}:{5},Remarks:{6}", item.PaymentMode.ToString(), (oBank != null ? ("Bank:" + oBank.Name + ",") : ""), chkOrAccNo, item.AccountNo, chkDateOrPaymentDate, item.PaidDate.ToString("dd MMM yyyy"), item.PaidRemarks);
|
|
// }
|
|
// else
|
|
// {
|
|
// dr["PaymentStatus"] = "Payment Not Done";
|
|
// }
|
|
// switch (item.WfStatus)
|
|
// {
|
|
// case enumwfStatus.Not_yet_Initiated:
|
|
// case enumwfStatus.Received:
|
|
// case enumwfStatus.Passed:
|
|
// dr["WfStatus"] = "In Process";
|
|
// break;
|
|
// case enumwfStatus.Approve:
|
|
// case enumwfStatus.End:
|
|
// dr["WfStatus"] = "Approved";
|
|
// break;
|
|
// case enumwfStatus.Revert:
|
|
// dr["WfStatus"] = "Reverted";
|
|
// break;
|
|
// default:
|
|
// dr["WfStatus"] = item.WfStatus.ToString().Replace('_', ' ');
|
|
// break;
|
|
// }
|
|
// if (item.RequestComplted)
|
|
// dr["WfStatus"] = "Terminated";
|
|
// dt.Rows.Add(dr);
|
|
// }
|
|
// return dt;
|
|
//}
|
|
|
|
//private static DataTable CreateActiveLFAMedInsranceTable(List<HRRequest> oReqests)
|
|
//{
|
|
// List<Bank> oBanks = Bank.Get(EnumStatus.Active).ToList();
|
|
// DataTable dt = new DataTable();
|
|
// dt.Columns.Add("HRRequestID");
|
|
// dt.Columns.Add("ClaimNo");
|
|
// dt.Columns.Add("Description");
|
|
// dt.Columns.Add("Amount");
|
|
// dt.Columns.Add("ReqType");
|
|
// dt.Columns.Add("WfStatus");
|
|
// dt.Columns.Add("ReqDate");
|
|
// dt.Columns.Add("RequestComplted");
|
|
// dt.Columns.Add("PaymentStatus");
|
|
|
|
// foreach (HRRequest item in oReqests)
|
|
// {
|
|
// if (item.RequestComplted == true) continue;
|
|
// DataRow dr = dt.NewRow();
|
|
// dr["HRRequestID"] = item.ID.Integer;
|
|
// dr["ClaimNo"] = item.ClaimNumber;
|
|
// dr["Description"] = item.Description;
|
|
// dr["Amount"] = item.Amount;
|
|
// dr["ReqType"] = item.RequestType.ToString();
|
|
// dr["ReqDate"] = item.RequestDate.ToString("dd MMM yyyy");
|
|
// if (item.AccountNo != null && item.AccountNo.Trim() != string.Empty)
|
|
// {
|
|
// string chkOrAccNo = item.PaymentMode == EnumPaymentMode.CashPayment ? "Account No" : "Check No";
|
|
// string chkDateOrPaymentDate = item.PaymentMode == EnumPaymentMode.CashPayment ? "Payment Date" : "Check Date";
|
|
// Bank oBank = oBanks.Where(o => o.int == item.BankID).SingleOrDefault();
|
|
// dr["PaymentStatus"] = String.Format(@"Payment Completed:Payment Mode:{0},
|
|
// {1}{2}:{3},{4}:{5},Remarks:{6}", item.PaymentMode.ToString(), (oBank != null ? ("Bank:" + oBank.Name + ",") : ""), chkOrAccNo, item.AccountNo, chkDateOrPaymentDate, item.PaidDate.ToString("dd MMM yyyy"), item.PaidRemarks);
|
|
// }
|
|
// else
|
|
// {
|
|
// dr["PaymentStatus"] = "Payment Not Done";
|
|
// }
|
|
// switch (item.WfStatus)
|
|
// {
|
|
// case enumwfStatus.Not_yet_Initiated:
|
|
// case enumwfStatus.Received:
|
|
// case enumwfStatus.Passed:
|
|
// dr["WfStatus"] = "Sent to Approver";
|
|
// break;
|
|
// case enumwfStatus.Approve:
|
|
// case enumwfStatus.End:
|
|
// dr["WfStatus"] = "Sent to HR";
|
|
// break;
|
|
// case enumwfStatus.Revert:
|
|
// dr["WfStatus"] = "Reverted";
|
|
// break;
|
|
// case enumwfStatus.Decline:
|
|
// dr["WfStatus"] = "Decline";
|
|
// break;
|
|
|
|
// default:
|
|
// dr["WfStatus"] = item.WfStatus.ToString().Replace('_', ' ');
|
|
// break;
|
|
// }
|
|
|
|
// if (item.WfStatus == enumwfStatus.End && item.IsPaymentRequested == true)
|
|
// {
|
|
// if (item.AccountNo != null && item.AccountNo.Trim() != string.Empty)
|
|
// {
|
|
// string chkOrAccNo = item.PaymentMode == EnumPaymentMode.CashPayment ? "Account No" : "Check No";
|
|
// string chkDateOrPaymentDate = item.PaymentMode == EnumPaymentMode.CashPayment ? "Payment Date" : "Check Date";
|
|
// Bank oBank = oBanks.Where(o => o.int == item.BankID).SingleOrDefault();
|
|
// dr["WfStatus"] = String.Format(@"Payment Completed:Payment Mode:{0},
|
|
// {1}{2}:{3},{4}:{5},Remarks:{6}", item.PaymentMode.ToString(), (oBank != null ? ("Bank:" + oBank.Name + ",") : ""), chkOrAccNo, item.AccountNo, chkDateOrPaymentDate, item.PaidDate.ToString("dd MMM yyyy"), item.PaidRemarks);
|
|
// }
|
|
// else
|
|
// {
|
|
// dr["WfStatus"] = "HR sends payment Request";
|
|
// }
|
|
// }
|
|
|
|
// dt.Rows.Add(dr);
|
|
// }
|
|
// return dt;
|
|
//}
|
|
|
|
//private static DataTable CreateLetterClaimTable(List<HRRequest> oReqests)
|
|
//{
|
|
// DataTable dt = new DataTable();
|
|
// dt.Columns.Add("HRRequestID");
|
|
// dt.Columns.Add("ClaimNo");
|
|
// dt.Columns.Add("IssuerAddress");
|
|
// dt.Columns.Add("RequestDate");
|
|
// dt.Columns.Add("LetterType");
|
|
// dt.Columns.Add("IsOfficial");
|
|
// dt.Columns.Add("IsWithFamily");
|
|
// dt.Columns.Add("FromDate");
|
|
// dt.Columns.Add("ToDate");
|
|
// dt.Columns.Add("WfStatus");
|
|
|
|
|
|
// foreach (HRRequest item in oReqests)
|
|
// {
|
|
// DataRow dr = dt.NewRow();
|
|
// dr["HRRequestID"] = item.ID.Integer;
|
|
// dr["ClaimNo"] = item.ClaimNumber;
|
|
// dr["IssuerAddress"] = item.IssuerAddress == null ? " -" : item.IssuerAddress;
|
|
// dr["RequestDate"] = item.RequestDate.ToString("dd MMM yyyy");
|
|
// dr["LetterType"] = ((EnumLetterType)item.LetterTypeID.Integer).ToString().Replace("_", " ");
|
|
// dr["FromDate"] = item.FromDate == DateTime.MinValue ? " -" : item.FromDate.ToString("dd MMM yyyy");
|
|
// dr["ToDate"] = item.ToDate == DateTime.MinValue ? " -" : item.ToDate.ToString("dd MMM yyyy");
|
|
// dr["IsOfficial"] = item.IsOfficial;
|
|
// dr["IsWithFamily"] = item.IsWithFamily;
|
|
|
|
// switch (item.WfStatus)
|
|
// {
|
|
// case enumwfStatus.Not_yet_Initiated:
|
|
// case enumwfStatus.Received:
|
|
// case enumwfStatus.Passed:
|
|
// case enumwfStatus.Revert:
|
|
// case enumwfStatus.Decline:
|
|
// dr["WfStatus"] = "In Process";
|
|
// break;
|
|
// case enumwfStatus.Approve:
|
|
// case enumwfStatus.End:
|
|
// dr["WfStatus"] = "Approved";
|
|
// break;
|
|
|
|
// default:
|
|
// dr["WfStatus"] = item.WfStatus.ToString();
|
|
// break;
|
|
// }
|
|
// if (item.RequestComplted)
|
|
// dr["WfStatus"] = "Terminated";
|
|
// dt.Rows.Add(dr);
|
|
// }
|
|
// return dt;
|
|
//}
|
|
|
|
//private static DataTable CreateActiveLetterClaimTable(List<HRRequest> oReqests)
|
|
//{
|
|
// DataTable dt = new DataTable();
|
|
// dt.Columns.Add("HRRequestID");
|
|
// dt.Columns.Add("ClaimNo");
|
|
// dt.Columns.Add("IssuerAddress");
|
|
// dt.Columns.Add("RequestDate");
|
|
// dt.Columns.Add("LetterType");
|
|
// dt.Columns.Add("IsOfficial");
|
|
// dt.Columns.Add("IsWithFamily");
|
|
// dt.Columns.Add("FromDate");
|
|
// dt.Columns.Add("ToDate");
|
|
// dt.Columns.Add("WfStatus");
|
|
|
|
|
|
// foreach (HRRequest item in oReqests)
|
|
// {
|
|
// if (item.RequestComplted == true) continue;
|
|
// DataRow dr = dt.NewRow();
|
|
// dr["HRRequestID"] = item.ID.Integer;
|
|
// dr["ClaimNo"] = item.ClaimNumber;
|
|
// dr["IssuerAddress"] = item.IssuerAddress == null ? " -" : item.IssuerAddress;
|
|
// dr["RequestDate"] = item.RequestDate.ToString("dd MMM yyyy");
|
|
// dr["LetterType"] = ((EnumLetterType)item.LetterTypeID.Integer).ToString().Replace("_", " ");
|
|
// dr["FromDate"] = item.FromDate == DateTime.MinValue ? " -" : item.FromDate.ToString("dd MMM yyyy");
|
|
// dr["ToDate"] = item.ToDate == DateTime.MinValue ? " -" : item.ToDate.ToString("dd MMM yyyy");
|
|
// dr["IsOfficial"] = item.IsOfficial;
|
|
// dr["IsWithFamily"] = item.IsWithFamily;
|
|
|
|
// switch (item.WfStatus)
|
|
// {
|
|
// case enumwfStatus.Not_yet_Initiated:
|
|
// case enumwfStatus.Received:
|
|
// case enumwfStatus.Passed:
|
|
// case enumwfStatus.Revert:
|
|
// case enumwfStatus.Decline:
|
|
// dr["WfStatus"] = "In Process";
|
|
// break;
|
|
// case enumwfStatus.Approve:
|
|
// case enumwfStatus.End:
|
|
// dr["WfStatus"] = "Approved";
|
|
// break;
|
|
|
|
// default:
|
|
// dr["WfStatus"] = item.WfStatus.ToString();
|
|
// break;
|
|
// }
|
|
// dt.Rows.Add(dr);
|
|
// }
|
|
// return dt;
|
|
//}
|
|
|
|
//private static DataTable CreateActiveLoanTable(List<HRRequest> oReqests)
|
|
//{
|
|
// DataTable dt = new DataTable();
|
|
// dt.Columns.Add("HRRequestID");
|
|
// dt.Columns.Add("Description");
|
|
// dt.Columns.Add("LoanName");
|
|
// dt.Columns.Add("Amount");
|
|
// dt.Columns.Add("WfStatus");
|
|
// dt.Columns.Add("RequestDate");
|
|
// dt.Columns.Add("LoanID");
|
|
|
|
|
|
// foreach (HRRequest item in oReqests)
|
|
// {
|
|
// Loan oloan = Loan.Get(item.LoanID);
|
|
// if (item.RequestComplted) continue;
|
|
// DataRow dr = dt.NewRow();
|
|
// dr["HRRequestID"] = item.ID.Integer;
|
|
// dr["LoanName"] = oloan.Name;
|
|
// dr["Description"] = item.Description;
|
|
// dr["Amount"] = item.Amount;
|
|
// dr["RequestDate"] = item.RequestDate.ToString("dd MMM yyyy");
|
|
// if (item.WfStatus != enumwfStatus.End)
|
|
// {
|
|
// WFMovementNext otran = WFMovementTran.GetReceivedWFNext(item.SetupID.Integer, item.ID.Integer);
|
|
// if (otran != null)
|
|
// {
|
|
// Employee emp = Employee.Get(otran.EmployeeID);
|
|
// string sAttText = emp.DescriptionText == null ? emp.Name : emp.Name + ", " + emp.DescriptionText;
|
|
|
|
// switch (item.WfStatus)
|
|
// {
|
|
// case enumwfStatus.Not_yet_Initiated:
|
|
// case enumwfStatus.Received:
|
|
// dr["WfStatus"] = "Pending at " + sAttText;//"Sent to Approver";
|
|
// break;
|
|
// case enumwfStatus.Passed:
|
|
// dr["WfStatus"] = "Pending at " + sAttText;// "Sent to Approver";
|
|
// break;
|
|
// case enumwfStatus.Revert:
|
|
// dr["WfStatus"] = "Reverted by " + sAttText;//"Reverted";
|
|
// break;
|
|
// case enumwfStatus.Decline:
|
|
// dr["WfStatus"] = "Rejected by " + sAttText;//"Declined";
|
|
// break;
|
|
// case enumwfStatus.Approve:
|
|
// case enumwfStatus.End:
|
|
// dr["WfStatus"] = "Approved and Sent to HR";
|
|
|
|
// break;
|
|
|
|
// default:
|
|
// dr["WfStatus"] = item.WfStatus.ToString().Replace('_', ' ');
|
|
// break;
|
|
// }
|
|
// }
|
|
// else if (item.WfStatus == enumwfStatus.Decline)
|
|
// {
|
|
// dr["WfStatus"] = "Declined";
|
|
// }
|
|
// }
|
|
// else
|
|
// {
|
|
// dr["WfStatus"] = "Approved and sent to HR";
|
|
// }
|
|
|
|
// dr["LoanID"] = item.LoanID.Integer;
|
|
// dt.Rows.Add(dr);
|
|
// }
|
|
// return dt;
|
|
//}
|
|
|
|
//private static DataTable CreateLoanTable(List<HRRequest> oReqests)
|
|
//{
|
|
// DataTable dt = new DataTable();
|
|
// dt.Columns.Add("HRRequestID");
|
|
// dt.Columns.Add("Description");
|
|
// dt.Columns.Add("LoanName");
|
|
// dt.Columns.Add("Amount");
|
|
// dt.Columns.Add("WfStatus");
|
|
// dt.Columns.Add("RequestDate");
|
|
|
|
|
|
// foreach (HRRequest item in oReqests)
|
|
// {
|
|
// Loan oloan = Loan.Get(item.LoanID);
|
|
|
|
// DataRow dr = dt.NewRow();
|
|
// dr["HRRequestID"] = item.ID.Integer;
|
|
// dr["LoanName"] = oloan.Name;
|
|
// dr["Description"] = item.Description;
|
|
// dr["Amount"] = item.Amount;
|
|
// dr["RequestDate"] = item.RequestDate.ToString("dd MMM yyyy");
|
|
// switch (item.WfStatus)
|
|
// {
|
|
// case enumwfStatus.Not_yet_Initiated:
|
|
// case enumwfStatus.Received:
|
|
// dr["WfStatus"] = "Sent to Approver";
|
|
// break;
|
|
// case enumwfStatus.Passed:
|
|
// dr["WfStatus"] = "Sent to Approver";
|
|
// break;
|
|
// case enumwfStatus.Revert:
|
|
// dr["WfStatus"] = "Reverted";
|
|
// break;
|
|
// case enumwfStatus.Decline:
|
|
// dr["WfStatus"] = "Declined";
|
|
// break;
|
|
// case enumwfStatus.Approve:
|
|
// case enumwfStatus.End:
|
|
// if (item.RequestComplted == true)
|
|
// dr["WfStatus"] = "Completed";
|
|
// else dr["WfStatus"] = "Sent to HR";
|
|
|
|
// break;
|
|
|
|
// default:
|
|
// dr["WfStatus"] = item.WfStatus.ToString();
|
|
// break;
|
|
// }
|
|
// if (item.RequestComplted)
|
|
// dr["WfStatus"] = "Terminated";
|
|
// dt.Rows.Add(dr);
|
|
// }
|
|
// return dt;
|
|
//}
|
|
|
|
//private static DataTable CreateLFAMedInshDetailTable(List<HRRequestDetail> oReqestDetails, int reqID)
|
|
//{
|
|
// HRRequest oHRRequest = HRRequest.Get(reqID);
|
|
// DataTable dt = new DataTable();
|
|
// dt.Columns.Add("HRRequestDetailID");
|
|
// dt.Columns.Add("HRRequestID");
|
|
// dt.Columns.Add("EmployeeID");
|
|
// dt.Columns.Add("Remarks");
|
|
// dt.Columns.Add("RemarksDate");
|
|
// dt.Columns.Add("IsRead");
|
|
// dt.Columns.Add("IsHR");
|
|
// dt.Columns.Add("Sender");
|
|
// dt.Columns.Add("ReadStatus");
|
|
// dt.Columns.Add("Courier");
|
|
|
|
|
|
|
|
// foreach (HRRequestDetail item in oReqestDetails)
|
|
// {
|
|
// DataRow dr = dt.NewRow();
|
|
// dr["HRRequestDetailID"] = item.ID.Integer;
|
|
// dr["HRRequestID"] = item.HRRequestID.Integer;
|
|
// dr["EmployeeID"] = item.EmployeeID.Integer;
|
|
// dr["Remarks"] = item.Remarks;
|
|
// dr["RemarksDate"] = item.RemarksDate.ToString("dd MMM yyyy");
|
|
// dr["IsRead"] = item.IsRead;
|
|
// dr["IsHR"] = item.IsHR;
|
|
|
|
// if (item.EmployeeID.Integer == oHRRequest.EmployeeID.Integer)
|
|
// {
|
|
// dr["Sender"] = "Me";
|
|
// }
|
|
// else
|
|
// {
|
|
// dr["Sender"] = item.EmployeeID.Integer == 0 ? "" : Employee.Get(item.EmployeeID).Name;
|
|
// }
|
|
|
|
// if (item.IsRead)
|
|
// {
|
|
// dr["ReadStatus"] = "Read";
|
|
// }
|
|
// else
|
|
// {
|
|
// dr["ReadStatus"] = "Not Read";
|
|
// }
|
|
|
|
// if (item.CourierID.Integer != 0)
|
|
// {
|
|
// dr["Courier"] = "Courier_Name:" + item.CourierName +
|
|
// (string.IsNullOrEmpty(item.TokenNumber) ? " " : (" Token_Number:" + item.TokenNumber)) +
|
|
// " Courier_Date:" + item.CourierDate.ToString("dd MMM yyyy");
|
|
// }
|
|
// dt.Rows.Add(dr);
|
|
// }
|
|
// return dt;
|
|
//}
|
|
|
|
//private static DataTable CreateDetailTable(List<HRRequestDetail> oReqestDetails, int reqID)
|
|
//{
|
|
// HRRequest oHRRequest = new HRRequest();
|
|
// oHRRequest = HRRequest.Get(reqID);
|
|
// DataTable dt = new DataTable();
|
|
// dt.Columns.Add("HRRequestDetailID");
|
|
// dt.Columns.Add("HRRequestID");
|
|
// dt.Columns.Add("EmployeeID");
|
|
// dt.Columns.Add("Remarks");
|
|
// dt.Columns.Add("RemarksDate");
|
|
// dt.Columns.Add("IsRead");
|
|
// dt.Columns.Add("IsHR");
|
|
// dt.Columns.Add("Sender");
|
|
// dt.Columns.Add("ReadStatus");
|
|
// dt.Columns.Add("Courier");
|
|
|
|
|
|
|
|
// foreach (HRRequestDetail item in oReqestDetails)
|
|
// {
|
|
// DataRow dr = dt.NewRow();
|
|
// dr["HRRequestDetailID"] = item.ID.Integer;
|
|
// dr["HRRequestID"] = item.HRRequestID.Integer;
|
|
// dr["EmployeeID"] = item.EmployeeID.Integer;
|
|
// dr["Remarks"] = item.Remarks;
|
|
// dr["RemarksDate"] = item.RemarksDate.ToString("dd MMM yyyy");
|
|
// dr["IsRead"] = item.IsRead;
|
|
// dr["IsHR"] = item.IsHR;
|
|
|
|
// if (item.EmployeeID.Integer == oHRRequest.EmployeeID.Integer)
|
|
// {
|
|
// dr["Sender"] = "Me";
|
|
// }
|
|
// else
|
|
// {
|
|
// dr["Sender"] = item.EmployeeID.Integer == 0 ? "HR" : Employee.Get(item.EmployeeID).Name;
|
|
// }
|
|
|
|
// if (item.IsRead)
|
|
// {
|
|
// dr["ReadStatus"] = "Read";
|
|
// }
|
|
// else
|
|
// {
|
|
// dr["ReadStatus"] = "Not Read";
|
|
// }
|
|
|
|
// if (item.CourierID.Integer != 0)
|
|
// dr["Courier"] = "Courier_Name:" + Vendor.Get(item.CourierID).Name + " Token_Number:" + item.TokenNumber + " Courier_Date:" + item.CourierDate.ToString("dd MMM yyyy");
|
|
// dt.Rows.Add(dr);
|
|
// }
|
|
// return dt;
|
|
//}
|
|
|
|
//private static DataTable CreateLetterDetailTable(List<HRRequestDetail> oReqestDetails, int reqID)
|
|
//{
|
|
// HRRequest oHRRequest = HRRequest.Get(reqID);
|
|
// DataTable dt = new DataTable();
|
|
// dt.Columns.Add("HRRequestDetailID");
|
|
// dt.Columns.Add("HRRequestID");
|
|
// dt.Columns.Add("EmployeeID");
|
|
// dt.Columns.Add("Sender");
|
|
// dt.Columns.Add("Remarks");
|
|
// dt.Columns.Add("RemarksDate");
|
|
// dt.Columns.Add("ReadStatus");
|
|
// dt.Columns.Add("IsRead");
|
|
// dt.Columns.Add("IsHR");
|
|
// dt.Columns.Add("Courier");
|
|
|
|
// foreach (HRRequestDetail item in oReqestDetails)
|
|
// {
|
|
// DataRow dr = dt.NewRow();
|
|
// dr["HRRequestDetailID"] = item.ID.Integer;
|
|
// dr["HRRequestID"] = item.HRRequestID.Integer;
|
|
// dr["EmployeeID"] = item.EmployeeID.Integer;
|
|
// dr["Remarks"] = item.Remarks;
|
|
// dr["RemarksDate"] = item.RemarksDate.ToString("dd MMM yyyy");
|
|
// dr["IsRead"] = item.IsRead;
|
|
// dr["IsHR"] = item.IsHR;
|
|
|
|
// if (item.EmployeeID.Integer == oHRRequest.EmployeeID.Integer)
|
|
// {
|
|
// dr["Sender"] = "Me";
|
|
// }
|
|
// else
|
|
// {
|
|
// dr["Sender"] = item.EmployeeID.Integer == 0 ? "HR" : "HR: " + Employee.Get(item.EmployeeID).Name;
|
|
// }
|
|
|
|
// if (item.IsRead)
|
|
// {
|
|
// dr["ReadStatus"] = "Read";
|
|
// }
|
|
// else
|
|
// {
|
|
// dr["ReadStatus"] = "Not Read";
|
|
// }
|
|
|
|
// //if (item.CourierID.Integer != 0)
|
|
// // dr["Courier"] = "Courier_Name:" + Vendor.Get(item.CourierID).Name + " Token_Number:" + item.TokenNumber + " Courier_Date:" + item.CourierDate.ToString("dd MMM yyyy");
|
|
|
|
// dt.Rows.Add(dr);
|
|
// }
|
|
// return dt;
|
|
//}
|
|
|
|
//public static DataTable GetLFAMedicalClaimByEmpID(int id)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.GetLFAMedicalClaimByEmpID(id);
|
|
// return CreateActiveLFAMedInsranceTable(oReqests);
|
|
//}
|
|
|
|
//public static DataTable GetPaymentRequestedItems()
|
|
//{
|
|
// DataTable oReqests = HRRequest.Service.GetPaymentRequestedItems();
|
|
// return oReqests;
|
|
//}
|
|
|
|
//public static DataTable GetPaymentHistoryItemsByDateRange(DateTime dateTime, DateTime dateTime_2)
|
|
//{
|
|
// return null;
|
|
// //throw new NotImplementedException();
|
|
//}
|
|
|
|
//public static List<HRRequest> GetLFAMedicalClaimObjectsByEmpID(int id)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.GetLFAMedicalClaimByEmpID(id);
|
|
// return oReqests;
|
|
//}
|
|
|
|
//public static List<HRRequest> GetHRRequetByParameters(DateTime dateTime1, DateTime dateTime2, string empNo, string empName, bool requestComplted)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.GetHRRequetByParameters(dateTime1, dateTime2, empNo, empName, requestComplted);
|
|
// return oReqests;
|
|
//}
|
|
|
|
//public static DataTable GetLFAMedicalClaim(int id, DateTime dateTime1, DateTime dateTime2)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.GetLFAMedicalClaim(id, dateTime1, dateTime2);
|
|
// return CreateLFAMedInsranceTable(oReqests);
|
|
//}
|
|
|
|
//public static List<HRRequest> GetMedicalClaims(int id, EnumRequestType requestType, DateTime dateTime1, DateTime dateTime2)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.Get(id, requestType, dateTime1, dateTime2);
|
|
// return oReqests;
|
|
//}
|
|
|
|
//public static DataTable Get(int id, EnumRequestType requestType, DateTime dateTime1, DateTime dateTime2)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.Get(id, requestType, dateTime1, dateTime2);
|
|
// return CreateLFAMedInsranceTable(oReqests);
|
|
//}
|
|
|
|
//public static DataTable GetMedicalClaimByRequestCompleted(int id, EnumRequestType requestType, bool isRequestCompleted, DateTime dateTime1, DateTime dateTime2)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.GetMedicalClaimByRequestCompleted(id, requestType, isRequestCompleted, dateTime1, dateTime2);
|
|
// return CreateMedicalClaimTable(oReqests);
|
|
//}
|
|
|
|
//public static DataTable GetInsuranceClaimByEmpID(int id)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.GetInsuranceClaimByEmpID(id);
|
|
// return CreateActiveLFAMedInsranceTable(oReqests);
|
|
//}
|
|
|
|
//public static DataTable GetInsuranceClaim(int id, DateTime dateTime1, DateTime dateTime2)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.GetInsuranceClaim(id, dateTime1, dateTime2);
|
|
// return CreateLFAMedInsranceTable(oReqests);
|
|
//}
|
|
|
|
//public static DataTable GetLetterClaimByEmpID(int id)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.GetLetterClaimByEmpID(id);
|
|
// return CreateActiveLetterClaimTable(oReqests);
|
|
//}
|
|
|
|
//public static DataTable GetLetterClaim(int id, DateTime dateTime1, DateTime dateTime2)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.GetLetterClaim(id, dateTime1, dateTime2);
|
|
// return CreateLetterClaimTable(oReqests);
|
|
//}
|
|
|
|
//public static DataTable GetLFAMedInshDetailByReqID(int reqID)
|
|
//{
|
|
// List<HRRequestDetail> oReqestDetails = new List<HRRequestDetail>();
|
|
// oReqestDetails = HRRequest.Service.GetHRequestDetails(reqID);
|
|
// return CreateLFAMedInshDetailTable(oReqestDetails, reqID);
|
|
//}
|
|
|
|
//public static DataTable GetLetterDetailByReqID(int reqID)
|
|
//{
|
|
// List<HRRequestDetail> oReqestDetails = new List<HRRequestDetail>();
|
|
// oReqestDetails = HRRequest.Service.GetHRequestDetails(reqID);
|
|
// return CreateLetterDetailTable(oReqestDetails, reqID);
|
|
//}
|
|
|
|
//public static DataTable GetLoanApplicationByEmpID(int empID)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.GetLoanApplicationByEmpID(empID);
|
|
// return CreateActiveLoanTable(oReqests);
|
|
//}
|
|
|
|
//public static DataTable GetLoanApplicationByDateRange(int empID, DateTime startDate, DateTime endDate)
|
|
//{
|
|
// List<HRRequest> oReqests = new List<HRRequest>();
|
|
// oReqests = HRRequest.Service.GetLoanApplicationByDateRange(empID, startDate, endDate);
|
|
// return CreateLoanTable(oReqests);
|
|
//}
|
|
|
|
//public static DataTable GetWebDetailByReqID(int reqID)
|
|
//{
|
|
// List<HRRequestDetail> oReqestDetails = new List<HRRequestDetail>();
|
|
// oReqestDetails = HRRequest.Service.GetHRequestDetails(reqID);
|
|
// return CreateDetailTable(oReqestDetails, reqID);
|
|
//}
|
|
|
|
//public static List<HRRequestDetail> GetDetailByReqID(int reqID)
|
|
//{
|
|
// return HRRequest.Service.GetHRequestDetails(reqID);
|
|
//}
|
|
|
|
//public static void ReadHRRequestDetail(int HRRequestDetailID)
|
|
//{
|
|
// HRRequest.Service.ReadHRRequestDetail(HRRequestDetailID);
|
|
//}
|
|
|
|
//public static List<HRRequest> GetLoanCalimbyScheduleDate(DateTime fromdate, DateTime todate)
|
|
//{
|
|
// return HRRequest.Service.GetLoanCalimbyScheduleDate(fromdate, todate);
|
|
//}
|
|
|
|
//public static List<HRRequest> GetMedicalClaimByDateRange(enumwfStatus status, bool requestComplted)
|
|
//{
|
|
// return HRRequest.Service.GetMedicalClaimByDateRange(status, requestComplted);
|
|
//}
|
|
|
|
//public static List<HRRequest> GetHRRequetByWFStatus(enumwfStatus status)
|
|
//{
|
|
// return HRRequest.Service.GetHRRequetByWFStatus(status);
|
|
//}
|
|
|
|
//public int Save()
|
|
//{
|
|
// this.SetAuditTrailProperties();
|
|
// return HRRequest.Service.Save(this);
|
|
//}
|
|
//public void SavePaymentSchedules(List<HRRequestPaymentSchedule> oItems)
|
|
//{
|
|
// HRRequest.Service.SavePaymentSchedules(oItems);
|
|
//}
|
|
//public void SaveLoan()
|
|
//{
|
|
// this.SetAuditTrailProperties();
|
|
// HRRequest.Service.SaveLoan(this);
|
|
//}
|
|
//public void SaveLoanandPaymentDetail()
|
|
//{
|
|
// this.SetAuditTrailProperties();
|
|
// HRRequest.Service.SaveLoanandPaymentDetail(this);
|
|
//}
|
|
|
|
//public void SaveLetterRequest()
|
|
//{
|
|
// this.SetAuditTrailProperties();
|
|
// HRRequest.Service.SaveLetterRequest(this);
|
|
//}
|
|
|
|
//public static void SaveDetail(HRRequestDetail oHrrequestDetails)
|
|
//{
|
|
// HRRequest.Service.SaveDetail(oHrrequestDetails);
|
|
//}
|
|
|
|
//public void SaveMedicalClaim(double continueGratuity)
|
|
//{
|
|
// this.SetAuditTrailProperties();
|
|
// HRRequest.Service.SaveMedicalClaim(this, continueGratuity);
|
|
//}
|
|
//public static void UpdatePaidDate(List<HRRequest> oReqests, List<HRRequest> oUncheckedReqests)
|
|
//{
|
|
// HRRequest.Service.UpdatePaidDate(oReqests, oUncheckedReqests);
|
|
|
|
//}
|
|
//public static void UpdatePaymentRequest(HRRequest hRRequest)
|
|
//{
|
|
// HRRequest.Service.UpdatePaymentRequest(hRRequest);
|
|
|
|
//}
|
|
//public static void UpdateLoanShedulePaymentRequest(HRRequestPaymentSchedule LoanPaymentSchedule)
|
|
//{
|
|
// HRRequest.Service.UpdateLoanShedulePaymentRequest(LoanPaymentSchedule);
|
|
|
|
//}
|
|
//public static void UpdateLoanSheduleLoanIssueID(HRRequest hRRequest)
|
|
//{
|
|
// HRRequest.Service.UpdateLoanSheduleLoanIssueID(hRRequest);
|
|
|
|
//}
|
|
|
|
//public static bool UpdateRequestConfirmation(int HRRequestID)
|
|
//{
|
|
// return HRRequest.Service.UpdateRequestConfirmation(HRRequestID);
|
|
|
|
//}
|
|
|
|
//public void Delete(int id)
|
|
//{
|
|
// HRRequest.Service.Delete(id);
|
|
//}
|
|
//#endregion
|
|
|
|
|
|
//this is a helper method for calculating claim amount
|
|
|
|
//#region Calculate Claim Amount
|
|
//public Dictionary<string, dynamic> CalculateClaimAmount(int employeeID, int employeeGradID, EnumMaritalStatus maritalStatus)
|
|
//{
|
|
// MedicalBenifitSetup oMedicalBenifitSetup = new MedicalBenifitSetup();
|
|
// Dictionary<string, dynamic> claimAmount = new Dictionary<string, dynamic>();
|
|
// DataTable oDataTable = new DataTable();
|
|
// int allowedPerson = 0;
|
|
// double totalAmount = 0.0;
|
|
// double takenInCurrentYearAmount = 0.0;
|
|
// double availableAmount = 0.0;
|
|
// double memberAmount = 0.0;
|
|
|
|
|
|
// #region Claim Range
|
|
// int year = DateTime.Now.Year;
|
|
// DateTime fromDate = new DateTime(year, 1, 1);
|
|
// DateTime toDate = new DateTime(year, 12, 31);
|
|
// #endregion
|
|
|
|
// oMedicalBenifitSetup = MedicalBenifitSetup.Get(employeeGradID);
|
|
// oDataTable = GetMedicalClaimByRequestCompleted(employeeID, EnumRequestType.MedicalClaim, true, fromDate, toDate);
|
|
|
|
// if (oMedicalBenifitSetup != null)
|
|
// {
|
|
// allowedPerson = oMedicalBenifitSetup.AllowedPerson;
|
|
// memberAmount = oMedicalBenifitSetup.MemberAmount;
|
|
|
|
// //takenInCurrentYearAmount = oDataTable.Compute("Sum(Convert.ToDouble([Amount]))", "");
|
|
// foreach (DataRow row in oDataTable.Rows)
|
|
// {
|
|
// object amount = row["Amount"];
|
|
// if (amount != DBNull.Value)
|
|
// takenInCurrentYearAmount += Convert.ToDouble((row["Amount"]));
|
|
// else
|
|
// takenInCurrentYearAmount += 0.0;
|
|
// }
|
|
|
|
// if (maritalStatus == EnumMaritalStatus.UnMarried)
|
|
// totalAmount = (1 * memberAmount);
|
|
// else
|
|
// {
|
|
// int _countFamilyMember = 1;
|
|
// HREmployee tempEmp = new HREmployee();
|
|
// tempEmp = tempEmp.Get(employeeID);
|
|
|
|
// _countFamilyMember += (tempEmp.Spouses.Count + tempEmp.ChildrenList.Count);
|
|
|
|
// if (allowedPerson <= _countFamilyMember)
|
|
// totalAmount = (allowedPerson * memberAmount);
|
|
|
|
// if (allowedPerson > _countFamilyMember)
|
|
// totalAmount = (_countFamilyMember * memberAmount);
|
|
// }
|
|
|
|
// availableAmount = (totalAmount - takenInCurrentYearAmount);
|
|
// }
|
|
// claimAmount.Add("totalAmount", totalAmount);
|
|
// claimAmount.Add("takenInCurrentYearAmount", takenInCurrentYearAmount);
|
|
// claimAmount.Add("availableAmount", availableAmount);
|
|
|
|
// return claimAmount;
|
|
|
|
//}
|
|
//#endregion
|
|
|
|
//#region IworkflowInterface Members
|
|
|
|
///// <summary>
|
|
///// this property is used for work flow, which return leave description
|
|
///// </summary>
|
|
/////
|
|
|
|
//public int GetStatusbyWf(enumwfStatus wfstatus)
|
|
//{
|
|
// return (int)this.WfStatus;
|
|
//}
|
|
//public string WFDesciption()
|
|
//{
|
|
// return this.ObjectDescription;
|
|
//}
|
|
|
|
//public List<PendingJobDetail> GetDetails()
|
|
//{
|
|
// List<PendingJobDetail> oPendingJobDetails = new List<PendingJobDetail>();
|
|
// // need to implement as per type
|
|
// // Example: LoanIssue / LeaveEntry
|
|
// switch (RequestType)
|
|
// {
|
|
// case EnumRequestType.LTA:
|
|
// //oPendingJobDetails.Add(new PendingJobDetail() { Type="Employee" , Value="[]" });
|
|
// break;
|
|
// case EnumRequestType.Medical:
|
|
|
|
// break;
|
|
// case EnumRequestType.Insurance:
|
|
|
|
// break;
|
|
// case EnumRequestType.Letter:
|
|
|
|
// break;
|
|
// case EnumRequestType.Loan:
|
|
// Loan oLoan = Payroll.BO.Loan.Get(this.LoanID);
|
|
// oPendingJobDetails.Add(new PendingJobDetail() { Type = "Applier:", Value = this.Employee.Name });
|
|
// oPendingJobDetails.Add(new PendingJobDetail() { Type = "Loan Type:", Value = oLoan.Name });
|
|
// oPendingJobDetails.Add(new PendingJobDetail() { Type = "Loan Amount:", Value = this.Amount.ToString("#,###") });
|
|
// break;
|
|
// case EnumRequestType.MedicalClaim:
|
|
// break;
|
|
// case EnumRequestType.AIT:
|
|
// break;
|
|
// case EnumRequestType.Recognition:
|
|
// break;
|
|
// default:
|
|
// break;
|
|
// }
|
|
// return oPendingJobDetails;
|
|
//}
|
|
|
|
//public string ObjectDescription
|
|
//{
|
|
// get
|
|
// {
|
|
// string str = "";
|
|
// switch (RequestType)
|
|
// {
|
|
// case EnumRequestType.LTA:
|
|
// str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText
|
|
// + " has applied for LTA Claim on " + this.RequestDate.ToString("dd MMM yyyy")
|
|
// + ". ";
|
|
// break;
|
|
|
|
// case EnumRequestType.Medical:
|
|
// str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText
|
|
// + " has applied for Medical Leave Claim on " + this.RequestDate.ToString("dd MMM yyyy")
|
|
// + ". ";
|
|
// break;
|
|
// case EnumRequestType.Insurance:
|
|
// str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText
|
|
// + " has applied for Insurance claim on " + this.RequestDate.ToString("dd MMM yyyy")
|
|
// + ". ";
|
|
// break;
|
|
// case EnumRequestType.Letter:
|
|
// EnumLetterType letterType = (EnumLetterType)LetterTypeID;
|
|
// switch (letterType)
|
|
// {
|
|
// case EnumLetterType.Visa_Letter_Business_Trip_With_Family:
|
|
// str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText
|
|
// + " has applied for applied for Visa Letter Business Trip With Family " + " on " + RequestDate.ToString("dd MMM yyyy") + ".";
|
|
// break;
|
|
// case EnumLetterType.Salary_Certificate:
|
|
// str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText
|
|
// + " has applied for Salary Certificate " + " on " + RequestDate.ToString("dd MMM yyyy") + ".";
|
|
|
|
// break;
|
|
// case EnumLetterType.Visa_Letter_Business_Trip:
|
|
// str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText
|
|
// + " has applied for Visa Letter Business Trip " + " on " + RequestDate.ToString("dd MMM yyyy") + ".";
|
|
|
|
// break;
|
|
// case EnumLetterType.Visa_Letter_Personal_Trip:
|
|
// str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText
|
|
// + " has applied for Visa Letter Personal Trip " + " on " + RequestDate.ToString("dd MMM yyyy") + ".";
|
|
|
|
// break;
|
|
// case EnumLetterType.Visa_Letter_Personal_Trip_With_Family:
|
|
// str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText
|
|
// + " has applied for Visa Letter Personal Trip With Family " + " on " + RequestDate.ToString("dd MMM yyyy") + ".";
|
|
|
|
// break;
|
|
// case EnumLetterType.Loan_Letter_Bank:
|
|
// str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText
|
|
// + " has applied for Loan Letter Bank " + " on " + RequestDate.ToString("dd MMM yyyy") + ".";
|
|
|
|
// break;
|
|
|
|
// default:
|
|
// str = " Employee (" + this.Employee.EmployeeNo + ")" + this.Employee.Name
|
|
// + " applied for " + this.Description + " on " +
|
|
// this.RequestDate.ToString("dd MMM yyyy");
|
|
// break;
|
|
// }
|
|
// break;
|
|
// case EnumRequestType.Loan:
|
|
// string loanName = Payroll.BO.Loan.Get(this.LoanID).Name;
|
|
// str = " " + this.Employee.Name + ", " + this.Employee.DescriptionText
|
|
// + " has applied for " + loanName + " for your appproval.";
|
|
// break;
|
|
|
|
// default:
|
|
// break;
|
|
// }
|
|
|
|
|
|
|
|
|
|
// return str;
|
|
// }
|
|
//}
|
|
///// <summary>
|
|
///// this property is used for work flow, it's a constant value
|
|
///// </summary>
|
|
//public int SetupID
|
|
//{
|
|
// get
|
|
// {
|
|
// switch (this.RequestType)
|
|
// {
|
|
// case EnumRequestType.LTA:
|
|
// case EnumRequestType.Medical:
|
|
// case EnumRequestType.Insurance:
|
|
// case EnumRequestType.Letter:
|
|
// return (4);
|
|
// case EnumRequestType.Loan:
|
|
// return (2);
|
|
// default:
|
|
// return (2);
|
|
// }
|
|
|
|
// }
|
|
//}
|
|
///// <summary>
|
|
///// this property is used for work flow, which return leave entry id
|
|
///// </summary>
|
|
//public int ObjectID
|
|
//{
|
|
// get { return this.ID; }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
}
|
|
|
|
#region Child Objects
|
|
public class HRRequestDetail : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
|
|
public HRRequestDetail()
|
|
{
|
|
_nHRRequestID = (0);
|
|
_nEmployeeID = (0);
|
|
_sRemarks = string.Empty;
|
|
_nCourierID = (0);
|
|
_dCourierDate = DateTime.Today;
|
|
_dRemarksDate = DateTime.Today;
|
|
_bIsHR = false;
|
|
_bIsRead = false;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region HRRequestID : ID
|
|
private int _nHRRequestID;
|
|
public int HRRequestID
|
|
{
|
|
get { return _nHRRequestID; }
|
|
set { _nHRRequestID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region EmployeeID : ID
|
|
private int _nEmployeeID;
|
|
public int EmployeeID
|
|
{
|
|
get { return _nEmployeeID; }
|
|
set { _nEmployeeID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region CourierID : ID
|
|
private int _nCourierID;
|
|
public int CourierID
|
|
{
|
|
get { return _nCourierID; }
|
|
set { _nCourierID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region CourierName : string
|
|
private string _nCourierName;
|
|
public string CourierName
|
|
{
|
|
get { return _nCourierName; }
|
|
set { _nCourierName = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region TokenNumber : string
|
|
private string _sTokenNumber;
|
|
public string TokenNumber
|
|
{
|
|
get { return _sTokenNumber; }
|
|
set { _sTokenNumber = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Remarks : string
|
|
private string _sRemarks;
|
|
public string Remarks
|
|
{
|
|
get { return _sRemarks; }
|
|
set { _sRemarks = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region CourierDate : DateTime
|
|
private DateTime _dCourierDate;
|
|
public DateTime CourierDate
|
|
{
|
|
get { return _dCourierDate; }
|
|
set { _dCourierDate = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region RemarksDate : DateTime
|
|
private DateTime _dRemarksDate;
|
|
public DateTime RemarksDate
|
|
{
|
|
get { return _dRemarksDate; }
|
|
set { _dRemarksDate = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region IsRead : bool
|
|
|
|
private bool _bIsRead;
|
|
public bool IsRead
|
|
{
|
|
get { return _bIsRead; }
|
|
set { _bIsRead = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IsHR : bool
|
|
|
|
private bool _bIsHR;
|
|
public bool IsHR
|
|
{
|
|
get { return _bIsHR; }
|
|
set { _bIsHR = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
}
|
|
public class HRRequestMedical : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
|
|
public HRRequestMedical()
|
|
{
|
|
_nHRRequestID = (0);
|
|
_sName = string.Empty;
|
|
_sRelation = string.Empty;
|
|
_sPassportNo = string.Empty;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region HRRequestID : ID
|
|
private int _nHRRequestID;
|
|
public int HRRequestID
|
|
{
|
|
get { return _nHRRequestID; }
|
|
set { _nHRRequestID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Name : string
|
|
private string _sName;
|
|
public string Name
|
|
{
|
|
get { return _sName; }
|
|
set { _sName = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Relation : string
|
|
private string _sRelation;
|
|
public string Relation
|
|
{
|
|
get { return _sRelation; }
|
|
set { _sRelation = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region PassportNo : string
|
|
private string _sPassportNo;
|
|
public string PassportNo
|
|
{
|
|
get { return _sPassportNo; }
|
|
set { _sPassportNo = value; }
|
|
}
|
|
#endregion
|
|
|
|
#endregion
|
|
}
|
|
public class HRRequestLoan : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
|
|
public HRRequestLoan()
|
|
{
|
|
_nHRRequestID = (0);
|
|
_sName = string.Empty;
|
|
_sCode = string.Empty;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region HRRequestID : ID
|
|
private int _nHRRequestID;
|
|
public int HRRequestID
|
|
{
|
|
get { return _nHRRequestID; }
|
|
set { _nHRRequestID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Name : string
|
|
private string _sName;
|
|
public string Name
|
|
{
|
|
get { return _sName; }
|
|
set { _sName = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Code : string
|
|
private string _sCode;
|
|
public string Code
|
|
{
|
|
get { return _sCode; }
|
|
set { _sCode = value; }
|
|
}
|
|
#endregion
|
|
|
|
#endregion
|
|
}
|
|
|
|
public class HRRequestLoanDetail : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
|
|
public HRRequestLoanDetail()
|
|
{
|
|
_nHRRequestID = (0);
|
|
_sDescription = string.Empty;
|
|
_sDescriptionValue = string.Empty;
|
|
_SerialNo = 0;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region HRRequestID : ID
|
|
private int _nHRRequestID;
|
|
public int HRRequestID
|
|
{
|
|
get { return _nHRRequestID; }
|
|
set { _nHRRequestID = value; }
|
|
}
|
|
#endregion
|
|
#region SerialNo : int
|
|
private int _SerialNo;
|
|
public int SerialNo
|
|
{
|
|
get { return _SerialNo; }
|
|
set { _SerialNo = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Description : string
|
|
private string _sDescription;
|
|
public string Description
|
|
{
|
|
get { return _sDescription; }
|
|
set { _sDescription = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region DescriptionValue : string
|
|
private string _sDescriptionValue;
|
|
public string DescriptionValue
|
|
{
|
|
get { return _sDescriptionValue; }
|
|
set { _sDescriptionValue = value; }
|
|
}
|
|
#endregion
|
|
|
|
#endregion
|
|
}
|
|
|
|
public class HRRequestPaymentSchedule : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
|
|
public HRRequestPaymentSchedule()
|
|
{
|
|
_nHRRequestID = (0);
|
|
_PaymentDescription = string.Empty;
|
|
_PaymentDate = DateTime.Today;
|
|
_Amount = 0.0;
|
|
_IsPaymentRequested = false;
|
|
_BankID = 0;
|
|
_AccountNo = string.Empty;
|
|
_PaidDate = DateTime.Today;
|
|
_Remarks = string.Empty;
|
|
_PaymentMode = EnumPaymentMode.BankTransfer;
|
|
_loanIssueID = 0;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
#region IsPaymentRequested : bool
|
|
private bool _IsPaymentRequested;
|
|
public bool IsPaymentRequested
|
|
{
|
|
get { return _IsPaymentRequested; }
|
|
set { _IsPaymentRequested = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region BankID : int
|
|
private int _BankID;
|
|
public int BankID
|
|
{
|
|
get { return _BankID; }
|
|
set { _BankID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region AccountNo : string
|
|
private string _AccountNo;
|
|
public string AccountNo
|
|
{
|
|
get { return _AccountNo; }
|
|
set { _AccountNo = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Remarks : string
|
|
private string _Remarks;
|
|
public string Remarks
|
|
{
|
|
get { return _Remarks; }
|
|
set { _Remarks = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region HRRequestID : ID
|
|
private int _nHRRequestID;
|
|
public int HRRequestID
|
|
{
|
|
get { return _nHRRequestID; }
|
|
set { _nHRRequestID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region PaymentDescription : string
|
|
private string _PaymentDescription;
|
|
public string PaymentDescription
|
|
{
|
|
get { return _PaymentDescription; }
|
|
set { _PaymentDescription = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region PaymentDate : DateTime
|
|
private DateTime _PaymentDate;
|
|
public DateTime PaymentDate
|
|
{
|
|
get { return _PaymentDate; }
|
|
set { _PaymentDate = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region FormatedDate : string
|
|
private string _FormatedDate;
|
|
public string FormatedDate
|
|
{
|
|
get { return _FormatedDate = this.PaymentDate.ToString("dd MMM yyyy"); }
|
|
//set { _PaymentDescription = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Amount : double
|
|
private double _Amount;
|
|
public double Amount
|
|
{
|
|
get { return _Amount; }
|
|
set { _Amount = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region PaidDate : DateTime
|
|
private DateTime _PaidDate;
|
|
public DateTime PaidDate
|
|
{
|
|
get { return _PaidDate; }
|
|
set { _PaidDate = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region PaidDate : DateTime
|
|
private EnumPaymentMode _PaymentMode;
|
|
public EnumPaymentMode PaymentMode
|
|
{
|
|
get { return _PaymentMode; }
|
|
set { _PaymentMode = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Loan Issue int : Loan IssueID
|
|
private int _loanIssueID;
|
|
public int LoanIssueID
|
|
{
|
|
get { return _loanIssueID; }
|
|
set { _loanIssueID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IHRRequest Service
|
|
|
|
public interface IHRRequestService
|
|
{
|
|
HRRequest Get(int id);
|
|
int Save(HRRequest hRRequest);
|
|
void SavePaymentSchedules(List<HRRequestPaymentSchedule> oItems);
|
|
void SaveLetterRequest(HRRequest hRRequest);
|
|
void SaveLoan(HRRequest hRRequest);
|
|
void SaveLoanandPaymentDetail(HRRequest hRRequest);
|
|
void SaveMedicalClaim(HRRequest hRRequest, double continueGratuity);
|
|
List<HRRequest> GetLFAMedicalClaimByEmpID(int id);
|
|
List<HRRequest> GetHRRequetByParameters(DateTime dateTime1, DateTime dateTime2, string empNo, string empName, bool requestComplted);
|
|
List<HRRequest> GetLFAMedicalClaim(int id, DateTime dateTime1, DateTime dateTime2);
|
|
List<HRRequest> Get(int id, EnumRequestType requestType, DateTime dateTime1, DateTime dateTime2);
|
|
List<HRRequest> GetMedicalClaimByRequestCompleted(int id, EnumRequestType requestType, bool isRequestCompleted, DateTime dateTime1, DateTime dateTime2);
|
|
List<HRRequest> GetInsuranceClaimByEmpID(int id);
|
|
List<HRRequest> GetInsuranceClaim(int id, DateTime dateTime1, DateTime dateTime2);
|
|
List<HRRequest> GetLetterClaimByEmpID(int id);
|
|
List<HRRequest> GetLetterClaim(int id, DateTime dateTime1, DateTime dateTime2);
|
|
|
|
List<HRRequestDetail> GetHRequestDetails(int id);
|
|
DataTable GetInsuranceDetailByReqID(int hRrequstId);
|
|
void SaveDetail(HRRequestDetail oHrrequestDetails);
|
|
void ReadHRRequestDetail(int HRRequestDetailID);
|
|
List<HRRequest> GetMedicalClaimByDateRange(EnumwfStatus status, bool requestComplted);
|
|
List<HRRequest> GetHRRequetByWFStatus(EnumwfStatus status);
|
|
List<HRRequestMedical> GetHRRequestPassports(int iD);
|
|
List<HRRequestLoan> GetHRRequestLoans(int iD);
|
|
List<HRRequestLoanDetail> GetHRRequestLoanDetails(int iD);
|
|
List<HRRequestPaymentSchedule> GetHRRequestPaymentSchedules(int iD);
|
|
List<HRRequest> GetLoanApplicationByEmpID(int empID);
|
|
List<HRRequest> GetLoanApplicationByDateRange(int empID, DateTime startDate, DateTime endDate);
|
|
|
|
void UpdatePaymentRequest(HRRequest hRRequest);
|
|
void UpdateLoanShedulePaymentRequest(HRRequestPaymentSchedule LoanPaymentSchedule);
|
|
void UpdateLoanSheduleLoanIssueID(HRRequest hRRequest);
|
|
bool UpdateRequestConfirmation(int HRRequestID);
|
|
DataTable GetPaymentRequestedItems();
|
|
List<HRRequest> GetLoanCalimbyScheduleDate(DateTime fromdate, DateTime todate);
|
|
void Delete(int id);
|
|
|
|
|
|
void UpdatePaidDate(List<HRRequest> oReqests, List<HRRequest> oUncheckedReqests);
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|