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 IntigrationSetupDA internal class IntigrationSetupDA { #region Constructor private IntigrationSetupDA() { } #endregion #region Insert function internal static void Insert(TransactionContext tc, IntigrationSetup item) { tc.ExecuteNonQuery("INSERT INTO IntigrationSetup(IntigrationSetupID, ReadFilePath, StoreFilePath,PrivateKeyFilePath,ErrorLogFilePath, NotifyEmail,PassPhrase,FTPFilePath,FTPPassword,CutOffDay,FTPUserName)" + " VALUES(%n, %s, %s,%s,%s,%s,%s,%s,%s,%n,%s)", item.ID.Integer, item.ReadFilePath, item.StoreFilePath,item.PrivateKeyFilePath,item.ErrorLogFilePath, item.NotifyEmail, item.PassPhrase, item.FTPFilePath, item.FTPPassword, item.CutOffDay, item.FTPUserName); } #endregion #region Update function internal static void Update(TransactionContext tc, IntigrationSetup item) { tc.ExecuteNonQuery("UPDATE IntigrationSetup SET ReadFilePath=%s, StoreFilePath=%s,PrivateKeyFilePath=%s,ErrorLogFilePath=%s, NotifyEmail=%s,PassPhrase=%s,FTPFilePath=%s,FTPPassword=%s,CutOffDay=%n,FTPUserName=%s" + " WHERE IntigrationSetupID=%n", item.ReadFilePath, item.StoreFilePath,item.PrivateKeyFilePath,item.ErrorLogFilePath, item.NotifyEmail,item.PassPhrase,item.FTPFilePath,item.FTPPassword,item.CutOffDay,item.FTPUserName,item.ID.Integer); } #endregion #region Get Function internal static IDataReader Get(TransactionContext tc) { return tc.ExecuteReader("SELECT * FROM IntigrationSetup"); } internal static IDataReader Get(TransactionContext tc, ID nID) { return tc.ExecuteReader("SELECT * FROM IntigrationSetup WHERE IntigrationSetupID=%n", nID.Integer); } #endregion #region Delete function internal static void Delete(TransactionContext tc, ID nID) { tc.ExecuteNonQuery("DELETE FROM [IntigrationSetup] WHERE IntigrationSetupID=%n", nID.Integer); } #endregion } #endregion }