예제 #1
0
 public bool Delete(Activity activity)
 {
     if (activity == null)
         return false;
     this.dbContext.Activities.Remove(activity);
     int result = dbContext.SaveChanges();
     return result > 0;
 }
예제 #2
0
        public void LogProjectCreation(Project project)
        {
            Activity act = new Activity();
            act.ProjectId = project.Id;
            act.Who = project.Creator;
            act.When = DateTime.Now;
            act.Type = ActivityType.Create | ActivityType.Project;
            repoActivity.Create(act);

            notifyProjectCreation(project);
        }
예제 #3
0
        public void LogFileCreation(ProjectFile file)
        {
            Activity act = new Activity();
            act.FileId = file.Id;
            act.ProjectId = file.ProjectId;
            act.Who = file.Creator;
            act.When = DateTime.Now;
            act.Type = ActivityType.Create | ActivityType.File;
            repoActivity.Create(act);

            notifyFileCreation(file);
        }
예제 #4
0
        public void LogCommentCreation(Comment newComment)
        {
            Activity act = new Activity();
            act.Who = newComment.Creator;
            act.CommentId = newComment.Id;
            act.ProjectId = newComment.ProjectId;
            act.FileId = newComment.FileId;
            act.When = DateTime.Now;
            act.Type = ActivityType.Create | ActivityType.Comment;
            repoActivity.Create(act);

            notifyCommentCreation(newComment);
        }
예제 #5
0
 public bool Create(Activity activity)
 {
     dbContext.Activities.Add(activity);
     int result = dbContext.SaveChanges();
     return (result > 0);
 }