Ejemplo n.º 1
0
 private string GetDayNodeText(Holiday h)
 {
     return (h.HoliDate.ToString("yyyy年M月d日") + "," + h.Description);
 }
Ejemplo n.º 2
0
 private void AddHolidays(DateTime[] ts, string[] descs)
 {
     List<Holiday> holidays = new List<Holiday>();
     Holiday holiday = null;
     for (int i = 0; i < ts.Length; i++)
     {
         DateTime key = ts[i];
         if (!this.holidayNodes.Contains(key))
         {
             holiday = new Holiday();
             holiday.HoliDate = key;
             holiday.Description = DateTimeHelper.GetCnDayOfWeek(key);
             if (!(((descs == null) || (descs.Length <= i)) || StringHelper.IsNull(descs[i])))
             {
                 holiday.Description = holiday.Description + "," + descs[i];
             }
             this.currentUnitOfWork.RegisterNew(holiday);
             holidays.Add(holiday);
         }
     }
     if (holidays.Count > 0)
     {
         this.currentUnitOfWork.Commit();
         this.AddHolidayNodes(holidays);
     }
 }