87 lines
2.9 KiB
C#
87 lines
2.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Ease.Core.DataAccess;
|
|
using Ease.Core.Model;
|
|
using Ease.Core.Utility;
|
|
|
|
namespace HRM.BO.Basic
|
|
{
|
|
public class HrNotification : BasicBaseObject
|
|
{
|
|
public HrNotification()
|
|
{
|
|
this.Status = EnumStatus.Active;
|
|
IsSendToAll = true;
|
|
}
|
|
public DateTime EntryDate { get; set; }
|
|
public string NotificationText { get; set; }
|
|
public string NotificationTextDetail { get; set; }
|
|
public DateTime PublishDate { get; set; }
|
|
public DateTime? PublishEndDate { get; set; }
|
|
public bool ShowAsNewDays { get; set; }
|
|
public int TotalNewDays { get; set; }
|
|
public EnumHrNotificationType NotificationType { get; set; }
|
|
public string NotificationUrl { get; set; }
|
|
public bool IsSendToAll { get; set; }
|
|
public int PayrollTypeID { get; set; }
|
|
|
|
#region For Attachment
|
|
public byte[]? FileAsByteArray { get; set; }
|
|
public string? OriginalFileName { get; set; }
|
|
public EnumFileType? FileType { get; set; }
|
|
public string? FileToBase64
|
|
{
|
|
get
|
|
{
|
|
if (FileAsByteArray != null)
|
|
return Convert.ToBase64String(FileAsByteArray);
|
|
return null;
|
|
}
|
|
}
|
|
public string? FileDataBase64
|
|
{
|
|
set
|
|
{
|
|
if (!string.IsNullOrEmpty(value))
|
|
FileAsByteArray = Convert.FromBase64String(value);
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
public List<HrNotificationEmployee> HrNotificationEmployees { get; set; }
|
|
|
|
}
|
|
public class HrNotificationEmployee : BasicBaseObject
|
|
{
|
|
public int HrNotificationId { get; set; }
|
|
public int EmployeeId { get; set; }
|
|
public string EmployeeNo { get; set; } = "";
|
|
public string Name { get; set; } = "";
|
|
public string Department { get; set; } = "";
|
|
public string Designation { get; set; } = "";
|
|
public EnumHrNotificationType NotificationType { get; set; }
|
|
|
|
}
|
|
|
|
public interface IHrNotificationService
|
|
{
|
|
List<HrNotification> GetAll();
|
|
List<HrNotification> GetAllNew();
|
|
List<HrNotification> GetAllNew(int PayrollTypeID);
|
|
List<HrNotification> GetForEmployee(int payrollTypeID, int employeeID);
|
|
HrNotification Get(int id);
|
|
int Save(HrNotification hrNotification);
|
|
void Delete(int id);
|
|
public void UploadHallOfFame(HallOfFame item);
|
|
public DataTable GetHallOfFame();
|
|
public DataTable GetLegalTracking();
|
|
public void DeleteHallOfFame(int Id);
|
|
public void DeleteLegalTracking(int Id);
|
|
public void SaveLegalTracking(int legalTrackingID, string name, string shortDescription, string detailDescription, string nextAction, string nextActionDescription, DateTime fromDate, DateTime toDate, DateTime nextNotificationDate, int currentUserId);
|
|
}
|
|
}
|