using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.CoreV35; using Ease.CoreV35.Model; using Ease.CoreV35.Caching; using System.Data.Linq.Mapping; namespace Payroll.BO { #region IntigrationSetup [Serializable] public class IntigrationSetup : AuditTrailBase { #region Cache Store private static Cache _cache = new Cache(typeof(IntigrationSetup)); #endregion #region Constructor public IntigrationSetup() { _ReadFilePath = string.Empty; _StoreFilePath = string.Empty; _NotifyEmail = string.Empty; _PassPhrase = string.Empty; _FTPFilePath = string.Empty; _FTPPassword = string.Empty; _PrivateKeyFilePath = string.Empty; _ErrorLogFilePath = string.Empty; _CutOffDay = 0; _FTPUserName = string.Empty; } #endregion #region Properties #region ReadFilePath : string private string _ReadFilePath; public string ReadFilePath { get { return _ReadFilePath; } set { base.OnPropertyChange("ReadFilePath", _ReadFilePath, value); _ReadFilePath = value; } } #endregion #region StoreFilePath : string private string _StoreFilePath; public string StoreFilePath { get { return _StoreFilePath; } set { base.OnPropertyChange("StoreFilePath", _StoreFilePath, value); _StoreFilePath = value; } } #endregion #region NotifyEmail : string private string _NotifyEmail; public string NotifyEmail { get { return _NotifyEmail; } set { base.OnPropertyChange("NotifyEmail", _NotifyEmail, value); _NotifyEmail = value; } } #endregion #region PassPhrase : string private string _PassPhrase; public string PassPhrase { get { return _PassPhrase; } set { base.OnPropertyChange("PassPhrase", _PassPhrase, value); _PassPhrase = value; } } #endregion #region PrivateKeyFilePath : string private string _PrivateKeyFilePath; public string PrivateKeyFilePath { get { return _PrivateKeyFilePath; } set { base.OnPropertyChange("PrivateKeyFilePath", _PrivateKeyFilePath, value); _PrivateKeyFilePath = value; } } #endregion #region ErrorLogFilePath : string private string _ErrorLogFilePath; public string ErrorLogFilePath { get { return _ErrorLogFilePath; } set { base.OnPropertyChange("ErrorLogFilePath", _ErrorLogFilePath, value); _ErrorLogFilePath = value; } } #endregion #region FTPFilePath : string private string _FTPFilePath; public string FTPFilePath { get { return _FTPFilePath; } set { base.OnPropertyChange("FTPFilePath", _FTPFilePath, value); _FTPFilePath = value; } } #endregion #region FTPUserName : string private string _FTPUserName; public string FTPUserName { get { return _FTPUserName; } set { base.OnPropertyChange("FTPUserName", _FTPUserName, value); _FTPUserName = value; } } #endregion #region FTPPassword : string private string _FTPPassword; public string FTPPassword { get { return _FTPPassword; } set { base.OnPropertyChange("FTPPassword", _FTPPassword, value); _FTPPassword = value; } } #endregion #region CutOffDay : Int private int _CutOffDay; public int CutOffDay { get { return _CutOffDay; } set { base.OnPropertyChange("CutOffDay", _CutOffDay, value); _CutOffDay = value; } } #endregion #region Service Factory IIntigrationSetupService : IIntigrationSetupService internal static IIntigrationSetupService Service { get { return Services.Factory.CreateService(typeof(IIntigrationSetupService)); } } #endregion #endregion #region Functions public static IntigrationSetup Get(ID nID) { IntigrationSetup oIntigrationSetup = null; #region Cache Header oIntigrationSetup = (IntigrationSetup)_cache["Get", nID]; if (oIntigrationSetup != null) return oIntigrationSetup; #endregion oIntigrationSetup = IntigrationSetup.Service.Get(nID); #region Cache Footer _cache.Add(oIntigrationSetup, "Get", nID); #endregion return oIntigrationSetup; } public static IntigrationSetup Get() { IntigrationSetup oIntigrationSetup = null; #region Cache Header oIntigrationSetup = (IntigrationSetup)_cache["Get"]; if (oIntigrationSetup != null) return oIntigrationSetup; #endregion oIntigrationSetup = IntigrationSetup.Service.Get(); #region Cache Footer _cache.Add(oIntigrationSetup, "Get"); #endregion return oIntigrationSetup; } public ID Save() { base.SetAuditTrailProperties(); return IntigrationSetup.Service.Save(this); } public void Delete(ID id) { IntigrationSetup.Service.Delete(id); } #endregion } #endregion #region IIntigrationSetup Service public interface IIntigrationSetupService { IntigrationSetup Get(ID id); IntigrationSetup Get(); ID Save(IntigrationSetup item); void Delete(ID id); } #endregion }