60 lines
2.7 KiB
C#
60 lines
2.7 KiB
C#
|
using HRM.BO;
|
|||
|
using HRM.DA;
|
|||
|
using System;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
namespace HRM.Report
|
|||
|
{
|
|||
|
public class rptBankAdviceWithRoutingNo
|
|||
|
{
|
|||
|
DataSet resultDataSet = new DataSet();
|
|||
|
|
|||
|
public byte[] ShowBankDisbursmentReportWithRoutingNo(int payrollTypeId, DateTime SalaryMonth, string sEmpID, int BankId, string reportType)
|
|||
|
{
|
|||
|
|
|||
|
DateTime salaryMonth = SalaryMonth.LastDateOfMonth();
|
|||
|
int count = 1;
|
|||
|
DataRow oDR = null;
|
|||
|
Bank oBank = new BankService().Get(BankId);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
DataSet oEmpBankAcc = new EmployeeBankAccountService().GetEmpBankAdviceWithRoutingNo(GlobalFunctions.LastDateOfMonth(salaryMonth), sEmpID);
|
|||
|
|
|||
|
HRM.Report.PayrollDataSet.dsCompany.BankAdviceWithRoutingNoDataTable bankAdviceWithRoutingNo = new HRM.Report.PayrollDataSet.dsCompany.BankAdviceWithRoutingNoDataTable();
|
|||
|
|
|||
|
double nTotal = 0.0;
|
|||
|
foreach (DataRow oDRow in oEmpBankAcc.Tables[0].Rows)
|
|||
|
{
|
|||
|
oDR = bankAdviceWithRoutingNo.NewRow();
|
|||
|
oDR["EmpNo"] = oDRow["EMPLOYEENO"];
|
|||
|
oDR["EmpName"] = oDRow["NAME"]; //Beneficiary Name(120)
|
|||
|
oDR["AccountNo"] = oDRow["ACCOUNTNO"]; //Beneficiary Account Number
|
|||
|
oDR["Amount"] = Math.Round(Convert.ToDouble(oDRow["CHANGEDAMOUNT"])); //Payment Amount
|
|||
|
oDR["SalaryMonth"] = salaryMonth; //Reason(140)
|
|||
|
oDR["PaymentDate"] = oDRow["PAYMENTDATE"]; //Payment Date(DD/MM/YYYY)
|
|||
|
oDR["Email"] = oDRow["EMAILADDRESS"]; //Beneficiary Email ID(Optional)
|
|||
|
oDR["SLNo"] = count;
|
|||
|
oDR["BankRoutingNo"] = oDRow["BankRoutingNo"];
|
|||
|
|
|||
|
//if(oDRow["EMAILADDRESS"] != null)
|
|||
|
//{
|
|||
|
// oDR["Email"] = oDRow["EMAILADDRESS"];
|
|||
|
//}
|
|||
|
//oDR["CostCenter"] = oDRow["CostCenter"].ToString();
|
|||
|
bankAdviceWithRoutingNo.Rows.Add(oDR);
|
|||
|
nTotal += Convert.ToDouble(oDR["Amount"]);
|
|||
|
count++;
|
|||
|
}
|
|||
|
|
|||
|
// bankAdvice.TableName = "dsCompany_BankAdvice";
|
|||
|
// resultDataSet.Tables.Add(bankAdvice);
|
|||
|
|
|||
|
//string RDLCName = "HRM.Report.RDLC.SalaryBankDisbursement.rdlc";
|
|||
|
ReportProcessor reportProcessor = new ReportProcessor();
|
|||
|
string rdlcName = "BankAdviceWithRoutingNo.rdlc";
|
|||
|
return reportProcessor.ShowDlgForBankDisbursmentWithRoutingNo(null, bankAdviceWithRoutingNo, reportType, payrollTypeId, rdlcName, SalaryMonth);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|