StoryUpdate() public static method

public static StoryUpdate ( Story story ) : Story
story Story
return Story
示例#1
0
        public static void StoryUpdateDuration(int storyId)
        {
            var story = StoryRepository.StoryFetch(storyId);
            var hour  = HourRepository.HourFetchInfoList(story);

            story.Duration = hour.Sum(row => row.Duration);

            StoryRepository.StoryUpdate(story);
        }
示例#2
0
        public static Story StorySave(Story story)
        {
            if (!story.IsValid)
            {
                return(story);
            }

            ProjectUserRepository.AuthorizeProjectUser(story.ProjectId);

            Story result;

            if (story.IsNew)
            {
                result = StoryRepository.StoryInsert(story);
            }
            else
            {
                result = StoryRepository.StoryUpdate(story);
            }

            return(result);
        }