示例#1
0
        private static void CreateTestProject(PROGRESSTRACKERContext context)
        {
            Ptproject project = new Ptproject
            {
                Name        = "Test Project",
                Description = "This is a test project",
                Ptuser      = context.Ptuser.First(),
                Status      = ProjectStatus.None.ToString(),
                Active      = true
            };

            context.Ptproject.Add(project);
            context.SaveChanges();

            Pttask task = new Pttask
            {
                Description = "First Task",
                PtprojectId = project.Id,
                Completed   = false,
                Active      = true
            };

            context.Pttask.Add(task);
            context.SaveChanges();
        }
 public ProjectViewModel(Ptproject project)
 {
     Project = project;
     SetProgress();
     SetStatus();
     ReOrderTaskList();
 }