Beispiel #1
0
        public bool ChangeUserStoryState(int id, UserStoryState state)
        {
            using (var access = new AccessDB())
            {
                Log.Info("Enter Change user story state");
                UserStory us = access.UsAction.FirstOrDefault(f => f.Id == id);

                if (us != null)
                {
                    us.UserStoryState = state;

                    int i = access.SaveChanges();

                    if (i > 0)
                    {
                        Log.Info("Successfully changed user story state.");
                        return(true);
                    }
                    else
                    {
                        Log.Warn("Failed to changed user story state.");
                        return(false);
                    }
                }
                else
                {
                    Log.Warn("User story doesn't exists in DB.");
                    return(false);
                }
            }
        }
 public void UpdateUserStoryState(int id, UserStoryState state)
 {
     using (var context = new ProjectManagementContext())
     {
         var userStory = context.UserStories.Find(id);
         userStory.State = state;
         context.SaveChanges();
     }
 }
Beispiel #3
0
 public UserStory(String name, String description, Project project)
 {
     this.name           = name;
     this.project        = project;
     this.description    = description;
     this.progress       = 0;
     this.userStoryState = UserStoryState.New;
     this.tasks          = new List <Task>();
 }
 public bool ChangeUserStoryState(int id, UserStoryState state)
 {
     try
     {
         return(proxy.ChangeUserStoryState(id, state));
     }
     catch (Exception e)
     {
         Console.WriteLine("ERROR: ChangeUserStoryState: \n{0}", e.Message);
         return(false);
     }
 }
Beispiel #5
0
 public bool ChangeUserStoryState(int id, UserStoryState state)
 {
     Log.Info("ChangeUserStoryState...");
     return(UserStoryDB.Instance.ChangeUserStoryState(id, state));
 }