示例#1
0
 public void AddDAY(Dia dia)
 {
     if (CurrentMonth == null)
     {
         CurrentMonth = dia.Mes;
         CurrentMes   = new Mes()
         {
             Dias = new List <Dia>(),
             Name = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(dia.Mes)
         };
     }
     if (CurrentMonth.Value == dia.Mes)
     {
         CurrentMes.AddDay(dia);
     }
     else
     {
         diastomar.Add(CurrentMes);
         CurrentMonth = dia.Mes;
         CurrentMes   = new Mes()
         {
             Dias = new List <Dia>(),
             Name = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(dia.Mes)
         };
         CurrentMes.AddDay(dia);
     }
 }
示例#2
0
 public bool AddDay(Dia dia)
 {
     Dias.Add(dia);
     return(true);
 }