74 lines
2.0 KiB
C#
74 lines
2.0 KiB
C#
using System;
|
|
using Payroll.BO;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using Ease.CoreV35.Model;
|
|
using System.Data.SqlClient;
|
|
using Ease.CoreV35.DataAccess;
|
|
using System.Collections.Generic;
|
|
using Ease.CoreV35.DataAccess.SQL;
|
|
|
|
namespace Payroll.Service
|
|
{
|
|
#region CRGDepartmentLookupDA
|
|
|
|
internal class CRGDepartmentLookupDA
|
|
{
|
|
#region Constructor
|
|
|
|
private CRGDepartmentLookupDA() { }
|
|
|
|
#endregion
|
|
|
|
#region Insert function
|
|
|
|
internal static void Insert(TransactionContext tc, CRGDepartmentLookup item)
|
|
{
|
|
tc.ExecuteNonQuery("INSERT INTO CRGDepartmentLookup(CRGDepartmentLookupID, CrgID, DepartmentID)" +
|
|
" VALUES(%n, %n,%n)", item.ID.Integer, item.CrgID.Integer, item.DepartmentID.Integer);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Update function
|
|
|
|
internal static void Update(TransactionContext tc, CRGDepartmentLookup item)
|
|
{
|
|
tc.ExecuteNonQuery("UPDATE CRGDepartmentLookup SET CrgID=%n, DepartmentID=%n" +
|
|
" WHERE CRGDepartmentLookupID=%n", item.CrgID.Integer,item.DepartmentID.Integer,item.ID.Integer);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Get Function
|
|
|
|
internal static IDataReader Get(TransactionContext tc, ID nID)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM CRGDepartmentLookup WHERE CRGDepartmentLookupID=%n", nID.Integer);
|
|
}
|
|
|
|
internal static IDataReader Get(TransactionContext tc)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM CRGDepartmentLookup");
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Delete function
|
|
|
|
internal static void Delete(TransactionContext tc, ID nID)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM [CRGDepartmentLookup] WHERE CRGDepartmentLookupID=%n", nID.Integer);
|
|
}
|
|
|
|
internal static void Delete(TransactionContext tc)
|
|
{
|
|
tc.ExecuteNonQuery("DELETE FROM [CRGDepartmentLookup] ");
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
}
|