create rollcall transction add workshop name
This commit is contained in:
@@ -877,6 +877,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
rollcallServiceList.Where(x => workshops.Contains(x.WorkshopId)).ToList();
|
||||
if (rollcallServiceList.Count > 0)
|
||||
{
|
||||
|
||||
foreach (var rollCallService in srvices)
|
||||
{
|
||||
//var spaning = (int)(endOfMonthGr - rollCallService.StartService).TotalDays + 1;
|
||||
@@ -889,21 +890,22 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
var monthCurrent = endOfMonth.Substring(5, 2);
|
||||
var yearCurrent = endOfMonth.Substring(0, 4);
|
||||
var currentMonthName = monthCurrent.ToFarsiMonthByNumber();
|
||||
|
||||
var workshop = _context.Workshops.FirstOrDefault(x => x.id == rollCallService.WorkshopId);
|
||||
|
||||
string description = "";
|
||||
if (rollCallService.StartService <= prevMonthStart)
|
||||
{
|
||||
var monthPrev = prevMonthEnd.ToFarsi().Substring(5, 2);
|
||||
var yearPrev = prevMonthEnd.ToFarsi().Substring(0, 4);
|
||||
var prevMonthName = monthPrev.ToFarsiMonthByNumber();
|
||||
description = $"{prevMonthName} و {currentMonthName} {yearCurrent}";
|
||||
description = $"{prevMonthName} و {currentMonthName} {yearCurrent} - {workshop.WorkshopFullName}";
|
||||
monthCounter = 2;
|
||||
}else if (rollCallService.StartService <= currentMonthStart &&
|
||||
rollCallService.StartService > prevMonthStart)
|
||||
{
|
||||
monthCounter = 1;
|
||||
|
||||
description = $"{currentMonthName} {yearCurrent}";
|
||||
description = $"{currentMonthName} {yearCurrent} - {workshop.WorkshopFullName}";
|
||||
}
|
||||
|
||||
|
||||
@@ -916,7 +918,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
|
||||
if (employeeCount > 0 && monthCounter > 0)
|
||||
{
|
||||
var workshop = _context.Workshops.FirstOrDefault(x => x.id == rollCallService.WorkshopId);
|
||||
|
||||
counter++;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user