| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.Linq;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- using Comal.Classes;
 
- using InABox.Core;
 
- namespace Comal.Stores
 
- {
 
-     internal class LeaveRequestStore : BaseStore<LeaveRequest>
 
-     {
 
-  
 
-         protected override void OnSave(LeaveRequest entity, ref string auditnote)
 
-         {
 
-             base.OnSave(entity, ref auditnote);
 
-             if (entity.HasOriginalValue(c => c.Status))
 
-                 NotifyEmployee(
 
-                     entity,
 
-                     x => x.EmployeeLink.ID,
 
-                     e => e.HasOriginalValue(x => x.Status),
 
-                     e => string.Format("Leave Request {0}", e.Status),
 
-                     e =>
 
-                     {
 
-                         var sb = new StringBuilder();
 
-                         sb.AppendLine(string.Format(
 
-                             "Your Leave Request submitted {0:dd MMM yyy} for {1:dd MMM yy} - {2:dd MMM yy} has changed from {3} to {4}.",
 
-                             e.Created,
 
-                             e.From,
 
-                             e.To,
 
-                             e.GetOriginalValue(c => c.Status),
 
-                             e.Status
 
-                         ));
 
-                         if (!string.IsNullOrWhiteSpace(e.StatusNotes))
 
-                             sb.AppendLine(string.Format("\nNotes:\n{0}", e.StatusNotes?.Trim()));
 
-                         return sb.ToString();
 
-                     }
 
-                 );
 
-         }
 
-     }
 
- }
 
 
  |