CEL_Payroll/Payroll.BO/Basic/MiscellaneousDataset.cs
2024-09-17 14:30:13 +06:00

892 lines
26 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Ease.CoreV35.Model;
using Ease.CoreV35.DataAccess;
using Ease.CoreV35.DataAccess.SQL;
using Ease.CoreV35.Utility;
namespace Payroll.BO
{
[Serializable]
public class MiscellaneousDataset : BasicBaseObject
{
//public DataSet GetLFAData(DateTime fromDate, DateTime toDate, int AllowDecutdID)
//{
// DataSet oDataset;
// string SQL;
//}
#region Service Factory IMiscellaneousDatasetService : IMiscellaneousDatasetService
internal static IMiscellaneousDatasetService Service
{
get { return Services.Factory.CreateService<IMiscellaneousDatasetService>(typeof(IMiscellaneousDatasetService)); }
}
#endregion
public static int? GetbyGDDBID(string GPDPID)
{
int? empID = MiscellaneousDataset.Service.GetByGlobalID(GPDPID);
return empID;
}
//public static DataSet GetDetailOtherPayrollItems(string sOPIItemID, DateTime dOPIMonth, string sEmpID)
//{
// TransactionContext tc = null;
// tc = TransactionContext.Begin();
// DataSet oOPIRegs = new DataSet();
// string sQuary = SQLParser.MakeSQL("SELECT op.OPIMonth, e.EmployeeId, e.EmployeeNo,e.DEPARTMENTID, e.Name as EmpName,"
// + " e.DESIGNATIONID,e.BRANCHID,oi.OPIItemId,oi.Name as OPIItem, Sum(opdi.NetAmount) as Amount"
// + " FROM Employee e, "
// + " OPIItem oi, OPIProcess op, OPIProcessDetail opd, OPIProcessDetailItem opdi "
// + " WHERE op.OPIMonth >= %d AND op.OPIMonth <= %d "
// + " AND e.EmployeeId IN(%q) AND op.OPIProcessID = opd.OPIProcessID"
// + " AND e.EmployeeId = opd.EmployeeId AND opd.OPIProcessDetailId = opdi.OPIProcessDetailId"
// + " AND oi.OPIItemId = opdi.OPIItemId "
// + " GROUP BY op.OPIMonth, e.EmployeeId, e.EmployeeNo, e.Name,e.DEPARTMENTID,e.DESIGNATIONID,"
// + " e.BRANCHID,oi.OPIItemId, oi.Name "
// + " ORDER BY op.OPIMonth, e.EmployeeNo",
// GlobalFunctions.FirstDateOfMonth(dOPIMonth), GlobalFunctions.LastDateOfMonth(dOPIMonth), sEmpID, sOPIItemID);
// oOPIRegs = tc.ExecuteDataSet(sQuary);
// tc.End();
// return oOPIRegs;
//}
public static DataSet GetEmpGrossPay(DateTime dSMonthDate, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmpGrossPay(dSMonthDate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetTotalOPI(string oPIItem, DateTime _SalaryMonth, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetTotalOPI(oPIItem, _SalaryMonth, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmpDeduction(DateTime dSMonthDate, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmpDeduction(dSMonthDate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetBranchWiseSalary(DateTime dSMonthDate, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetBranchWiseSalary(dSMonthDate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetCCWiseSalaryDetails(DateTime dSMonthDate, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetCCWiseSalaryDetails(dSMonthDate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetLineManager(string empId)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetLineManager(empId);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetDividionWiseReport(DateTime dSMonthDate, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetDividionWiseReport(dSMonthDate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetCashChequePaymentReport(DateTime dSMonthDate, string paymentType)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetCashChequePaymentReport(dSMonthDate, paymentType);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetCashChequePaymentReportBonus(DateTime dSMonthDate, string paymentType)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetCashChequePaymentReportBonus(dSMonthDate, paymentType);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetCTCDetail(DateTime dSMonthDate, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetCTCDetail(dSMonthDate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetIncrement(DateTime dSMonthDate, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetIncrement(dSMonthDate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetADHeadReport(DateTime dSMonthDate, string checkItem,string itemCode)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetADHeadReport(dSMonthDate, checkItem, itemCode);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetOPIHeadReport(DateTime dSMonthDate, string checkItem)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetOPIHeadReport(dSMonthDate, checkItem);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetBranchWiseSalaryDetails(DateTime dSMonthDate, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetBranchWiseSalaryDetails(dSMonthDate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetTotalBranchWiseOPI(string str, DateTime dSMonthDate, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetTotalBranchWiseOPI(str, dSMonthDate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetTotalOPIForBranch(string oPIItem, DateTime _SalaryMonth, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetTotalOPIForBranch(oPIItem, _SalaryMonth, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetBranchWiseEmpDeduction(DateTime _SalaryMonth, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetBranchWiseEmpDeduction(_SalaryMonth, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetCCWiseFinance(DateTime _SalaryMonth, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetCCWiseFinance(_SalaryMonth, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetNewCCWiseSalaryDetails(DateTime _SalaryMonth, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetNewCCWiseSalaryDetails(_SalaryMonth, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetCCWiseOPIDetails(DateTime _SalaryMonth, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetCCWiseOPIDetails(_SalaryMonth, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetCCWiseSummary(DateTime _SalaryMonth, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetCCWiseSummary(_SalaryMonth, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetItemWiseSalary(string sEmpID, DateTime _SalaryMonth, DateTime toDate, string sSQL)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetItemWiseSalary(sEmpID, _SalaryMonth, toDate, sSQL);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmpIndSalarySheet(string sEmpID, string _months)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmpIndSalarySheet(sEmpID, _months);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetPFLedger(string sEmpID, DateTime FromDate, DateTime toDate)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetPFLedger(sEmpID, FromDate, toDate);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet PrintEnvelop(string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.PrintEnvelop(sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetSalarySheet(string sEmpID, DateTime _SalaryMonth, DateTime toDate)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetSalarySheet(sEmpID, _SalaryMonth, toDate);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetSalaryData(string sEmpID, DateTime _SalaryMonth, DateTime toDate)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetSalaryData(sEmpID, _SalaryMonth, toDate);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmpsFiscalYeartax(string sEmpIDs, DateTime fromdate, DateTime toDate,int taxParamID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmpsFiscalYeartax(sEmpIDs, fromdate, toDate, taxParamID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmpstaxInvestment(string sEmpIDs, int taxParamID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmpstaxInvestment(sEmpIDs, taxParamID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmpstaxChallan(string sEmpIDs, int taxParamId )
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmpstaxChallan(sEmpIDs, taxParamId);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmployeesMasterData(DateTime Fromdate, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmployeesMasterData(Fromdate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmployeesPF(DateTime dateTime, string sUnitID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmployeesPF(dateTime, sUnitID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetStuffListWithoutSalary(DateTime fromdate,string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetStuffListWithoutSalary(fromdate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmployeesPF(DateTime dateTime)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmployeesPF(dateTime);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmployeesPFNew(DateTime dtFirstdate, DateTime dtLastdate)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmployeesPFNew(dtFirstdate, dtLastdate);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetMonthlySalaryRevision(DateTime dtFirstdate, DateTime dtLastdate)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetMonthlySalaryRevision(dtFirstdate, dtLastdate);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmployeesPF(DateTime dtFirstdate, DateTime dtLastdate)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmployeesPF(dtFirstdate, dtLastdate);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetSalarySummaryData(DateTime dateTime, int deptId)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetSalarySummaryData(dateTime, deptId);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetSalaryComparisonData(DateTime _SalaryMonth, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetSalaryComparisonData(_SalaryMonth, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetSalaryPaySlipData(DateTime _SalaryMonth, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetSalaryPaySlipData(_SalaryMonth, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetExpensesPaySlipData(DateTime fromDate, DateTime toDate, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetExpensesPaySlipData(fromDate, toDate, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetBEFTNform(DateTime _salaryMonth, string Ids)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetBEFTNform(_salaryMonth, Ids);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmpExperience(int empid)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmpExperience(empid);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetEmpsAuditReport(DateTime _SalaryMonth, string sEmpID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetEmpsAuditReport(_SalaryMonth, sEmpID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetSalaryCertificateData(int EmpID, int bankID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetSalaryCertificateData(EmpID, bankID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetSalaryCertificateDataforOtherBank(int EmpID, int bankID)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetSalaryCertificateDataforOtherBank(EmpID, bankID);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetExceptionEmployeesPF(DateTime fromdate, DateTime todate)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetExceptionEmployeesPF(fromdate, todate);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetBankPaymentSummaryData(DateTime fromdate)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetBankPaymentSummaryData(fromdate);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
public static DataSet GetCashPaymentSummaryData(DateTime fromdate)
{
DataSet ds = null;
try
{
ds = MiscellaneousDataset.Service.GetCashPaymentSummaryData(fromdate);
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
return ds;
}
}
#region IMiscellaneousDataset Service
public interface IMiscellaneousDatasetService
{
//DataSet Get(string SQL);
//DataSet GetLFAData(string SQL);
int? GetByGlobalID(string GPDPID);
//DataSet GetDetailOtherPayrollItems(string sOPIItemID, DateTime dOPIMonth, string sEmpID);
DataSet GetEmpGrossPay(DateTime dSMonthDate, string sEmpID);
DataSet GetTotalOPI(string oPIItem, DateTime _SalaryMonth, string sEmpID);
DataSet GetEmpDeduction(DateTime dSMonthDate, string sEmpID);
DataSet GetBranchWiseSalary(DateTime dSMonthDate, string sEmpID);
DataSet GetCCWiseSalaryDetails(DateTime dSMonthDate, string sEmpID);
DataSet GetDividionWiseReport(DateTime dSMonthDate, string sEmpID);
DataSet GetCTCDetail(DateTime dSMonthDate, string sEmpID);
DataSet GetIncrement(DateTime dSMonthDate, string sEmpID);
DataSet GetADHeadReport(DateTime dSMonthDate, string checkItem, string itemCode);
DataSet GetCashChequePaymentReport(DateTime dSMonthDate, string paymentType);
DataSet GetCashChequePaymentReportBonus(DateTime dSMonthDate, string paymentType);
DataSet GetOPIHeadReport(DateTime dSMonthDate, string checkItem);
DataSet GetBranchWiseSalaryDetails(DateTime dSMonthDate, string sEmpID);
DataSet GetLineManager(string empId);
DataSet GetTotalBranchWiseOPI(string str, DateTime dSMonthDate, string sEmpID);
DataSet GetTotalOPIForBranch(string oPIItem, DateTime _SalaryMonth, string sEmpID);
DataSet GetBranchWiseEmpDeduction(DateTime _SalaryMonth, string sEmpID);
DataSet GetCCWiseFinance(DateTime _SalaryMonth, string sEmpID);
DataSet GetNewCCWiseSalaryDetails(DateTime _SalaryMonth, string sEmpID);
DataSet GetCCWiseOPIDetails(DateTime _SalaryMonth, string sEmpID);
DataSet GetCCWiseSummary(DateTime _SalaryMonth, string sEmpID);
DataSet GetItemWiseSalary(string sEmpID, DateTime _SalaryMonth, DateTime toDate, string sSQL);
DataSet GetEmpIndSalarySheet(string sEmpID, string _months);
DataSet GetPFLedger(string sEmpID, DateTime FromDate, DateTime toDate);
DataSet PrintEnvelop(string sEmpID);
DataSet GetSalarySheet(string sEmpID, DateTime _SalaryMonth, DateTime toDate);
DataSet GetSalaryData(string sEmpID, DateTime _SalaryMonth, DateTime toDate);
DataSet GetEmpsFiscalYeartax(string sEmpIDs, DateTime fromdate, DateTime toDate,int taxParamID);
DataSet GetEmpstaxInvestment(string sEmpIDs, int taxParamID);
DataSet GetEmpstaxChallan(string sEmpIDs, int taxParamId);
DataSet GetEmployeesMasterData(DateTime Fromdate, string sEmpID);
DataSet GetEmployeesPF(DateTime dateTime, string sUnitID);
DataSet GetStuffListWithoutSalary(DateTime fromdate, string sEmpID);
DataSet GetEmployeesPF(DateTime dateTime);
DataSet GetBEFTNform(DateTime _salaryMonth, string Ids);
DataSet GetEmployeesPFNew(DateTime dtFirstdate, DateTime dtLastdate);
DataSet GetMonthlySalaryRevision(DateTime dtFirstdate, DateTime dtLastdate);
DataSet GetEmployeesPF(DateTime dtFirstdate, DateTime dtLastdate);
DataSet GetSalarySummaryData(DateTime dateTime, int deptId);
DataSet GetSalaryComparisonData(DateTime _SalaryMonth, string sEmpID);
DataSet GetEmpExperience(int empid);
DataSet GetEmpsAuditReport(DateTime _SalaryMonth, string sEmpID);
DataSet GetSalaryCertificateData(int EmpID, int bankID);
DataSet GetSalaryCertificateDataforOtherBank(int EmpID, int bankID);
DataSet GetExceptionEmployeesPF(DateTime fromdate, DateTime todate);
DataSet GetBankPaymentSummaryData(DateTime fromdate);
DataSet GetCashPaymentSummaryData(DateTime fromdate);
DataSet GetSalaryPaySlipData(DateTime _SalaryMonth, string sEmpID);
DataSet GetExpensesPaySlipData(DateTime fromDate, DateTime toDate, string sEmpID);
}
#endregion
}