72 lines
2.1 KiB
C#
72 lines
2.1 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using Payroll.BO;
|
|||
|
using System.Data;
|
|||
|
using Ease.CoreV35.Model;
|
|||
|
using System.Data.SqlClient;
|
|||
|
using Ease.CoreV35.DataAccess;
|
|||
|
|
|||
|
namespace Payroll.Service
|
|||
|
{
|
|||
|
internal class SurveyEmployeeDA
|
|||
|
{
|
|||
|
#region Constructor
|
|||
|
|
|||
|
private SurveyEmployeeDA() { }
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Insert function
|
|||
|
|
|||
|
|
|||
|
internal static void Insert(TransactionContext tc, SurveyEmployee item)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("INSERT INTO SurveyEmployee(SurveyID, EmployeeID)" +
|
|||
|
" VALUES(%n, %n)", item.SurveyID.Integer, item.EmployeeID);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Update function
|
|||
|
|
|||
|
internal static void Update(TransactionContext tc, SurveyEmployee item)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("UPDATE SurveyEmployee SET EmployeeID=%n" +
|
|||
|
" WHERE SurveyID=%n", item.EmployeeID, item.SurveyID.Integer);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Get Function
|
|||
|
|
|||
|
public static IDataReader GetSurveyEmployee(TransactionContext tc, int nSurveyId)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("SELECT * FROM SurveyEmployee WHERE SurveyId=%n", nSurveyId);
|
|||
|
}
|
|||
|
public static IDataReader GetSurveyEmployee(TransactionContext tc)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("SELECT * FROM SurveyEmployee");
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
public static void UpdateSurveyEmployee(TransactionContext tc, SurveyEmployee oItem)
|
|||
|
{
|
|||
|
//tc.ExecuteNonQuery("UPDATE SurveyEmployee SET AssessmentDate=%d WHERE SurveyId=%n" +
|
|||
|
//" and EmployeeId=%n", DataReader.GetNullValue(oItem.AssessmentDate), oItem.SurveyId, oItem.EmployeeId);
|
|||
|
}
|
|||
|
#region Delete function
|
|||
|
|
|||
|
internal static void Delete(TransactionContext tc, ID nID)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("DELETE FROM [SurveyEmployee] WHERE SurveyID=%n", nID.Integer);
|
|||
|
}
|
|||
|
public static void DeleteSurveyEmployee(TransactionContext tc, int nSurveyId)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("DELETE FROM [SurveyEmployee] WHERE SurveyId=%n", nSurveyId);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|