WeeklySchedule calender in mvc c#
view is not show true
i want show all day but display day that is class
<div class="row" style="margin-right:15px;width:96%">
<div class="col-lg-12">
<table>
<tr>
<td style="width:150px;text-align:center"><h5> @dayList[i].Name</h5><h5> @dayList[i].DateTime.ConvertMiladiToShamsi("yyyy/MM/dd")</h5></td>
@for (int j = 0; j < clockViewModel.Count; j++)
{
@if (clockViewModel[j].DayId == dayList[i].Id)
{
<td style="text-align:right">
<table>
<tr style="text-align:right">
<td style="text-align:right"><h6>درس :@dayList[i].TermCourse.Course.Title</h6></td>
</tr>
<tr style="text-align:right">
<td style="text-align:right"><h6>شماره کلاس :@dayList[i].TermCourse.AcademyClassRoom.Title </h6></td>
<td style="text-align:right"><h6>شماره کلاس :@dayList[i].TermCourse.AcademyClassRoom.Title </h6></td>
</tr>
<tr style="text-align:right">
<td style="text-align:right">
<h6>
ساعت : @clockViewModel[j].StartTime - @clockViewModel[j].FinishTime
</h6>
</td>
</tr>
</table>
</td>
}
}
</tr>
</table>
</div>
</div>
public IActionResult PrintWeeky(string Id)
{
var termCourse = _uw.BaseRepository<Entities.TermCourse>().FindByConditionAsync(x => x.Id == Id,null, c => c.Course, a => a.AcademyClassRoom, d => d.Days).Result.FirstOrDefault();
var days = _uw.BaseRepository<Entities.Days>().FindByConditionAsync(x => x.TermCourseId == Id, null, c => c.Clocks).Result.OrderBy(x=>x.DateTime).ToList();
ViewBag.DaysList = days;
ViewBag.StartDate = termCourse.StartDate.Value.ToShortDateString();
ViewBag.FinishDate = termCourse.FinishDate.Value.ToShortDateString();
System.DateTime firstDate = new System.DateTime(termCourse.StartDate.Value.Year, termCourse.StartDate.Value.Month, termCourse.StartDate.Value.Day);
System.DateTime secondDate = new System.DateTime(termCourse.FinishDate.Value.Year, termCourse.FinishDate.Value.Month, termCourse.FinishDate.Value.Day);
System.TimeSpan diff = secondDate.Subtract(firstDate);
System.TimeSpan diff1 = secondDate - firstDate;
String diff2 = (secondDate - firstDate).TotalDays.ToString();
ViewBag.DaysCount = diff2;
List<ClockViewModel> clockViewModel = new List<ClockViewModel>();
if (termCourse != null)
{
ViewBag.termCourse = termCourse;
ViewBag.TerCourseId = Id;
ViewBag.Course = termCourse.Course.Title;
ViewBag.CourseCode = termCourse.Course.Code;
ViewBag.PracticalTimeHours = termCourse.Course.TotalPracticalTimeHours;
ViewBag.TTheoryimeHours = termCourse.Course.TotalTTheoryimeHours;
}
for (int j = 0; j < days.Count; j++)
{
var resalt = _uw.ClockRepository.GetAllClockByDaysId(days[j].Id);
for (int i = 0; i < days[j].Clocks.Count; i++)
{
ClockViewModel clock = new ClockViewModel();
clock.DayId = days[j].Id;
clock.DayName = days[j].Name;
clock.StartTime = resalt[i].StartTime;
clock.FinishTime = resalt[i].FinishTime;
clockViewModel.Add(clock);
}
}
ViewBag.clockViewModel = clockViewModel;
return View();
}