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); } }
public bool AddDay(Dia dia) { Dias.Add(dia); return(true); }