55 lines
2.0 KiB
C#
55 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
|
|
{
|
|
internal class HRJoiningQuestionaryDA
|
|
{
|
|
#region Get
|
|
public static IDataReader Get(TransactionContext tc, ID nID)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM HRJoiningQuestionary WHERE QuestionaryID=%n", nID.Integer);
|
|
}
|
|
public static IDataReader Get(TransactionContext tc, EnumStatus status)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM HRJoiningQuestionary");
|
|
}
|
|
public static IDataReader GetByQuestionNo(TransactionContext tc, string sQuesNo)
|
|
{
|
|
return tc.ExecuteReader("SELECT * FROM HRJoiningQuestionary Where QuestionNo=%s",sQuesNo);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Insert
|
|
public static void Insert(TransactionContext tc, HRJoiningQuestionary item)
|
|
{
|
|
tc.ExecuteNonQuery("Insert into HRJoiningQuestionary(QuestionaryID,QuestionIndex,IsPrimary,QuestionNo,Description,AnsDatatype) Values" +
|
|
"(%n,%n,%b,%s,%s,%n)",item.ID.Integer,item.QuestionIndex,item.IsPrimary,item.QuestionNo,item.Description,item.AnsDatatype);
|
|
}
|
|
#endregion
|
|
|
|
#region Update
|
|
public static void Update(TransactionContext tc, HRJoiningQuestionary item)
|
|
{
|
|
tc.ExecuteNonQuery("Update HRJoiningQuestionary Set QuestionIndex = %n,IsPrimary = %b,QuestionNo = %s,Description = %s,AnsDatatype = %n Where QuestionaryID = %n"
|
|
,item.QuestionIndex, item.IsPrimary, item.QuestionNo, item.Description, item.AnsDatatype, item.ID.Integer);
|
|
}
|
|
#endregion
|
|
|
|
#region Delete
|
|
public static void Delete(TransactionContext tc, ID id)
|
|
{
|
|
tc.ExecuteNonQuery("delete from HRJoiningQuestionary where QuestionaryID=%n",id.Integer);
|
|
}
|
|
#endregion
|
|
}
|
|
}
|