Exemple #1
0
        private void StopRecord()
        {
            TaskRecordModel record = _records.Last();

            record.StopTime = DateTime.Now;
            record.Save();
        }
Exemple #2
0
        private void StartRecord()
        {
            TaskRecordModel record = _records.Create();

            record.StartTime = DateTime.Now;
            record.Bind(Id, _records);
            record.Save();
        }
Exemple #3
0
 public void Close()
 {
     if (CanClose)
     {
         TaskRecordModel record = _records.LastOrDefault();
         if (record != null && !record.IsStopped)
         {
             StopRecord();
         }
         State = TaskState.Closed;
         Save();
     }
 }