예제 #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);
        }
예제 #2
0
 public void Delete(ThingLog log)
 {
     log.Action     = ThingAction.Deleted;
     this.IsDeleted = true;
     this.Status    = ThingStatus.Deleted;
     this.History.Add(log);
 }
예제 #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);
        }
예제 #4
0
 private void Complete(ThingLog log)
 {
     log.Action  = ThingAction.Completed;
     this.Status = ThingStatus.Completed;
     this.History.Add(log);
 }
예제 #5
0
파일: Thing.cs 프로젝트: azlicn/TeamThing
 //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);
 }