74 lines
2.1 KiB
C#
74 lines
2.1 KiB
C#
|
using HRM.BO;
|
|||
|
using Ease.Core.DataAccess;
|
|||
|
using System;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
|
|||
|
namespace HRM.DA
|
|||
|
{
|
|||
|
#region UploadEncashAmount
|
|||
|
|
|||
|
public class UploadEncashAmountDA
|
|||
|
{
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public UploadEncashAmountDA()
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region InsertFunction
|
|||
|
|
|||
|
internal static void Insert(TransactionContext tc, UploadEncashAmount oUploadEncashAmount)
|
|||
|
{
|
|||
|
string sSql = SQLParser.MakeSQL(
|
|||
|
"INSERT INTO UploadEncashAmount(UploadEncashAmountID, EMPLOYEEID, LeaveId,LeaveYear, Days,BasicSalary)" +
|
|||
|
" VALUES(%n,%n,%n,%n,%n,%n)",
|
|||
|
oUploadEncashAmount.ID, oUploadEncashAmount.EmployeeID, oUploadEncashAmount.LeaveID,
|
|||
|
oUploadEncashAmount.LeaveYear,
|
|||
|
oUploadEncashAmount.Days, oUploadEncashAmount.BasicSalary);
|
|||
|
tc.ExecuteNonQuery(sSql);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Update Function
|
|||
|
|
|||
|
internal static void Update(TransactionContext tc, UploadEncashAmount oUploadEncashAmount)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery(
|
|||
|
"UPDATE UploadEncashAmount SET EMPLOYEEID=%n,LeaveId=%n,LeaveYear=%n,Days=%n,BasicSalary=%n where UploadEncashAmountID=%n",
|
|||
|
oUploadEncashAmount.EmployeeID, oUploadEncashAmount.LeaveID, oUploadEncashAmount.LeaveYear,
|
|||
|
oUploadEncashAmount.Days, oUploadEncashAmount.BasicSalary, oUploadEncashAmount.ID);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Get Function
|
|||
|
|
|||
|
internal static IDataReader Get(TransactionContext tc, int empID)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("SELECT * from UploadEncashAmount WHERE EMPLOYEEID=%n order by LeaveYear", empID);
|
|||
|
}
|
|||
|
|
|||
|
internal static IDataReader Get(TransactionContext tc)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("SELECT * from UploadEncashAmount order by EMPLOYEEID,LeaveYear");
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
#region Delete Function
|
|||
|
|
|||
|
internal static void Delete(int id, TransactionContext tc)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("DELETE FROM UploadEncashAmount WHERE UploadEncashAmountID=%n", id);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|