Esempio n. 1
0
        public DetailStoryViewModel()
        {
            //temp drit
            UserStory = new Story();
            UserStory.Description = "Random description. blablablablablablabla. blablalbllalblalbal";
            UserStory.Title = "Random Title";

            User tempUser = new User();
            tempUser.UserName = "******";
            tempUser.RealName = "Hans Petter Naumann";
            UserStory.Author = tempUser;
            UserStory.CreatedDate = DateTime.Now;

            Comment c1 = new Comment();
            c1.Author = tempUser;
            c1.Text = "random comment. blabla";
            c1.TimeStamp = DateTime.Now;

            Comment c2 = new Comment();
            c2.Author = tempUser;
            c2.Text = "random comment number 2. blabla";
            c2.TimeStamp = DateTime.Now;

            UserStory.Comments.Add(c1);
            UserStory.Comments.Add(c2);
            UserStory.Assignee = tempUser;
        }
Esempio n. 2
0
        public void SaveUserStory(string title, string description, double priority)
        {
            var story = new Story();
            story.Title = title;
            story.Description = description;
            story.Priority = (int) priority;
            story.Author = DataStructure.CurrentUser;
            story.CreatedDate = DateTime.Now;
            story.State = StoryStates.Unassigned;

            if (DataStructure.CurrentProject != null)
            {
                DataStructure.CurrentProject.StoryQueue.Add(story);
            }
        }