public TimeSheet(int DayInt, ISchedule schedule) { this._schedule = schedule; _positioncache = new Dictionary <int, long>(); _positioncachecounter = 0; this.FileName = FileNameGenerator.GetTimeFileName(DayInt); this.DayInt = DayInt; this.FullFileName = FileNameGenerator.GetTimeFullFileName(DayInt, schedule); if (!File.Exists(this.FullFileName)) { int currentday = DateTime.Now.DayToInt(); if (DayInt >= currentday) { Create(); } } }
public static bool isExists(int DayInt, ISchedule schedule) { return(File.Exists(FileNameGenerator.GetTimeFullFileName(DayInt, schedule))); }