InsuranceJobItem Change
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
namespace CompanyManagment.App.Contracts.DateSalary;
|
||||
using System;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.DateSalary;
|
||||
|
||||
public class DateSalaryViewModel
|
||||
{
|
||||
@@ -7,4 +9,6 @@ public class DateSalaryViewModel
|
||||
public string Month { get; set; }
|
||||
public string StartDateFa { get; set; }
|
||||
public string EndDateFa { get; set; }
|
||||
public DateTime StartDateGr { get; set; }
|
||||
public DateTime EndDateGr { get; set; }
|
||||
}
|
||||
@@ -43,6 +43,9 @@ public class DateSalaryRepository : RepositoryBase<long, DateSalary>, IDateSalar
|
||||
Year = x.Year,
|
||||
StartDateFa = x.StartDateFa,
|
||||
EndDateFa = x.EndDateFa,
|
||||
StartDateGr = x.StartDateGr,
|
||||
EndDateGr = x.EndDateGr
|
||||
|
||||
});
|
||||
var list = query.OrderByDescending(x => x.Id).ToList();
|
||||
|
||||
@@ -51,7 +54,7 @@ public class DateSalaryRepository : RepositoryBase<long, DateSalary>, IDateSalar
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.Month))
|
||||
list = list.Where(x => x.Year == searchModel.Month).OrderByDescending(x => x.Year).ToList();
|
||||
return list;
|
||||
return list.OrderByDescending(x=>x.StartDateGr).ToList();
|
||||
}
|
||||
public DateSalaryViewModel GetDateSalaryViewModel(DateSalarySearchModel searchModel)
|
||||
{
|
||||
|
||||
@@ -195,7 +195,7 @@ public class InsuranceJobRepository : RepositoryBase<long, InsuranceJob>, IInsur
|
||||
EndDate = x.EndDate,
|
||||
|
||||
|
||||
});
|
||||
}).OrderByDescending(x=>x.StartDate);
|
||||
|
||||
return res.Select(x => (x.Id, $"{(x.StartDate.HasValue ? x.StartDate.Value.ToFarsi() : "نامشخص")} - {(x.EndDate.HasValue ? x.EndDate.Value.ToFarsi() : "نامشخص")}")).ToList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user