diff --git a/CompanyManagment.EFCore/Repository/RewardRepository.cs b/CompanyManagment.EFCore/Repository/RewardRepository.cs index 1e78eb05..cfecb44f 100644 --- a/CompanyManagment.EFCore/Repository/RewardRepository.cs +++ b/CompanyManagment.EFCore/Repository/RewardRepository.cs @@ -50,7 +50,7 @@ public class RewardRepository : RepositoryBase, IRewardRepository Title = x.Title, Amount = x.Amount, CreationDate = x.CreationDate, - Description = x.Description, + Description = x.Description??"", GrantDateFa = x.GrantDateFa, EmployeeFullName = employees.FirstOrDefault(e => e.id == x.EmployeeId).FullName, Id = x.Id, @@ -203,7 +203,7 @@ public class RewardRepository : RepositoryBase, IRewardRepository WorkshopId = x.WorkshopId, Amount = x.Amount.ToMoney(), AmountDouble = x.Amount, - Description = x.Description, + Description = x.Description??"", EmployeeFullName = employees.FirstOrDefault(e => e.id == x.EmployeeId).FullName, EmployeeId = x.EmployeeId, GrantDateFa = x.GrantDate.ToFarsi(), diff --git a/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs b/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs index 2f290277..7b8b4a79 100644 --- a/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs +++ b/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs @@ -72,7 +72,12 @@ public class RollCallEmployeeRepository : RepositoryBase EmployeeLName = x.LName, EmployeeFullName = x.EmployeeFullName, IsActiveString = x.IsActiveString, - HasUploadedImage = x.HasUploadedImage + HasUploadedImage = x.HasUploadedImage, + Statuses = x.EmployeesStatus.Select(x => new RollCallEmployeeStatusViewModel() + { + StartDateGr = x.StartDate, + EndDateGr = x.EndDate + }) }).FirstOrDefault(); }