using System; using System.Collections.Generic; namespace HRM.BO { #region SchedularSetup public class SchedularSetup : BasicBaseObject { #region Constructor public SchedularSetup() { Title = string.Empty; MailBody = string.Empty; MailSubject = string.Empty; ToEmailAddress = new List(); Type = EnumSchedularType.None; ReportFormat = EnumSchedularReportFormat.None; _startAt = DateTime.MinValue; } #endregion #region Properties public string Title { get; set; } public string MailBody { get; set; } public string MailSubject { get; set; } public List ToEmailAddress { get; set; } public EnumSchedularType Type { get; set; } public EnumSchedularReportFormat ReportFormat { get; set; } public DateTime? LastExecuteDateTime { get; set; } public string Remarks { get; set; } public bool IsCCLM { get; set; } public bool IsCCCordinator { get; set; } public bool IsCCDeptHead { get; set; } public List OnErrorMail { get; set; } public List OtherEmailCC { get; set; } private DateTime _startAt; public DateTime StartAt { get { return new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, _startAt.Hour, _startAt.Minute, _startAt.Second); } set { _startAt = value; } } #endregion } #endregion #region MailNotificationHistory message public class MailNotificationHistory { public string? EmployeeNo { get; set; } public EnumSchedularType NotificationType { get; set; } public string Description { get; set; } public bool Status { get; set; } public string Email { get; set; } public DateTime SentTime { get; set; } public DateTime? LastUpdate { get; set; } public MailNotificationHistory(string pEmpNo, EnumSchedularType pNotificationType) { EmployeeNo = pEmpNo; NotificationType = pNotificationType; Description = "Successfully Sent"; Status = true; this.LastUpdate = null; } public MailNotificationHistory() { Status = false; LastUpdate = DateTime.Now; } } #endregion #region ILeave Service public interface ISchedularSetupService { List Get(EnumStatus status, EnumSchedularType Type, DateTime fromDate, DateTime toDate); SchedularSetup Get(int id); List Get(); List Get(EnumStatus status); int Save(SchedularSetup oLeave); void Delete(int id); void SaveMailHistory(List pMailNotificationHistory); } #endregion }