66 lines
2.0 KiB
C#
66 lines
2.0 KiB
C#
|
using System.Data;
|
|||
|
using Ease.CoreV35.DataAccess;
|
|||
|
using Ease.CoreV35.Model;
|
|||
|
using Payroll.BO;
|
|||
|
|
|||
|
namespace Payroll.Service
|
|||
|
{
|
|||
|
#region class TrainingScStatusDA
|
|||
|
|
|||
|
internal class TrainingScStatusDA
|
|||
|
{
|
|||
|
#region Insert Function(s)
|
|||
|
|
|||
|
public static void Insert(TransactionContext tc, TrainingScheduleStatus item)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("INSERT INTO TRAININGSCHEDULESTATUS(TRAININGSCHEDULESTATUSID,Name, SEQUENCENO, STATUS, CREATEDBY, CREATIONDATE)" +
|
|||
|
" VALUES(%n, %s, %n, %n, %n, %d)", item.ID.Integer, item.Name, item.Sequence, item.Status, item.CreatedBy.Integer, item.CreatedDate);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Update Function(s)
|
|||
|
|
|||
|
public static void Update(TransactionContext tc, TrainingScheduleStatus item)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("UPDATE TRAININGSCHEDULESTATUS SET Name=%s, SEQUENCENO=%n, status=%n, MODIFIEDBY=%n, MODIFIEDDATE=%d" +
|
|||
|
" WHERE TRAININGSCHEDULESTATUSID=%n", item.Name, item.Sequence, item.Status, item.ModifiedBy.Integer, item.ModifiedDate, item.ID.Integer);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Delete Function(s)
|
|||
|
|
|||
|
public static void Delete(TransactionContext tc, ID id)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("DELETE FROM TRAININGSCHEDULESTATUS WHERE TRAININGSCHEDULESTATUSID=%n", id.Integer);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Get Function(s)
|
|||
|
|
|||
|
public static IDataReader Get(TransactionContext tc)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("SELECT * FROM TRAININGSCHEDULESTATUS");
|
|||
|
}
|
|||
|
|
|||
|
public static IDataReader Get(TransactionContext tc, ID id)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("SELECT * FROM TRAININGSCHEDULESTATUS WHERE TRAININGSCHEDULESTATUSID=%n", id.Integer);
|
|||
|
|
|||
|
}
|
|||
|
public static IDataReader Get(TransactionContext tc, EnumStatus status)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("SELECT * FROM TRAININGSCHEDULESTATUS Where Status=%n Order By SequenceNo", status);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|