FeedAdd() 정적인 개인적인 메소드

static private FeedAdd ( string action, Hour hour ) : void
action string
hour Hour
리턴 void
예제 #1
0
        public static Sprint SprintInsert(Sprint sprint)
        {
            sprint = sprint.Save();

            SourceRepository.SourceAdd(sprint.SprintId, SourceType.Sprint, sprint.Name);

            FeedRepository.FeedAdd(FeedAction.Created, sprint);

            return(sprint);
        }
        public static ProjectUser ProjectUserInsert(ProjectUser projectUser)
        {
            projectUser = projectUser.Save();

            SourceRepository.SourceAdd(projectUser.ProjectUserMemberId, SourceType.ProjectUser, string.Empty);

            FeedRepository.FeedAdd(FeedAction.Created, projectUser);

            return(projectUser);
        }
예제 #3
0
        public static Hour HourInsert(Hour hour)
        {
            hour = hour.Save();

            SourceRepository.SourceAdd(hour.HourId, SourceType.Hour, hour.Date.ToShortDateString());

            FeedRepository.FeedAdd(FeedAction.Created, hour);

            return(hour);
        }
예제 #4
0
        public static Story StoryInsert(Story story)
        {
            story = story.Save();

            SourceRepository.SourceAdd(story.StoryId, SourceType.Story, story.StoryId.ToString());

            FeedRepository.FeedAdd(FeedAction.Created, story);

            return(story);
        }
예제 #5
0
        public static Status StatusInsert(Status status)
        {
            status = status.Save();

            SourceRepository.SourceAdd(status.StatusId, SourceType.Status, status.Name);

            FeedRepository.FeedAdd(FeedAction.Created, status);

            return(status);
        }
예제 #6
0
        public static Note NoteInsert(Note note)
        {
            note = note.Save();

            SourceRepository.SourceAdd(note.NoteId, SourceType.Note, note.Body);

            FeedRepository.FeedAdd(FeedAction.Created, note);

            return(note);
        }
예제 #7
0
        public static bool StatusDelete(Status status)
        {
            Status.DeleteStatus(
                new StatusDataCriteria
            {
                StatusId = status.StatusId
            });

            FeedRepository.FeedAdd(FeedAction.Deleted, status);

            return(true);
        }
예제 #8
0
        public static bool NoteDelete(Note note)
        {
            Note.DeleteNote(
                new NoteDataCriteria
            {
                NoteId = note.NoteId
            });

            FeedRepository.FeedAdd(FeedAction.Deleted, note);

            return(true);
        }
        public static Project ProjectInsert(Project project)
        {
            project = project.Save();

            SourceRepository.SourceAdd(project.ProjectId, SourceType.Project, project.Name);

            FeedRepository.FeedAdd(FeedAction.Created, project);

            ProjectUserRepository.ProjectUserAdd(
                project.ProjectId, ((IBusinessIdentity)Csla.ApplicationContext.User.Identity).UserId, Role.Owner, true);

            return(project);
        }
예제 #10
0
        public static bool SprintDelete(Sprint sprint)
        {
            ProjectUserRepository.AuthorizeProjectUser(sprint.ProjectId);

            Sprint.DeleteSprint(
                new SprintDataCriteria
            {
                SprintId = sprint.SprintId
            });

            FeedRepository.FeedAdd(FeedAction.Deleted, sprint);

            return(true);
        }
예제 #11
0
        public static bool ProjectDelete(Project project)
        {
            ProjectUserRepository.AuthorizeProjectUser(project.ProjectId);

            Project.DeleteProject(
                new ProjectDataCriteria
            {
                ProjectId = project.ProjectId
            });

            FeedRepository.FeedAdd(FeedAction.Deleted, project);

            return(true);
        }
예제 #12
0
        public static bool StoryDelete(Story story)
        {
            ProjectUserRepository.AuthorizeProjectUser(story.ProjectId);

            Story.DeleteStory(
                new StoryDataCriteria
            {
                StoryId = story.StoryId
            });

            FeedRepository.FeedAdd(FeedAction.Deleted, story);

            return(true);
        }
