using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.CoreV35.DataAccess; using System.Data; using HRM.BO; using Ease.Core.DataAccess; namespace HRM.DA { #region AutoWorkPlanDA internal class AutoWorkPlanDA { #region Constructor private AutoWorkPlanDA() { } #endregion #region Insert function internal static void Insert(TransactionContext tc, AutoWorkPlan item) { tc.ExecuteNonQuery( "INSERT INTO AutoWorkPlan(AutoWorkPlanID, EmployeeID, ShiftID, StartDate, CreatedBy, CreatedDate)" + " VALUES(%n, %n, %n, %d, %n, %d)", item.ID, item.EmployeeID, item.ShiftID, item.StartDate, item.CreatedBy, item.CreatedDate); } #endregion #region Update function internal static void Update(TransactionContext tc, AutoWorkPlan item) { tc.ExecuteNonQuery( "UPDATE AutoWorkPlan SET EmployeeID=%n, ShiftID=%n, StartDate=%d, ModifiedBy=%n, ModifiedDate=%d" + " WHERE AutoWorkPlanID=%n", item.EmployeeID, item.ShiftID, item.StartDate, item.ModifiedBy, item.ModifiedDate, item.ID); } #endregion #region Get Function internal static IDataReader Get(TransactionContext tc) { return tc.ExecuteReader("SELECT * FROM AutoWorkPlan"); } internal static IDataReader Get(TransactionContext tc, int nID) { return tc.ExecuteReader("SELECT * FROM AutoWorkPlan WHERE AutoWorkPlanID=%n", nID); } #endregion #region Delete function internal static void Delete(TransactionContext tc, int nID) { tc.ExecuteNonQuery("DELETE FROM AutoWorkPlan WHERE AutoWorkPlanID=%n", nID); } #endregion } #endregion }