Esempio n. 1
0
        //private void LogChange(int userId, ThingAction action)
        //{
        //    var log = new ThingLog(userId, this.Id);
        //    log.Action = action;
        //    this.History.Add(log);
        //}

        private void LogChange(User user, ThingAction action)
        {
            var log = new ThingLog(user, this);

            log.Action = action;
            this.History.Add(log);
        }
Esempio n. 2
0
 public void Delete(ThingLog log)
 {
     log.Action     = ThingAction.Deleted;
     this.IsDeleted = true;
     this.Status    = ThingStatus.Deleted;
     this.History.Add(log);
 }
Esempio n. 3
0
        public void UpdateStatus(int userId, ThingStatus status)
        {
            var log = new ThingLog(userId, this.Id);

            log.Action  = (status == ThingStatus.Completed) ? ThingAction.Completed : ThingAction.StatusChanged;
            this.Status = status;
            this.History.Add(log);
        }
Esempio n. 4
0
 private void Complete(ThingLog log)
 {
     log.Action  = ThingAction.Completed;
     this.Status = ThingStatus.Completed;
     this.History.Add(log);
 }
Esempio n. 5
0
 //private void LogChange(int userId, ThingAction action)
 //{
 //    var log = new ThingLog(userId, this.Id);
 //    log.Action = action;
 //    this.History.Add(log);
 //}
 private void LogChange(User user, ThingAction action)
 {
     var log = new ThingLog(user, this);
     log.Action = action;
     this.History.Add(log);
 }