Exemple #1
0
        public void AddDia(DayOfWeek day, decimal hour)
        {
            HoraDia days = new HoraDia()
            {
                Dia   = day,
                Horas = hour
            };

            dias.Add(days);
        }
Exemple #2
0
 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;
         }
     }
 }
Exemple #3
0
 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;
 }