public void AddDia(DayOfWeek day, decimal hour) { HoraDia days = new HoraDia() { Dia = day, Horas = hour }; dias.Add(days); }
public void CheckHorasTrabalho() { foreach (DateTime dt in diaTrabalho) { HoraDia hd = dias.Find(horaDia => horaDia.Dia == dt.DayOfWeek); if (dt.DayOfWeek == hd.Dia) { int month = dt.Month - 1; diaMensal[month] += dt.Day + ", "; horarioMensal[month] += (int)hd.Horas; } } }
public string StringifyDiaTrabalho() { string aux = ""; foreach (DateTime s in horaSemana.diaTrabalho) { HoraDia hd = horaSemana.dias.Find(horaDia => horaDia.Dia == s.DayOfWeek); if (s.DayOfWeek == hd.Dia) { for (int i = 0; i < hd.Horas; i++) { aux += s.ToShortDateString(); aux += "\n"; } } } return aux; }