SourceUpdate() public static method

public static SourceUpdate ( ISource source ) : Source
source ISource
return Source
Example #1
0
        public static Filter FilterUpdate(Filter filter)
        {
            if (!filter.IsDirty)
            {
                return(filter);
            }

            filter = filter.Save();

            SourceRepository.SourceUpdate(filter.FilterId, SourceType.Filter, filter.Name);

            return(filter);
        }
Example #2
0
        private static User UserUpdate(User user)
        {
            if (!user.IsDirty)
            {
                return(user);
            }

            user = user.Save();

            SourceRepository.SourceUpdate(user.UserId, SourceType.User, user.Name);

            return(user);
        }
Example #3
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);
        }
        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);
        }
Example #5
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);
        }
Example #6
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);
        }
        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);
        }
Example #8
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 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);
        }
        public static Source SourceSave(Source source)
        {
            if (!source.IsValid)
            {
                return(source);
            }

            Source result;

            if (source.IsNew)
            {
                result = SourceRepository.SourceInsert(source);
            }
            else
            {
                result = SourceRepository.SourceUpdate(source);
            }

            return(result);
        }
 public static Source SourceUpdate(ISource source)
 {
     return(SourceRepository.SourceUpdate(source.SourceId, source.SourceType, source.SourceName));
 }