예제 #13
0
        public static bool HourDelete(Hour hour)
        {
            Hour.DeleteHour(
                new HourDataCriteria
            {
                HourId = hour.HourId
            });

            StoryRepository.StoryUpdateDuration(hour.StoryId);

            FeedRepository.FeedAdd(FeedAction.Deleted, hour);

            return(true);
        }
예제 #14
0
        public static Hour HourUpdate(Hour hour)
        {
            if (!hour.IsDirty)
            {
                return(hour);
            }

            hour = hour.Save();

            SourceRepository.SourceUpdate(hour.HourId, SourceType.Hour, hour.Date.ToShortDateString());

            FeedRepository.FeedAdd(FeedAction.Edited, hour);

            return(hour);
        }
        public static ProjectUser ProjectUserUpdate(ProjectUser projectUser)
        {
            if (!projectUser.IsDirty)
            {
                return(projectUser);
            }

            projectUser = projectUser.Save();

            SourceRepository.SourceUpdate(projectUser.ProjectUserMemberId, SourceType.ProjectUser, string.Empty);

            FeedRepository.FeedAdd(FeedAction.Edited, projectUser);

            return(projectUser);
        }
예제 #16
0
        public static Story StoryUpdate(Story story)
        {
            if (!story.IsDirty)
            {
                return(story);
            }

            story = story.Save();

            SourceRepository.SourceUpdate(story.StoryId, SourceType.Story, story.StoryId.ToString());

            FeedRepository.FeedAdd(FeedAction.Edited, story);

            return(story);
        }
예제 #17
0
        public static Sprint SprintUpdate(Sprint sprint)
        {
            if (!sprint.IsDirty)
            {
                return(sprint);
            }

            sprint = sprint.Save();

            SourceRepository.SourceUpdate(sprint.SprintId, SourceType.Sprint, sprint.Name);

            FeedRepository.FeedAdd(FeedAction.Edited, sprint);

            return(sprint);
        }
예제 #18
0
        public static Note NoteUpdate(Note note)
        {
            if (!note.IsDirty)
            {
                return(note);
            }

            note = note.Save();

            SourceRepository.SourceUpdate(note.NoteId, SourceType.Note, note.Body);

            FeedRepository.FeedAdd(FeedAction.Edited, note);

            return(note);
        }
예제 #19
0
        public static Project ProjectUpdate(Project project)
        {
            if (!project.IsDirty)
            {
                return(project);
            }

            ProjectUserRepository.AuthorizeProjectUser(project.ProjectId);

            project = project.Save();

            SourceRepository.SourceUpdate(project.ProjectId, SourceType.Project, project.Name);

            FeedRepository.FeedAdd(FeedAction.Edited, project);

            return(project);
        }
예제 #20
0
        public static Status StatusUpdate(Status status)
        {
            if (!status.IsDirty)
            {
                return(status);
            }

            ProjectUserRepository.AuthorizeProjectUser(status.ProjectId);

            status = status.Save();

            SourceRepository.SourceUpdate(status.StatusId, SourceType.Status, status.Name);

            FeedRepository.FeedAdd(FeedAction.Edited, status);

            return(status);
        }
        public static bool ProjectUserDelete(ProjectUser projectUser)
        {
            ProjectUserRepository.AuthorizeProjectUser(projectUser.ProjectId);

            if (ProjectUserRepository.ProjectUserFetch(
                    projectUser.ProjectId, projectUser.UserId).RoleId == (int)Role.Owner)
            {
                throw new NotSupportedException("You cannot delete the owner of a project");
            }

            ProjectUser.DeleteProjectUser(
                new ProjectUserMemberDataCriteria
            {
                ProjectUserMemberId = projectUser.ProjectUserMemberId
            });

            FeedRepository.FeedAdd(FeedAction.Deleted, projectUser);

            return(true);
        }