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 PhotoPathDA internal class PhotoPathDA { #region Constructor private PhotoPathDA() { } #endregion #region Insert function internal static void Insert(TransactionContext tc, PhotoPath item) { tc.ExecuteNonQuery("INSERT INTO PhotoPath(PathID, EmployeePhoto, EmployeeSignature, NomineePhoto, NomineeSignature, HospitalizationPhoto,LetterTempPath,ERRSFilePath,TrainingOutlinePath)" + " VALUES(%n,%s, %s, %s, %s, %s,%s,%s,%s)", item.ID.Integer, item.EmployeePhoto, item.EmployeeSignature, item.NomineePhoto, item.NomineeSignature, item.HospitalizationPhoto,item.LetterTempPath,item.ERRSFilePath,item.TrainingOutlinePath); } #endregion #region Update function internal static void Update(TransactionContext tc, PhotoPath item) { tc.ExecuteNonQuery("UPDATE PhotoPath SET EmployeePhoto=%s, EmployeeSignature=%s, NomineePhoto=%s, NomineeSignature=%s, HospitalizationPhoto=%s,LetterTempPath=%s,ERRSFilePath=%s,TrainingOutlinePath=%s" + " WHERE PathID=%n", item.EmployeePhoto, item.EmployeeSignature, item.NomineePhoto, item.NomineeSignature, item.HospitalizationPhoto,item.LetterTempPath,item.ERRSFilePath,item.TrainingOutlinePath, item.ID.Integer); } #endregion #region Get Function internal static IDataReader Get(TransactionContext tc) { return tc.ExecuteReader("SELECT * FROM PhotoPath"); } internal static IDataReader Get(TransactionContext tc, ID nID) { return tc.ExecuteReader("SELECT * FROM PhotoPath WHERE PathID=%n", nID.Integer); } #endregion #region Delete function internal static void Delete(TransactionContext tc, ID nID) { tc.ExecuteNonQuery("DELETE FROM [PhotoPath] WHERE PathID=%n", nID.Integer); } #endregion } #endregion }