Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Data.Entity.Validation;
- using System.Data.Entity;
- using PMES.Models.Domain.Common;
- using PMES.Models.Domain.Districo;
- using PMES.Models.Domain.Game;
- using PMES.Models.Domain.Newport;
- using PMES.Infrastructure;
- namespace PMES.Models.DAL
- {
- public class ProjectManagementInitializer : DropCreateDatabaseIfModelChanges<ProjectManagementContext>
- {
- private void GenerateDb(ProjectManagementContext context)
- {
- SkillType HS = new SkillType("HS", "Hard Skill");
- context.SkillTypes.Add(HS);
- SkillType NS = new SkillType("NS", "NPC Soft Skill");
- context.SkillTypes.Add(NS);
- SkillType RE = new SkillType("RE", "Resistance");
- context.SkillTypes.Add(RE);
- SkillType SS = new SkillType("SS", "Soft Skill");
- context.SkillTypes.Add(SS);
- Branche branche;
- branche = new Branche() { Name = "Branch - Barcelona" };
- context.Branches.Add(branche);
- branche = new Branche() { Name = "Branch - Hong-Kong" };
- context.Branches.Add(branche);
- branche = new Branche() { Name = "Branch - NewPort" };
- context.Branches.Add(branche);
- DocumentType dt1 = new DocumentType() { Name = "email" };
- context.DocumentTypes.Add(dt1);
- DocumentType dt2 = new DocumentType() { Name = "voicemail" };
- context.DocumentTypes.Add(dt2);
- DocumentType dt3 = new DocumentType() { Name = "document" };
- context.DocumentTypes.Add(dt3);
- DocumentType dt4 = new DocumentType() { Name = "attachment" };
- context.DocumentTypes.Add(dt4);
- DocumentType dt5 = new DocumentType() { Name = "convmm" };
- context.DocumentTypes.Add(dt5);
- Department department1 = new Department() { Name = "NP (NewPort) Branch", LevelAscending = "", LevelHqRelationship = "" };
- context.Departments.Add(department1);
- Department department2 = new Department()
- {
- Name = "HQ Corporate Projects Office",
- LevelAscending = "",
- LevelHqRelationship = ""
- };
- context.Departments.Add(department2);
- Department department3 = new Department()
- {
- Name = "HQ Corporate Finance Dpt",
- LevelAscending = "",
- LevelHqRelationship = ""
- };
- context.Departments.Add(department3);
- Department department4 = new Department()
- {
- Name = "NP Facilities & Maintenance",
- LevelAscending = "",
- LevelHqRelationship = ""
- };
- context.Departments.Add(department4);
- Department department5 = new Department()
- {
- Name = "NP Local Administration",
- LevelAscending = "",
- LevelHqRelationship = ""
- };
- context.Departments.Add(department5);
- Department department6 = new Department() { Name = "NP Local Sales", LevelAscending = "", LevelHqRelationship = "" };
- context.Departments.Add(department6);
- Department department7 = new Department()
- {
- Name = "NP Distribution Operations",
- LevelAscending = "",
- LevelHqRelationship = ""
- };
- context.Departments.Add(department7);
- Department department8 = new Department()
- {
- Name = "NP Distribution Services",
- LevelAscending = "",
- LevelHqRelationship = ""
- };
- context.Departments.Add(department8);
- Department department9 = new Department()
- {
- Name = "HQ Project & Program Delivery",
- LevelAscending = "",
- LevelHqRelationship = ""
- };
- context.Departments.Add(department9);
- SupconStarRating rating1 = new SupconStarRating()
- {
- SupconStarCategory = "S1",
- Description = "\"Does what is promised\"",
- FactorWorkloadActuals = 50,
- FactorDurationActuals = 50,
- Weight = 1
- };
- context.SupconStarRatings.Add(rating1);
- SupconStarRating rating2 = new SupconStarRating()
- {
- SupconStarCategory = "S1",
- Description = "\"Does what is promised.\"",
- FactorWorkloadActuals = 75,
- FactorDurationActuals = 75,
- Weight = 1
- };
- context.SupconStarRatings.Add(rating2);
- SupconStarRating rating3 = new SupconStarRating()
- {
- SupconStarCategory = "S1",
- Description = "\"Does what is promised.\"",
- FactorWorkloadActuals = 100,
- FactorDurationActuals = 100,
- Weight = 1
- };
- context.SupconStarRatings.Add(rating3);
- SupconStarRating rating4 = new SupconStarRating()
- {
- SupconStarCategory = "S2",
- Description = "\"Delivers on time.\"",
- FactorWorkloadActuals = 75,
- FactorDurationActuals = 75,
- Weight = 2
- };
- context.SupconStarRatings.Add(rating4);
- SupconStarRating rating5 = new SupconStarRating()
- {
- SupconStarCategory = "S2",
- Description = "\"Delivers on time.\"",
- FactorWorkloadActuals = 100,
- FactorDurationActuals = 100,
- Weight = 2
- };
- context.SupconStarRatings.Add(rating5);
- SupconStarRating rating6 = new SupconStarRating()
- {
- SupconStarCategory = "S2",
- Description = "\"Delivers on time.\"",
- FactorWorkloadActuals = 115,
- FactorDurationActuals = 115,
- Weight = 2
- };
- context.SupconStarRatings.Add(rating6);
- SupconStarRating rating7 = new SupconStarRating()
- {
- SupconStarCategory = "S3",
- Description = "\"Well equiped.\"",
- FactorWorkloadActuals = 100,
- FactorDurationActuals = 100,
- Weight = 1
- };
- context.SupconStarRatings.Add(rating7);
- SupconStarRating rating8 = new SupconStarRating()
- {
- SupconStarCategory = "S3",
- Description = "\"Well equiped.\"",
- FactorWorkloadActuals = 100,
- FactorDurationActuals = 100,
- Weight = 1
- };
- context.SupconStarRatings.Add(rating8);
- SupconStarRating rating9 = new SupconStarRating()
- {
- SupconStarCategory = "S3",
- Description = "\"Well equiped.\"",
- FactorWorkloadActuals = 100,
- FactorDurationActuals = 100,
- Weight = 1
- };
- context.SupconStarRatings.Add(rating9);
- SupconStarRating rating10 = new SupconStarRating()
- {
- SupconStarCategory = "S4",
- Description = "\"Competent workers.\"",
- FactorWorkloadActuals = 75,
- FactorDurationActuals = 75,
- Weight = 3
- };
- context.SupconStarRatings.Add(rating10);
- SupconStarRating rating12 = new SupconStarRating()
- {
- SupconStarCategory = "S4",
- Description = "\"Competent workers.\"",
- FactorWorkloadActuals = 100,
- FactorDurationActuals = 100,
- Weight = 3
- };
- context.SupconStarRatings.Add(rating12);
- SupconStarRating rating13 = new SupconStarRating()
- {
- SupconStarCategory = "S4",
- Description = "\"Competent workers.\"",
- FactorWorkloadActuals = 115,
- FactorDurationActuals = 115,
- Weight = 3
- };
- context.SupconStarRatings.Add(rating13);
- SupconStarRating rating14 = new SupconStarRating()
- {
- SupconStarCategory = "S5",
- Description = "\"Past client satisfaction.\"",
- FactorWorkloadActuals = 100,
- FactorDurationActuals = 100,
- Weight = 3
- };
- context.SupconStarRatings.Add(rating14);
- SupconStarRating rating15 = new SupconStarRating()
- {
- SupconStarCategory = "S5",
- Description = "\"Past client satisfaction.\"",
- FactorWorkloadActuals = 100,
- FactorDurationActuals = 100,
- Weight = 3
- };
- context.SupconStarRatings.Add(rating15);
- SupconStarRating rating16 = new SupconStarRating()
- {
- SupconStarCategory = "S5",
- Description = "\"Past client satisfaction.\"",
- FactorWorkloadActuals = 100,
- FactorDurationActuals = 100,
- Weight = 3
- };
- context.SupconStarRatings.Add(rating16);
- Business business1 = new Business() { Name = "Districo" };
- context.Businesses.Add(business1);
- business1.AddSupconStarRating(rating3);
- business1.AddSupconStarRating(rating5);
- business1.AddSupconStarRating(rating9);
- business1.AddSupconStarRating(rating13);
- business1.AddSupconStarRating(rating15);
- Business business2 = new Business() { Name = "SupCon Ltd" };
- context.Businesses.Add(business2);
- business2.AddSupconStarRating(rating3);
- business2.AddSupconStarRating(rating6);
- business2.AddSupconStarRating(rating9);
- business2.AddSupconStarRating(rating13);
- business2.AddSupconStarRating(rating16);
- Business business3 = new Business() { Name = "testPURCHASE" };
- context.Businesses.Add(business3);
- business3.AddSupconStarRating(rating3);
- business3.AddSupconStarRating(rating6);
- business3.AddSupconStarRating(rating9);
- business3.AddSupconStarRating(rating13);
- business3.AddSupconStarRating(rating16);
- Business business4 = new Business() { Name = "Constract Ltd" };
- context.Businesses.Add(business4);
- business4.AddSupconStarRating(rating2);
- business4.AddSupconStarRating(rating5);
- business4.AddSupconStarRating(rating9);
- business4.AddSupconStarRating(rating13);
- business4.AddSupconStarRating(rating15);
- Business business5 = new Business() { Name = "Construct Yourself Discounter" };
- context.Businesses.Add(business5);
- business5.AddSupconStarRating(rating1);
- business5.AddSupconStarRating(rating4);
- business5.AddSupconStarRating(rating9);
- business5.AddSupconStarRating(rating12);
- business5.AddSupconStarRating(rating15);
- Business business6 = new Business() { Name = "WASUP, Amir" };
- context.Businesses.Add(business6);
- business6.AddSupconStarRating(rating1);
- business6.AddSupconStarRating(rating4);
- business6.AddSupconStarRating(rating9);
- business6.AddSupconStarRating(rating10);
- business6.AddSupconStarRating(rating15);
- Business business7 = new Business() { Name = "Floors & Doors" };
- context.Businesses.Add(business7);
- business7.AddSupconStarRating(rating3);
- business7.AddSupconStarRating(rating6);
- business7.AddSupconStarRating(rating7);
- business7.AddSupconStarRating(rating13);
- business7.AddSupconStarRating(rating15);
- Business business9 = new Business() { Name = "Tradelux" };
- context.Businesses.Add(business9);
- business9.AddSupconStarRating(rating2);
- business9.AddSupconStarRating(rating6);
- business9.AddSupconStarRating(rating9);
- business9.AddSupconStarRating(rating13);
- business9.AddSupconStarRating(rating16);
- Business business10 = new Business() { Name = "EduWarezz" };
- context.Businesses.Add(business10);
- business10.AddSupconStarRating(rating3);
- business10.AddSupconStarRating(rating5);
- business10.AddSupconStarRating(rating9);
- business10.AddSupconStarRating(rating12);
- business10.AddSupconStarRating(rating16);
- Business business11 = new Business() { Name = "Flash à GoGo" };
- context.Businesses.Add(business11);
- business11.AddSupconStarRating(rating3);
- business11.AddSupconStarRating(rating5);
- business11.AddSupconStarRating(rating9);
- business11.AddSupconStarRating(rating12);
- business11.AddSupconStarRating(rating16);
- Business business12 = new Business() { Name = "ImmO" };
- context.Businesses.Add(business12);
- business12.AddSupconStarRating(rating3);
- business12.AddSupconStarRating(rating5);
- business12.AddSupconStarRating(rating9);
- business12.AddSupconStarRating(rating13);
- business12.AddSupconStarRating(rating16);
- Business business13 = new Business() { Name = "NewPort Cleaning Group Ltd" };
- context.Businesses.Add(business13);
- business13.AddSupconStarRating(rating2);
- business13.AddSupconStarRating(rating6);
- business13.AddSupconStarRating(rating9);
- business13.AddSupconStarRating(rating13);
- business13.AddSupconStarRating(rating15);
- Business business14 = new Business() { Name = "Rudi's Furniture & Decoration Shop" };
- context.Businesses.Add(business14);
- business14.AddSupconStarRating(rating2);
- business14.AddSupconStarRating(rating6);
- business14.AddSupconStarRating(rating9);
- business14.AddSupconStarRating(rating12);
- business14.AddSupconStarRating(rating16);
- Business business15 = new Business() { Name = "TemPeople" };
- context.Businesses.Add(business15);
- business15.AddSupconStarRating(rating3);
- business15.AddSupconStarRating(rating6);
- business15.AddSupconStarRating(rating9);
- business15.AddSupconStarRating(rating13);
- business15.AddSupconStarRating(rating15);
- Business business16 = new Business() { Name = "The Component Store" };
- context.Businesses.Add(business16);
- business16.AddSupconStarRating(rating1);
- business16.AddSupconStarRating(rating4);
- business16.AddSupconStarRating(rating8);
- business16.AddSupconStarRating(rating13);
- business16.AddSupconStarRating(rating15);
- Business business17 = new Business() { Name = "The Old Sailor" };
- context.Businesses.Add(business17);
- business17.AddSupconStarRating(rating1);
- business17.AddSupconStarRating(rating6);
- business17.AddSupconStarRating(rating8);
- business17.AddSupconStarRating(rating10);
- business17.AddSupconStarRating(rating14);
- Business business18 = new Business() { Name = "The Sniffer" };
- context.Businesses.Add(business18);
- business18.AddSupconStarRating(rating3);
- business18.AddSupconStarRating(rating6);
- business18.AddSupconStarRating(rating9);
- business18.AddSupconStarRating(rating13);
- business18.AddSupconStarRating(rating16);
- TeamRole teamrole1 = new TeamRole() { Name = "Builder" };
- context.TeamRoles.Add(teamrole1);
- TeamRole teamrole2 = new TeamRole() { Name = "Plasterer" };
- context.TeamRoles.Add(teamrole2);
- TeamRole teamrole3 = new TeamRole() { Name = "Floorer" };
- context.TeamRoles.Add(teamrole3);
- TeamRole teamrole4 = new TeamRole() { Name = "Staff" };
- context.TeamRoles.Add(teamrole4);
- TeamRole teamrole5 = new TeamRole() { Name = "Decorator" };
- context.TeamRoles.Add(teamrole5);
- TeamRole teamrole6 = new TeamRole() { Name = "Painter" };
- context.TeamRoles.Add(teamrole6);
- TeamRole teamrole7 = new TeamRole() { Name = "Laborer" };
- context.TeamRoles.Add(teamrole7);
- TeamRole teamrole8 = new TeamRole() { Name = "Electrician" };
- context.TeamRoles.Add(teamrole8);
- TeamRole teamrole9 = new TeamRole() { Name = "PC Engineer" };
- context.TeamRoles.Add(teamrole9);
- TeamRole teamrole10 = new TeamRole() { Name = "Network Service Engineer" };
- context.TeamRoles.Add(teamrole10);
- TeamRole teamrole11 = new TeamRole() { Name = "Cleaner" };
- context.TeamRoles.Add(teamrole11);
- context.SaveChanges();
- RealizationTask rr;
- rr = new RealizationTask()
- {
- Name = "Breaking Walls",
- MeasurementUnit = "m²",
- StandardReferenceDuration = 2.00M,
- StandardReferenceWorkload = 2.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole1);
- rr = new RealizationTask()
- {
- Name = "Constructing Walls",
- MeasurementUnit = "m²",
- StandardReferenceDuration = 4.00M,
- StandardReferenceWorkload = 4.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole1);
- rr = new RealizationTask()
- {
- Name = "Plastering Walls",
- MeasurementUnit = "m²",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole2);
- rr = new RealizationTask()
- {
- Name = "Plastering Ceiling",
- MeasurementUnit = "m²",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole2);
- rr.AddTeamRole(teamrole3);
- rr = new RealizationTask()
- {
- Name = "Flooring",
- MeasurementUnit = "m²",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole1);
- rr.AddTeamRole(teamrole3);
- rr.AddTeamRole(teamrole5);
- rr = new RealizationTask()
- {
- Name = "Installing Windows & Doors",
- MeasurementUnit = "item",
- StandardReferenceDuration = 2.00M,
- StandardReferenceWorkload = 2.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole1);
- rr = new RealizationTask()
- {
- Name = "Painting Walls (1 layer)",
- MeasurementUnit = "m²",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole5);
- rr.AddTeamRole(teamrole6);
- rr = new RealizationTask()
- {
- Name = "Painting Ceiling (1 layer)",
- MeasurementUnit = "m²",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole5);
- rr.AddTeamRole(teamrole6);
- rr = new RealizationTask()
- {
- Name = "Installing chair",
- MeasurementUnit = "item",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole5);
- rr.AddTeamRole(teamrole7);
- rr = new RealizationTask()
- {
- Name = "Installing Desk",
- MeasurementUnit = "item",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole5);
- rr.AddTeamRole(teamrole7);
- rr = new RealizationTask()
- {
- Name = "Installing Closet",
- MeasurementUnit = "item",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole5);
- rr.AddTeamRole(teamrole7);
- rr = new RealizationTask()
- {
- Name = "Installing Project Screen or White Board",
- MeasurementUnit = "item",
- StandardReferenceDuration = 2.00M,
- StandardReferenceWorkload = 2.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole1);
- rr.AddTeamRole(teamrole5);
- rr = new RealizationTask()
- {
- Name = "Installing Lights",
- MeasurementUnit = "item",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole8);
- rr = new RealizationTask()
- {
- Name = "Installing Blinds",
- MeasurementUnit = "item",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole5);
- rr = new RealizationTask()
- {
- Name = "Installing Accessory",
- MeasurementUnit = "item",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole5);
- rr = new RealizationTask()
- {
- Name = "Installing Computers",
- MeasurementUnit = "item",
- StandardReferenceDuration = 4.00M,
- StandardReferenceWorkload = 4.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole9);
- rr.AddTeamRole(teamrole10);
- rr = new RealizationTask()
- {
- Name = "Installing Beamer",
- MeasurementUnit = "item",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole10);
- rr = new RealizationTask()
- {
- Name = "Cleaning-up roughly",
- MeasurementUnit = "m²",
- StandardReferenceDuration = 1.00M,
- StandardReferenceWorkload = 1.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole7);
- rr.AddTeamRole(teamrole11);
- rr = new RealizationTask()
- {
- Name = "Cleaning-up (fine cleaning)",
- MeasurementUnit = "m²",
- StandardReferenceDuration = 2.00M,
- StandardReferenceWorkload = 2.00M,
- MaterialCost = 0.00M
- };
- context.RealizationTasks.Add(rr);
- rr.AddTeamRole(teamrole5);
- rr.AddTeamRole(teamrole7);
- rr.AddTeamRole(teamrole11);
- SkillCategory NSIC = new SkillCategory() { Name = "Increment for Credibility", SkillType = NS, Code = "NSIC" };
- context.SkillCategories.Add(NSIC);
- SkillCategory NSIE = new SkillCategory() { Name = "Increment for Experience", SkillType = NS, Code = "NSIE" };
- context.SkillCategories.Add(NSIE);
- SkillCategory NSIL = new SkillCategory() { Name = "Increment for leadership", SkillType = NS, Code = "NSIL" };
- context.SkillCategories.Add(NSIL);
- SkillCategory NSIP = new SkillCategory()
- {
- Name = "Increment for Project Management Expertise",
- SkillType = NS,
- Code = "NSIP"
- };
- context.SkillCategories.Add(NSIP);
- SkillCategory NSIS = new SkillCategory() { Name = "Increment for Soft Skills", SkillType = NS, Code = "NSIS" };
- context.SkillCategories.Add(NSIS);
- SkillCategory NSIT = new SkillCategory() { Name = "Increment for Technical Expertise", SkillType = NS, Code = "NSIT" };
- context.SkillCategories.Add(NSIT);
- SkillCategory NSIW = new SkillCategory() { Name = "Increment for Team work", SkillType = NS, Code = "NSIW" };
- context.SkillCategories.Add(NSIW);
- SkillCategory REAN = new SkillCategory() { Name = "Antagonism", SkillType = RE, Code = "REAN" };
- context.SkillCategories.Add(REAN);
- SkillCategory RESY = new SkillCategory() { Name = "Synergy", SkillType = RE, Code = "RESY" };
- context.SkillCategories.Add(RESY);
- SkillCategory SHCM = new SkillCategory() { Name = "Communication", SkillType = HS, Code = "SHCM" };
- context.SkillCategories.Add(SHCM);
- SkillCategory SHCO = new SkillCategory() { Name = "Cost", SkillType = HS, Code = "SHCO" };
- context.SkillCategories.Add(SHCO);
- SkillCategory SHHR = new SkillCategory() { Name = "Human Resource", SkillType = HS, Code = "SHHR" };
- context.SkillCategories.Add(SHHR);
- SkillCategory SHIN = new SkillCategory() { Name = "Integration", SkillType = HS, Code = "SHIN" };
- context.SkillCategories.Add(SHIN);
- SkillCategory SHPR = new SkillCategory() { Name = "Procurement", SkillType = HS, Code = "SHPR" };
- context.SkillCategories.Add(SHPR);
- SkillCategory SHQU = new SkillCategory() { Name = "Quality", SkillType = HS, Code = "SHQU" };
- context.SkillCategories.Add(SHQU);
- SkillCategory SHRI = new SkillCategory() { Name = "Risk", SkillType = HS, Code = "SHRI" };
- context.SkillCategories.Add(SHRI);
- SkillCategory SHSC = new SkillCategory() { Name = "Scope", SkillType = HS, Code = "SHSC" };
- context.SkillCategories.Add(SHSC);
- SkillCategory SHTI = new SkillCategory() { Name = "Time", SkillType = HS, Code = "SHTI" };
- context.SkillCategories.Add(SHTI);
- SkillCategory SSCR = new SkillCategory() { Name = "Credibility", SkillType = SS, Code = "SSCR" };
- context.SkillCategories.Add(SSCR);
- SkillCategory SSEX = new SkillCategory() { Name = "Experience", SkillType = SS, Code = "SSEX" };
- context.SkillCategories.Add(SSEX);
- SSEX.AddLevel(0, 5, 150, 25, 150, 25);
- SSEX.AddLevel(1, 5, 125, 50, 125, 50);
- SSEX.AddLevel(2, 5, 100, 75, 100, 75);
- SSEX.AddLevel(3, 5, 75, 100, 75, 100);
- SSEX.AddLevel(4, 5, 50, 125, 50, 125);
- SSEX.AddLevel(5, 5, 25, 150, 25, 150);
- SkillCategory SSLS = new SkillCategory() { Name = "Leadership", SkillType = SS, Code = "SSLS" };
- context.SkillCategories.Add(SSLS);
- SkillCategory SSPE = new SkillCategory() { Name = "Project Management Expertise", SkillType = SS, Code = "SSPE" };
- context.SkillCategories.Add(SSPE);
- SkillCategory SSSS = new SkillCategory() { Name = "Soft Skills", SkillType = SS, Code = "SSSS" };
- context.SkillCategories.Add(SSSS);
- SkillCategory SSTE = new SkillCategory() { Name = "Technical Expertise", SkillType = SS, Code = "SSTE" };
- context.SkillCategories.Add(SSTE);
- SkillCategory SSTW = new SkillCategory() { Name = "Team Work", SkillType = SS, Code = "SSTW" };
- context.SkillCategories.Add(SSTW);
- Function function1 = new Function()
- {
- Title = "Branch Manager",
- Description = null,
- StandardCostpricePerHour = 300.00M,
- TeamRole = teamrole4
- };
- context.Functions.Add(function1);
- Function function2 = new Function()
- {
- Title = "Senior Project Manager",
- Description = null,
- StandardCostpricePerHour = 150.00M,
- TeamRole = teamrole4
- };
- context.Functions.Add(function2);
- Function function3 = new Function()
- {
- Title = "Districo Laborer",
- Description = null,
- StandardCostpricePerHour = 75.00M,
- TeamRole = teamrole7
- };
- context.Functions.Add(function3);
- Function function4 = new Function()
- {
- Title = "Executive Assistant",
- Description = null,
- StandardCostpricePerHour = 35.00M,
- TeamRole = teamrole4
- };
- context.Functions.Add(function4);
- Function function5 = new Function()
- {
- Title = "Chief Financial Officer",
- Description = null,
- StandardCostpricePerHour = 300.00M,
- TeamRole = teamrole4
- };
- context.Functions.Add(function5);
- Function function6 = new Function()
- {
- Title = "Branch Sales Manager",
- Description = null,
- StandardCostpricePerHour = 200.00M,
- TeamRole = teamrole4
- };
- context.Functions.Add(function6);
- Function function7 = new Function()
- {
- Title = "Branch Operations Manager",
- Description = null,
- StandardCostpricePerHour = 200.00M,
- TeamRole = teamrole4
- };
- context.Functions.Add(function7);
- Function function8 = new Function()
- {
- Title = "Branch Services Manager",
- Description = null,
- StandardCostpricePerHour = 200.00M,
- TeamRole = teamrole4
- };
- context.Functions.Add(function8);
- Function function9 = new Function()
- {
- Title = "P&P Manager",
- Description = null,
- StandardCostpricePerHour = 200.00M,
- TeamRole = teamrole4
- };
- context.Functions.Add(function9);
- Function function10 = new Function()
- {
- Title = "Methodology Coach",
- Description = null,
- StandardCostpricePerHour = 100.00M,
- TeamRole = teamrole4
- };
- context.Functions.Add(function10);
- Stakeholder sth1 = new Stakeholder()
- {
- Name = "BROOCK",
- FirstName = "Will",
- History = "Ecellent worker",
- PhotoFileName = "Will_Broock.jpg",
- Business = business1,
- Department = department1,
- Function = function1,
- AvailabilityPercentageForProject = 5,
- AvailabilityPercentageForCompany = 100
- };
- context.Stakeholders.Add(sth1);
- Stakeholder sth2 = new Stakeholder()
- {
- Name = "FOERT",
- FirstName = "Frank",
- History = "Great dude",
- PhotoFileName = "Frank_Foert.jpg",
- Business = business1,
- Department = department2,
- Function = function2,
- AvailabilityPercentageForProject = 10,
- AvailabilityPercentageForCompany = 100
- };
- context.Stakeholders.Add(sth2);
- Stakeholder sth3 = new Stakeholder()
- {
- Name = "COVER",
- FirstName = "Al",
- History = "Looks like Al Capone",
- PhotoFileName = "Al_Cover.jpg",
- Business = business1,
- Department = department4,
- Function = function3,
- AvailabilityPercentageForProject = 100,
- AvailabilityPercentageForCompany = 100
- };
- context.Stakeholders.Add(sth3);
- Stakeholder sth4 = new Stakeholder()
- {
- Name = "BURN",
- FirstName = "Lizz",
- History = "Workaholic",
- PhotoFileName = "Lizz_Burn.jpg",
- Business = business1,
- Department = department1,
- Function = function4,
- AvailabilityPercentageForProject = 25,
- AvailabilityPercentageForCompany = 100
- };
- context.Stakeholders.Add(sth4);
- Stakeholder sth5 = new Stakeholder()
- {
- Name = "ROLLE",
- FirstName = "Catherine",
- History = null,
- PhotoFileName = "Empty.png",
- Business = business1,
- Department = department3,
- Function = function5,
- AvailabilityPercentageForProject = 10,
- AvailabilityPercentageForCompany = 100
- };
- context.Stakeholders.Add(sth5);
- Stakeholder sth6 = new Stakeholder()
- {
- Name = "RIBODIE",
- FirstName = "Eve",
- History = null,
- PhotoFileName = "Empty.png",
- Business = business1,
- Department = department6,
- Function = function6,
- AvailabilityPercentageForProject = 1,
- AvailabilityPercentageForCompany = 100
- };
- context.Stakeholders.Add(sth6);
- Stakeholder sth7 = new Stakeholder()
- {
- Name = "HENT",
- FirstName = "George",
- History = null,
- PhotoFileName = "Empty.png",
- Business = business1,
- Department = department7,
- Function = function7,
- AvailabilityPercentageForProject = 1,
- AvailabilityPercentageForCompany = 100
- };
- context.Stakeholders.Add(sth7);
- Stakeholder sth8 = new Stakeholder()
- {
- Name = "BODIT",
- FirstName = "Annie",
- History = null,
- PhotoFileName = "Empty.png",
- Business = business1,
- Department = department8,
- Function = function8,
- AvailabilityPercentageForProject = 1,
- AvailabilityPercentageForCompany = 100
- };
- context.Stakeholders.Add(sth8);
- Stakeholder sth9 = new Stakeholder()
- {
- Name = "BORROW",
- FirstName = "Peter",
- History = null,
- PhotoFileName = "Empty.png",
- Business = business1,
- Department = department2,
- Function = function9,
- AvailabilityPercentageForProject = 10,
- AvailabilityPercentageForCompany = 100
- };
- context.Stakeholders.Add(sth9);
- Stakeholder sth10 = new Stakeholder()
- {
- Name = "LIANO",
- FirstName = "Gall",
- History = null,
- PhotoFileName = "Empty.png",
- Business = business1,
- Department = department2,
- Function = function10,
- AvailabilityPercentageForProject = 1,
- AvailabilityPercentageForCompany = 80
- };
- context.Stakeholders.Add(sth10);
- context.SaveChanges();
- Period period1 = new Period()
- {
- Description = "Period 01",
- EndDay = 14,
- EndMonth = 8,
- FactorEstimateAccuracy = 13,
- Name = "Period 01",
- StartDay = 1,
- StartMonth = 8
- };
- context.Periods.Add(period1);
- Event event1 = period1.AddEvent("Welcome to Districo!",
- "You are welcomed by Will Broock, the project sponsor. Will will take the opportunity to introduce you to the different project stakeholders. You will also get the opportunity to talk to 3 of them individually.",
- "ES", 4.00M, 1.00M, 3, "Welcome!", 3, 8, sth1);
- Event event2 = period1.AddEvent("Appropriate Questioning",
- "You get the opportunity to ask a maximum of 4 additional questions. Will Broock will provide you immediately with an answer.",
- "ET", 0.00M, 1.00M, 4, "", null, null, sth1);
- Event event3 = period1.AddEvent("How many and which templates do you need?",
- "Mss. LIANO has been instructed by Mr. BORROW to take contact and to offer you a selection of maximum 10 templates to be used during the project. These 10 templates will be prepared by the Methodology Department and made ready for the project. ",
- "ES", 2.00M, 1.00M, 10, "FW: Project Documentation", 9, 8, sth10);
- context.SaveChanges();
- Period period2 = new Period()
- {
- Description = "Period 02",
- EndDay = 28,
- EndMonth = 8,
- FactorEstimateAccuracy = 7,
- Name = "Period 02",
- StartDay = 15,
- StartMonth = 8
- };
- context.Periods.Add(period2);
- Event event4 = period2.AddEvent("Chartering the project",
- "Frank sits at his desk, sees the protagonist and calls him/her: “Hey YOU! Are you already being the super zealot of management… Will contacted me and instructed me to provide you with some project information. Well here is a useful document. Success...",
- "ES", 1.00M, 1.00M, 1, "You Zealot!", 8, 17, sth2);
- Event event7 = period2.AddEvent("Politeness Please!",
- "The following reactions to Frank's attitude can be given:", "ET", 1.00M,
- 1.00M, 1, "None", null, null, sth2);
- context.SaveChanges();
- Period period3 = new Period()
- {
- Description = "Period 03",
- EndDay = 11,
- EndMonth = 9,
- FactorEstimateAccuracy = 8,
- Name = "Period 03",
- StartDay = 29,
- StartMonth = 8
- };
- context.Periods.Add(period3);
- Event event6 = period3.AddEvent("Obtain the project charter",
- "The protagonist receives a correct project charter", "EI", 0.00M, 0.00M, 0,
- "Requested document", 9, 3, sth2);
- context.SaveChanges();
- context.SaveChanges();
- ManagementAction ma1 = new ManagementAction()
- {
- Name = "Perform Lessons Learned",
- Budget = 0.00M,
- Conversation = false,
- DefaultLock = true,
- Duration = 1.00M,
- EndPeriod = period1,
- Estimates = false,
- RequiredNewportCompany = false,
- RequiredNpc = true,
- RequiredRealizationTask = false,
- StartPeriod = period3,
- WorkloadPlayer = 4.00M,
- WorkloadNpc = 4.00M
- };
- context.ManagementActions.Add(ma1);
- ManagementAction ma2 = new ManagementAction()
- {
- Name = "Buy yourself a technical managzine",
- Budget = 50.00M,
- Conversation = false,
- DefaultLock = false,
- Duration = 0.00M,
- EndPeriod = period2,
- Estimates = false,
- RequiredNewportCompany = false,
- RequiredNpc = false,
- RequiredRealizationTask = false,
- StartPeriod = period3,
- WorkloadPlayer = 1.00M,
- WorkloadNpc = 0.00M
- };
- context.ManagementActions.Add(ma2);
- ManagementAction ma3 = new ManagementAction()
- {
- Name = "Buy a technical magazine for",
- Budget = 50.00M,
- Conversation = false,
- DefaultLock = false,
- Duration = 0.00M,
- EndPeriod = period2,
- Estimates = false,
- RequiredNewportCompany = false,
- RequiredNpc = true,
- RequiredRealizationTask = false,
- StartPeriod = period3,
- WorkloadPlayer = 1.00M,
- WorkloadNpc = 0.00M
- };
- context.ManagementActions.Add(ma3);
- ManagementAction ma4 = new ManagementAction()
- {
- Name = "Invite somebody to the Old Sailor",
- Budget = 20.00M,
- Conversation = true,
- DefaultLock = false,
- Duration = 0.50M,
- EndPeriod = period1,
- Estimates = false,
- RequiredNewportCompany = false,
- RequiredNpc = true,
- RequiredRealizationTask = false,
- StartPeriod = period3,
- WorkloadPlayer = 2.00M,
- WorkloadNpc = 2.00M
- };
- context.ManagementActions.Add(ma4);
- ManagementAction ma5 = new ManagementAction()
- {
- Name = "Invite somebody to Flash à GoGo",
- Budget = 50.00M,
- Conversation = true,
- DefaultLock = false,
- Duration = 0.50M,
- EndPeriod = period1,
- Estimates = false,
- RequiredNewportCompany = false,
- RequiredNpc = true,
- RequiredRealizationTask = false,
- StartPeriod = period3,
- WorkloadPlayer = 3.00M,
- WorkloadNpc = 3.00M
- };
- context.ManagementActions.Add(ma5);
- ManagementAction ma6 = new ManagementAction()
- {
- Name = "Invite somebody to The Sniffer",
- Budget = 150.00M,
- Conversation = true,
- DefaultLock = false,
- Duration = 0.50M,
- EndPeriod = period1,
- Estimates = false,
- RequiredNewportCompany = false,
- RequiredNpc = true,
- RequiredRealizationTask = false,
- StartPeriod = period3,
- WorkloadPlayer = 4.00M,
- WorkloadNpc = 4.00M
- };
- context.ManagementActions.Add(ma6);
- ManagementAction ma7 = new ManagementAction()
- {
- Name = "Coach Team Member on Soft-Skills",
- Budget = 0.00M,
- Conversation = false,
- DefaultLock = false,
- Duration = 1.00M,
- EndPeriod = period2,
- Estimates = false,
- RequiredNewportCompany = false,
- RequiredNpc = true,
- RequiredRealizationTask = false,
- StartPeriod = period3,
- WorkloadPlayer = 4.00M,
- WorkloadNpc = 8.00M
- };
- context.ManagementActions.Add(ma7);
- ManagementAction ma8 = new ManagementAction()
- {
- Name = "Coach Team Member on Project Management",
- Budget = 0.00M,
- Conversation = false,
- DefaultLock = false,
- Duration = 1.00M,
- EndPeriod = period2,
- Estimates = false,
- RequiredNewportCompany = false,
- RequiredNpc = true,
- RequiredRealizationTask = false,
- StartPeriod = period3,
- WorkloadPlayer = 4.00M,
- WorkloadNpc = 8.00M
- };
- context.ManagementActions.Add(ma8);
- ManagementAction ma9 = new ManagementAction()
- {
- Name = "Ask estimates",
- Budget = 0.00M,
- Conversation = false,
- DefaultLock = false,
- Duration = 1.00M,
- EndPeriod = period1,
- Estimates = true,
- RequiredNewportCompany = false,
- RequiredNpc = true,
- RequiredRealizationTask = true,
- StartPeriod = period3,
- WorkloadPlayer = 0.50M,
- WorkloadNpc = 1.00M
- };
- context.ManagementActions.Add(ma9);
- ManagementAction ma10 = new ManagementAction()
- {
- Name = "Ask actual workload on a performed realization task",
- Budget = 0.00M,
- Conversation = false,
- DefaultLock = false,
- Duration = 0.50M,
- EndPeriod = period2,
- Estimates = false,
- RequiredNewportCompany = false,
- RequiredNpc = true,
- RequiredRealizationTask = true,
- StartPeriod = period3,
- WorkloadPlayer = 0.50M,
- WorkloadNpc = 0.50M
- };
- context.ManagementActions.Add(ma10);
- context.SaveChanges();
- EventDecisionDetail edd;
- event1.AddEventDecisionDetail(1, "Talk to Will again.", true, event2, null, false, 1.00M, 0.00M, 0.00M, null,
- null);
- EventDecisionDetail edd1 = event1.GetBySeqNbr(1);
- edd1.AddSkill(SHCO, 1.00M);
- edd1.AddSkill(SSSS, 0.33M);
- context.SaveChanges();
- event1.AddEventDecisionDetail(2, "Talk to Frank Foert", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
- null);
- EventDecisionDetail edd2 = event1.GetBySeqNbr(2);
- edd2.AddSkill(SHCO, 1.00M);
- edd2.AddSkill(SSSS, 0.33M);
- context.SaveChanges();
- event1.AddEventDecisionDetail(3, "Talk to Al Cover", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
- null);
- EventDecisionDetail edd3 = event1.GetBySeqNbr(3);
- edd3.AddSkill(SSSS, 0.33M);
- edd3.AddSkill(SHCO, 0.50M);
- context.SaveChanges();
- event1.AddEventDecisionDetail(4, "Talk to Lizz Burn", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
- null);
- EventDecisionDetail edd4 = event1.GetBySeqNbr(4);
- edd4.AddSkill(SSSS, 0.33M);
- edd4.AddSkill(SHCO, 0.50M);
- context.SaveChanges();
- event1.AddEventDecisionDetail(5, "Talk to Catherine Rolle", true, null, null, false, 1.00M, 0.00M, 0.00M,
- null, null);
- EventDecisionDetail edd5 = event1.GetBySeqNbr(5);
- edd5.AddSkill(SHCO, 1.00M);
- edd5.AddSkill(SSSS, 0.33M);
- context.SaveChanges();
- event1.AddEventDecisionDetail(6, "Talk to Eve Ribodie", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
- null);
- EventDecisionDetail edd6 = event1.GetBySeqNbr(6);
- edd6.AddSkill(SHCO, 0.50M);
- edd6.AddSkill(SSSS, 0.33M);
- context.SaveChanges();
- event1.AddEventDecisionDetail(7, "Talk to George Ent", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
- null);
- EventDecisionDetail edd7 = event1.GetBySeqNbr(7);
- edd7.AddSkill(SHCO, 0.50M);
- edd7.AddSkill(SSSS, 0.33M);
- context.SaveChanges();
- event1.AddEventDecisionDetail(8, "Talk to Annie Bodit", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
- null);
- EventDecisionDetail edd8 = event1.GetBySeqNbr(8);
- edd8.AddSkill(SHCO, 0.50M);
- edd8.AddSkill(SSSS, 0.33M);
- context.SaveChanges();
- context.SaveChanges();
- event1.AddSkill(SHCO, 3.00M);
- event1.AddSkill(SSSS, 1.00M);
- event2.AddEventDecisionDetail(1,
- "Can you please tell me more about the safety instructions for construction projects?",
- true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
- EventDecisionDetail edd9 = event2.GetBySeqNbr(1);
- context.SaveChanges();
- event2.AddEventDecisionDetail(2, "Is it possible to indicate me how you see the painting works?", true, null,
- null, false, 1.00M, 0.00M, 0.00M, null, null);
- EventDecisionDetail edd10 = event2.GetBySeqNbr(2);
- context.SaveChanges();
- event2.AddEventDecisionDetail(3,
- "Would you be able to indicate to me your priorities on the triple constraint?",
- true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
- EventDecisionDetail edd11 = event2.GetBySeqNbr(3);
- context.SaveChanges();
- event2.AddEventDecisionDetail(4, "Could you provide me insight in the specific ICT requirements?", true,
- null, null, false, 1.00M, 0.00M, 0.00M, null, null);
- EventDecisionDetail edd12 = event2.GetBySeqNbr(4);
- context.SaveChanges();
- event2.AddEventDecisionDetail(5,
- "You probably worked with Mr. Foert to define the scope statement. Can I assume that the scope at this stage can be considered as accurate?",
- true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
- EventDecisionDetail edd13 = event2.GetBySeqNbr(5);
- context.SaveChanges();
- event2.AddEventDecisionDetail(6,
- "Do you think that this project is supported by Districo's Senior Management?",
- true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
- EventDecisionDetail edd14 = event2.GetBySeqNbr(6);
- context.SaveChanges();
- event2.AddEventDecisionDetail(7, "Have you any idea how Mr. Cover performed on this project to-date?", true,
- null, null, false, 1.00M, 0.00M, 0.00M, null, null);
- EventDecisionDetail edd15 = event2.GetBySeqNbr(7);
- context.SaveChanges();
- event2.AddEventDecisionDetail(8, "Has Districo already performed in the past this kind of projects?", true,
- null, null, false, 1.00M, 0.00M, 0.00M, null, null);
- EventDecisionDetail edd16 = event2.GetBySeqNbr(8);
- context.SaveChanges();
- event2.AddEventDecisionDetail(9,
- "I noted that Mss. Burn is your executive assistant. Can she be involved as a team member for this project?",
- true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
- EventDecisionDetail edd17 = event2.GetBySeqNbr(9);
- context.SaveChanges();
- event2.AddEventDecisionDetail(10,
- "I note that the Marbella Heights is an upstading location. Wouldn't that be a perfect location for the training center?",
- true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
- EventDecisionDetail edd18 = event2.GetBySeqNbr(10);
- context.SaveChanges();
- context.SaveChanges();
- event3.AddEventDecisionDetail(1, "Template: Project Charter", false, event6, null, false, 0.00M, 0.00M,
- 50.00M, 0.00M, null);
- EventDecisionDetail edd19 = event3.GetBySeqNbr(1);
- edd19.AddSkill(SHIN, 1.00M);
- context.SaveChanges();
- event3.AddEventDecisionDetail(2, "Template: Master Project Plan", false, null, null, false, 0.00M, 0.00M,
- 50.00M, 0.00M, null);
- EventDecisionDetail edd20 = event3.GetBySeqNbr(2);
- edd20.AddSkill(SHIN, 1.00M);
- context.SaveChanges();
- event3.AddEventDecisionDetail(3, "Template: Project Scope Definition - Vision Document", false, null, null,
- false, 0.00M, 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd21 = event3.GetBySeqNbr(3);
- context.SaveChanges();
- event3.AddEventDecisionDetail(4, "Template: Project flexibility matrix", false, null, null, false, 0.00M,
- 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd22 = event3.GetBySeqNbr(4);
- context.SaveChanges();
- event3.AddEventDecisionDetail(5, "Template: Scope change control procedure", false, null, null, false, 0.00M,
- 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd23 = event3.GetBySeqNbr(5);
- edd23.AddSkill(SHSC, 1.00M);
- context.SaveChanges();
- event3.AddEventDecisionDetail(6, "Template: Deliverables definition form", false, null, null, false, 0.00M,
- 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd24 = event3.GetBySeqNbr(6);
- context.SaveChanges();
- event3.AddEventDecisionDetail(7, "Template: Project alternatives trade-off table", false, null, null, false,
- 0.00M, 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd25 = event3.GetBySeqNbr(7);
- context.SaveChanges();
- event3.AddEventDecisionDetail(8, "Template: Planning & Scheduling: Tasks list", false, null, null, false,
- 0.00M, 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd26 = event3.GetBySeqNbr(8);
- context.SaveChanges();
- event3.AddEventDecisionDetail(9, "Template: Communications Matrix", false, null, null, false, 0.00M, 0.00M,
- 50.00M, 0.00M, null);
- EventDecisionDetail edd27 = event3.GetBySeqNbr(9);
- edd27.AddSkill(SHCM, 1.00M);
- context.SaveChanges();
- event3.AddEventDecisionDetail(10, "Template: Vendor assessment checklist", false, null, null, false, 0.00M,
- 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd28 = event3.GetBySeqNbr(10);
- context.SaveChanges();
- event3.AddEventDecisionDetail(11, "Template: Status Meeting Agenda & Minutes", false, null, null, false,
- 0.00M, 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd29 = event3.GetBySeqNbr(11);
- edd29.AddSkill(SHCM, 1.00M);
- context.SaveChanges();
- event3.AddEventDecisionDetail(12, "Template: Steering Group meeting agenda & minutes", false, null, null,
- false, 0.00M, 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd30 = event3.GetBySeqNbr(12);
- edd30.AddSkill(SHCM, 1.00M);
- context.SaveChanges();
- event3.AddEventDecisionDetail(13, "Template: Effective meetings checklist", false, null, null, false, 0.00M,
- 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd31 = event3.GetBySeqNbr(13);
- context.SaveChanges();
- event3.AddEventDecisionDetail(14, "Template: Project or software release one-page summary", false, null,
- null, false, 0.00M, 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd32 = event3.GetBySeqNbr(14);
- context.SaveChanges();
- event3.AddEventDecisionDetail(15, "Template: RFP for training program development", false, null, null, false,
- 0.00M, 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd33 = event3.GetBySeqNbr(15);
- context.SaveChanges();
- event3.AddEventDecisionDetail(16, "Template: Scope change request", false, null, null, false, 0.00M, 0.00M,
- 50.00M, 0.00M, null);
- EventDecisionDetail edd34 = event3.GetBySeqNbr(16);
- edd34.AddSkill(SHSC, 1.00M);
- context.SaveChanges();
- event3.AddEventDecisionDetail(17, "Template: Decision matrix", false, null, null, false, 0.00M, 0.00M,
- 50.00M, 0.00M, null);
- EventDecisionDetail edd35 = event3.GetBySeqNbr(17);
- context.SaveChanges();
- event3.AddEventDecisionDetail(18, "Template: Risk, opportunity & issues register", false, null, null, false,
- 0.00M, 0.00M, 50.00M, 0.00M, null);
- EventDecisionDetail edd36 = event3.GetBySeqNbr(18);
- edd36.AddSkill(SHRI, 1.00M);
- context.SaveChanges();
- event3.AddEventDecisionDetail(19, "Template: Project status report", false, null, null, false, 0.00M, 0.00M,
- 50.00M, 0.00M, null);
- EventDecisionDetail edd37 = event3.GetBySeqNbr(19);
- edd37.AddSkill(SHCM, 1.00M);
- context.SaveChanges();
- event3.AddEventDecisionDetail(20, "Template: Lessons learned document", false, null, ma1, true, 0.00M, 0.00M,
- 50.00M, 0.00M, null);
- EventDecisionDetail edd38 = event3.GetBySeqNbr(20);
- edd38.AddSkill(SHIN, 1.00M);
- context.SaveChanges();
- context.SaveChanges();
- event3.AddSkill(SHIN, 3.00M);
- event3.AddSkill(SHCM, 4.00M);
- event3.AddSkill(SHSC, 2.00M);
- event3.AddSkill(SHRI, 1.00M);
- event4.AddEventDecisionDetail(1, "Talk to Frank concerning his attitude. ", false, event7, null, false,
- 0.00M, 0.00M, 0.00M, 0.00M, null);
- EventDecisionDetail edd39 = event4.GetBySeqNbr(1);
- edd39.AddSkill(SSSS, 0.25M);
- context.SaveChanges();
- event4.AddEventDecisionDetail(2, "Do not mind Franks reaction. It is not that important.", false, null, null,
- false, 0.00M, 0.00M, 0.00M, 0.00M, null);
- EventDecisionDetail edd40 = event4.GetBySeqNbr(2);
- edd40.AddSkill(SSSS, -0.25M);
- context.SaveChanges();
- context.SaveChanges();
- event4.AddSkill(SSSS, 0.25M);
- context.SaveChanges();
- event7.AddEventDecisionDetail(1, "Reprimand Frank in a strong way!", true, null, null, false, 1.00M, 1.00M,
- 0.00M, 1.00M, sth2);
- EventDecisionDetail edd41 = event7.GetBySeqNbr(1);
- edd41.AddSkill(SSSS, -0.50M);
- edd41.AddSkill(RESY, -2.00M);
- edd41.AddSkill(REAN, 2.00M);
- context.SaveChanges();
- event7.AddEventDecisionDetail(2, "Show your point of view.", true, null, null, false, 1.00M, 1.00M, 0.00M,
- 1.00M, sth2);
- EventDecisionDetail edd42 = event7.GetBySeqNbr(2);
- edd42.AddSkill(REAN, 1.00M);
- edd42.AddSkill(RESY, -1.00M);
- context.SaveChanges();
- event7.AddEventDecisionDetail(3, "Provide help to Frank.", true, null, null, false, 2.00M, 1.00M, 0.00M,
- 2.00M, sth2);
- EventDecisionDetail edd43 = event7.GetBySeqNbr(3);
- edd43.AddSkill(SSSS, 0.50M);
- edd43.AddSkill(RESY, 1.00M);
- context.SaveChanges();
- context.SaveChanges();
- event7.AddSkill(SSSS, 0.50M);
- ma2.AddSkill(SSTE, 0.25M);
- ma3.AddSkill(NSIT, 0.25M);
- ma4.AddSkill(SSSS, 0.25M);
- ma4.AddSkill(RESY, 0.05M);
- ma5.AddSkill(SSSS, 0.25M);
- ma5.AddSkill(RESY, 0.10M);
- ma6.AddSkill(SSSS, 0.25M);
- ma6.AddSkill(RESY, 0.15M);
- ma7.AddSkill(SSEX, 0.10M);
- ma7.AddSkill(SSLS, 0.10M);
- ma7.AddSkill(SSTW, 0.10M);
- ma7.AddSkill(NSIS, 0.50M);
- ma7.AddSkill(NSIW, 0.10M);
- ma8.AddSkill(SSEX, 0.10M);
- ma8.AddSkill(SSLS, 0.25M);
- ma8.AddSkill(SSTW, 0.10M);
- ma8.AddSkill(NSIP, 0.50M);
- ma8.AddSkill(NSIW, 0.10M);
- context.SaveChanges();
- sth1.AddSkill(SSCR, 5.00M);
- sth1.AddSkill(SSPE, 3.00M);
- sth1.AddSkill(SSTE, 2.00M);
- sth1.AddSkill(SSEX, 4.00M);
- sth1.AddSkill(SSSS, 4.00M);
- sth1.AddSkill(SSLS, 5.00M);
- sth1.AddSkill(SSTW, 1.00M);
- sth1.AddSkill(REAN, 1.00M);
- sth1.AddSkill(RESY, 4.00M);
- sth2.AddSkill(SSCR, 4.00M);
- sth2.AddSkill(SSPE, 1.00M);
- sth2.AddSkill(SSTE, 4.00M);
- sth2.AddSkill(SSEX, 4.00M);
- sth2.AddSkill(SSSS, 5.00M);
- sth2.AddSkill(SSLS, 4.00M);
- sth2.AddSkill(SSTW, 4.00M);
- sth2.AddSkill(REAN, 3.00M);
- sth2.AddSkill(RESY, 1.00M);
- sth3.AddSkill(SSCR, 4.00M);
- sth3.AddSkill(SSPE, 1.00M);
- sth3.AddSkill(SSTE, 3.00M);
- sth3.AddSkill(SSEX, 4.00M);
- sth3.AddSkill(SSSS, 1.00M);
- sth3.AddSkill(SSLS, 1.00M);
- sth3.AddSkill(SSTW, 2.00M);
- sth3.AddSkill(REAN, 2.00M);
- sth3.AddSkill(RESY, 3.00M);
- sth4.AddSkill(SSCR, 4.00M);
- sth4.AddSkill(SSPE, 1.00M);
- sth4.AddSkill(SSTE, 1.00M);
- sth4.AddSkill(SSEX, 3.00M);
- sth4.AddSkill(SSSS, 3.00M);
- sth4.AddSkill(SSLS, 1.00M);
- sth4.AddSkill(SSTW, 4.00M);
- sth4.AddSkill(REAN, 2.00M);
- sth4.AddSkill(RESY, 2.00M);
- sth5.AddSkill(SSCR, 5.00M);
- sth5.AddSkill(SSPE, 1.00M);
- sth5.AddSkill(SSTE, 4.00M);
- sth5.AddSkill(SSEX, 4.00M);
- sth5.AddSkill(SSSS, 1.00M);
- sth5.AddSkill(SSLS, 4.00M);
- sth5.AddSkill(SSTW, 1.00M);
- sth5.AddSkill(REAN, 4.00M);
- sth5.AddSkill(RESY, 1.00M);
- sth9.AddSkill(SSCR, 4.00M);
- sth9.AddSkill(SSPE, 3.00M);
- sth9.AddSkill(SSTE, 3.00M);
- sth9.AddSkill(SSEX, 3.00M);
- sth9.AddSkill(SSSS, 2.00M);
- sth9.AddSkill(SSLS, 1.00M);
- sth9.AddSkill(SSTW, 1.00M);
- sth9.AddSkill(REAN, 1.00M);
- sth9.AddSkill(RESY, 3.00M);
- EventDecisionDetail el = null;
- el = edd1;
- Conversation co1 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth1,
- NpcText = "Of course... How can I help you?",
- PlayerText =
- "Hi again Mr. Broock. Thanks for the introduction. I would like to ask you some more questions, if possible.",
- StartPeriod = period1
- };
- context.Conversations.Add(co1);
- el = edd2;
- Conversation co2 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth2,
- NpcText =
- "Mind your own business! It is not relevant you know... but I can tell you one thing: not everybody is as nice to you AND the project as you might think. Make sure that the scope change procedure is clear for every one. ",
- PlayerText =
- "Hello Frank! Can you please provide me with some background information on the project?",
- StartPeriod = period1
- };
- context.Conversations.Add(co2);
- el = edd3;
- Conversation co3 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth3,
- NpcText =
- "I hope that I can support you in many ways on this project. Collaboration is crucial!",
- PlayerText =
- "Hi Al! So you are assigned to the project as site coordinator. This means that we will be working closely together as from now on. What do you think is important for this project?",
- StartPeriod = period1
- };
- context.Conversations.Add(co3);
- el = edd4;
- Conversation co4 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth4,
- NpcText =
- "Oh hush... I hope it were all nice things... Do know that I am here for you to arrange some practicalities. Note that getting a meeting organized can get some time in this company.",
- PlayerText = "Hello Lizz. Nice to meet you at last! I have hear a lot about you...",
- StartPeriod = period1
- };
- context.Conversations.Add(co4);
- el = edd5;
- Conversation co5 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth5,
- NpcText =
- "Well I am also looking forward to work together with you on this initiative. I believe that from now on, the project will be back on track and that it finally gets properly organized. I would recommend you to read-up a lot on project management topics.",
- PlayerText =
- "Hello Mss. Rolle. May I disturb you? I am very pleased that you gave me the opportunity to take responsibility for this project.",
- StartPeriod = period1
- };
- context.Conversations.Add(co5);
- el = edd6;
- Conversation co6 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth6,
- NpcText =
- "Hey... You are the new project manager. Finally, a change from our traditional Frank. You look so dynamic! Sales is currently boooooming, so it tends to get quite busy in our sales department and we are always looking for some good people.",
- PlayerText = "Hi Eve! How are you today?",
- StartPeriod = period1
- };
- context.Conversations.Add(co6);
- el = edd7;
- Conversation co7 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth7,
- NpcText =
- "Yes, I am George. However, I do like to be called \"Mister HENT\". I am operations manager, you know, and I believe that some respect is at its place here.",
- PlayerText = "Euh... you must be George, isn't it?",
- StartPeriod = period1
- };
- context.Conversations.Add(co7);
- el = edd8;
- Conversation co8 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth8,
- NpcText =
- "Ok, no problem. My name is Annie Bodit. I am responsible for the consulting & training services. I am quite interested in this training center. Know that my team of trainers might be able to give you some advice on any requirements for this new center.",
- PlayerText =
- "Hello, aren't you the Services Manager? I forgot your name, how was it again?",
- StartPeriod = period1
- };
- context.Conversations.Add(co8);
- el = edd9;
- Conversation co9 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth1,
- NpcText =
- "I am not the expert myself on that matter, so I am afraid i am not able to tell you anything about that. I suggest you talk to Mr. Cover as this item lies more in his line of expertise.",
- PlayerText =
- "Can you please tell me more about the safety instructions for construction projects?",
- StartPeriod = period1
- };
- context.Conversations.Add(co9);
- el = edd10;
- Conversation co10 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth1,
- NpcText =
- "The choice of color is very important in the context of creating a good learning environment. I suggest you ask this question to Lizz as her father runs the Tradelux decoration shop. She might have some good ideas about this...",
- PlayerText =
- "Is it possible to indicate to me how you see the painting works? I am especially interested in the kind of painting material and painting techniques as I believe it might impact both the project budget and the project timeline.",
- StartPeriod = period1
- };
- context.Conversations.Add(co10);
- el = edd11;
- Conversation co11 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth1,
- NpcText =
- "I believe that the timeline for this project is crucial and as we plan a huge opening event, we cannot afford any time delay. As the training center will be visited by a lot of our external clients, I consider quality and scope as the number 2 priority.",
- PlayerText =
- "Would you be able to indicate to me your priorities on the triple constraint?",
- StartPeriod = period1
- };
- context.Conversations.Add(co11);
- el = edd12;
- Conversation co12 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth1,
- NpcText =
- "Technology is important these days. I hope that the network will allow good transfer speeds between the training center, the branch office and Head-quarters. Let me also stress that the software must be completely in sink with the requirments of HQ.",
- PlayerText =
- "Could you provide me the requirements of the ICT network infrastructure as well as the required software installation?",
- StartPeriod = period1
- };
- context.Conversations.Add(co12);
- el = edd13;
- Conversation co13 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth1,
- NpcText =
- "Well, Mr. Foert, Frank, was overloaded with a lot of work. Actually, I haven't spoken yet with Frank on the scope of the project. Perhaps, this is something you should start working on. Talk to Frank as soon as possible!",
- PlayerText =
- "You probably worked with Mr. Foert to define the scope statement. Can I assume that the scope at this stage can be considered as accurate and well defined?",
- StartPeriod = period1
- };
- context.Conversations.Add(co13);
- el = edd14;
- Conversation co14 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth1,
- NpcText =
- "Hehe, at least you have one supported at Senior Management level: ME! But there is more: Mr. Steier and Mss. Rolle are also supporting this project on all its aspects.",
- PlayerText =
- "Do you think that this project is supported by Districo's Senior Management?",
- StartPeriod = period1
- };
- context.Conversations.Add(co14);
- el = edd15;
- Conversation co15 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth1,
- NpcText =
- "That is a question for Frank! But into my knowledge, Al has not been working yet on this project. Just ask Frank...",
- PlayerText =
- "Have you any idea how Mr. Cover performed on this project to-date? I would appreciate some insight on this to make a judgment on which tasks can be assigned to him.",
- StartPeriod = period1
- };
- context.Conversations.Add(co15);
- el = edd16;
- Conversation co16 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth1,
- NpcText =
- "Districo's sector is Distribution, not construction. So, there is not an enourmous experience on construction available in-house. On the other hand, it is not the first time that we start-up a training center. ",
- PlayerText = "Has Districo already peformed this kind of projects in the past?",
- StartPeriod = period1
- };
- context.Conversations.Add(co16);
- el = edd17;
- Conversation co17 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth1,
- NpcText =
- "Lizz, euh Mss. Burn, is a very busy lady. Don't underestimate the job of an executive assistant! It will be very difficult to free up her time as she is also currently Local Administration Manager, ad-interim.",
- PlayerText =
- "I noted that Mss. Burn is your executive assistant. Can she be involved as a team member for this project?",
- StartPeriod = period1
- };
- context.Conversations.Add(co17);
- el = edd18;
- Conversation co18 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth1,
- NpcText =
- "All options are open. Yes, Marbella Heights is a nice location, but NewPort is quite big as well and there are a lot of different other spots that might prove useful. Perhaps, you should browse the different real-estate possibilities at ImmO.",
- PlayerText =
- "I note that the Marbella Heights is an upstanding location. Wouldn't that be a perfect location for the training center?",
- StartPeriod = period1
- };
- context.Conversations.Add(co18);
- el = null;
- Conversation co19 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = ma6,
- ManagementActionLockToggle = false,
- Npc = sth4,
- NpcText =
- "Absolutely, the quality of the kitchen here, always reminds me of the high quality standards required by Mr. Broock. I hope you checked with him on that for the Training Center project...",
- PlayerText = "The food is very nice here at The Sniffer, don't you think?",
- StartPeriod = period1
- };
- context.Conversations.Add(co19);
- el = null;
- Conversation co20 = new Conversation()
- {
- Diplomacy = 3.00M,
- EndPeriod = period2,
- EventDecisionDetail = el,
- ManagementActionLock = ma6,
- ManagementActionLockToggle = false,
- Npc = sth4,
- NpcText =
- "Me too, but for the second period, I really can't give you some tips for the project. ",
- PlayerText = "Hello Lizz. I like our small meetings at The Sniffer.",
- StartPeriod = period2
- };
- context.Conversations.Add(co20);
- el = null;
- Conversation co21 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period2,
- EventDecisionDetail = el,
- ManagementActionLock = ma6,
- ManagementActionLockToggle = false,
- Npc = sth4,
- NpcText = "Well, I'm just here because Mr. Broock told me I had to be here!",
- PlayerText = "Hello Lizz, I appreciate your company here at The Sniffer.",
- StartPeriod = period2
- };
- context.Conversations.Add(co21);
- el = edd41;
- Conversation co22 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth2,
- NpcText = "Do whatever you want! ",
- PlayerText =
- "I do totally not agree with the way you handle me. It shows no respect. I will escalate this behavior to your managers, Mr. BROOCK and Mss. BURN. This behavior is unacceptable and has to stop here, it shows no respect!",
- StartPeriod = period3
- };
- context.Conversations.Add(co22);
- el = edd42;
- Conversation co23 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth2,
- NpcText = "Hmmm....",
- PlayerText =
- "Frank, I cannot appreciate this attitude. I understand that you are under pressure, but this should not be a reason for acting this way. I hope that we can avoid this situation in the future.",
- StartPeriod = period3
- };
- context.Conversations.Add(co23);
- el = edd43;
- Conversation co24 = new Conversation()
- {
- Diplomacy = 0.00M,
- EndPeriod = period1,
- EventDecisionDetail = el,
- ManagementActionLock = null,
- ManagementActionLockToggle = false,
- Npc = sth2,
- NpcText =
- "It's not about you. You can not help... It is just so unfair that I am taken off the project because of somebody at senior management level. I think they do not want to have this project succeeding.",
- PlayerText =
- "Frank, I have the feeling that there is something wrong. Is it something that I have said or anything else? Can I help in any way?",
- StartPeriod = period3
- };
- context.Conversations.Add(co24);
- Document doc;
- doc = new Document()
- {
- Description = "Welcome",
- DocumentType = dt1,
- Event = event1,
- FileName = "A-P01E01-v2 - Welcome E-mail from Will Broock.pdf",
- Name = "P01E01",
- Period = null
- };
- context.Documents.Add(doc);
- doc = new Document()
- {
- Description = "Attachment to Welcome mail",
- DocumentType = dt4,
- Event = event1,
- FileName = "A-P01D04 - Memo Project Description.pdf",
- Name = "P01D04",
- Period = null
- };
- context.Documents.Add(doc);
- doc = new Document()
- {
- Description = "How many templates do you need.",
- DocumentType = dt1,
- Event = event3,
- FileName = "A-P01E02 - E-mail from Peter BORROW.pdf",
- Name = "P01E02",
- Period = period1
- };
- context.Documents.Add(doc);
- doc = new Document()
- {
- Description = "Test audio file type",
- DocumentType = dt2,
- Event = event2,
- FileName = "ping.MP3",
- Name = "P01V01",
- Period = null
- };
- context.Documents.Add(doc);
- doc = new Document()
- {
- Description = "Information about Stakeholder Management.",
- DocumentType = dt3,
- Event = null,
- FileName = "Management Letter \"Stakeholders\"",
- Name = "A-ML001",
- Period = period1
- };
- context.Documents.Add(doc);
- context.SaveChanges();
- }
- protected override void Seed(ProjectManagementContext context)
- {
- try
- {
- GenerateDb(context);
- #region Users
- User admin = new User()
- {
- Email = "admin@hogent.be",
- FirstName = "Steven",
- Name = "Goeman",
- IsAdminstrator = true,
- WritePermissions = true,
- Password = CustomMembershipProvider.Encrypt("123456")
- };
- User kenneth = new User()
- {
- Email = "kenneth@mail.com",
- FirstName = "Kenneth",
- Name = "Witman",
- IsAdminstrator = false,
- WritePermissions = false,
- Password = CustomMembershipProvider.Encrypt("123456")
- };
- User nelis = new User()
- {
- Email = "nelis@mail.com",
- FirstName = "Nelis",
- Name = "Braems",
- IsAdminstrator = false,
- WritePermissions = false,
- Password = CustomMembershipProvider.Encrypt("123456")
- };
- User lennart = new User()
- {
- Email = "lennart@mail.com",
- FirstName = "Lennart",
- Name = "Lapage",
- IsAdminstrator = false,
- WritePermissions = false,
- Password = CustomMembershipProvider.Encrypt("123456")
- };
- User glenn = new User()
- {
- Email = "glenn@mail.com",
- FirstName = "Glenn",
- Name = "Gosse",
- IsAdminstrator = false,
- WritePermissions = false,
- Password = CustomMembershipProvider.Encrypt("123456")
- };
- User steven = new User()
- {
- Email = "steven@mail.com",
- FirstName = "Steven",
- Name = "Van Lunter",
- IsAdminstrator = false,
- WritePermissions = false,
- Password = CustomMembershipProvider.Encrypt("123456")
- };
- User amedeo = new User()
- {
- Email = "amedeo@mail.com",
- FirstName = "Amedeo",
- Name = "Rochtus",
- IsAdminstrator = false,
- WritePermissions = false,
- Password = CustomMembershipProvider.Encrypt("123456")
- };
- User laurent = new User()
- {
- Email = "laurent@mail.com",
- FirstName = "Laurent",
- Name = "De Wilde",
- IsAdminstrator = false,
- WritePermissions = false,
- Password = CustomMembershipProvider.Encrypt("123456")
- };
- User jeroen = new User()
- {
- Email = "jeroen@mail.com",
- FirstName = "Jeroen",
- Name = "Van Eetvelde",
- IsAdminstrator = false,
- WritePermissions = false,
- Password = CustomMembershipProvider.Encrypt("123456")
- };
- User jimi = new User()
- {
- Email = "jimi@mail.com",
- FirstName = "Jimi",
- Name = "Heyndrickxs",
- IsAdminstrator = false,
- WritePermissions = false,
- Password = CustomMembershipProvider.Encrypt("123456")
- };
- #endregion
- #region Periods
- Period period1 = new Period()
- {
- Description = "TestPeriod 1",
- Name = "TestPeriod 1",
- StartDay = 1,
- StartMonth = 1,
- EndDay = 14,
- EndMonth = 1
- };
- Period period2 = new Period()
- {
- Description = "TestPeriod 2",
- Name = "TestPeriod 2",
- StartDay = 15,
- StartMonth = 1,
- EndDay = 29,
- EndMonth = 1
- };
- Period period3 = new Period()
- {
- Description = "TestPeriod 3",
- Name = "TestPeriod 3",
- StartDay = 1,
- StartMonth = 2,
- EndDay = 14,
- EndMonth = 2
- };
- #endregion
- Game game = new Game()
- {
- CurrentPeriod = period2,
- Name = "Game 1"
- };
- #region TeamPeriods
- TeamPeriod teamPeriod1 = new TeamPeriod()
- {
- PeriodLock = false,
- SystemLock = false,
- CalculatedLock = false,
- Period = period1
- };
- TeamPeriod teamPeriod2 = new TeamPeriod()
- {
- PeriodLock = false,
- SystemLock = false,
- CalculatedLock = false,
- Period = period2
- };
- TeamPeriod teamPeriod3 = new TeamPeriod()
- {
- PeriodLock = false,
- SystemLock = false,
- CalculatedLock = false,
- Period = period3
- };
- TeamPeriod teamPeriod4 = new TeamPeriod()
- {
- PeriodLock = true,
- SystemLock = false,
- CalculatedLock = true,
- Period = period1
- };
- TeamPeriod teamPeriod5 = new TeamPeriod()
- {
- PeriodLock = false,
- SystemLock = false,
- CalculatedLock = false,
- Period = period2
- };
- TeamPeriod teamPeriod6 = new TeamPeriod()
- {
- PeriodLock = false,
- SystemLock = false,
- CalculatedLock = false,
- Period = period3
- };
- TeamPeriod teamPeriod7 = new TeamPeriod()
- {
- PeriodLock = true,
- SystemLock = false,
- CalculatedLock = true,
- Period = period1
- };
- TeamPeriod teamPeriod8 = new TeamPeriod()
- {
- PeriodLock = true,
- SystemLock = false,
- CalculatedLock = true,
- Period = period2
- };
- TeamPeriod teamPeriod9 = new TeamPeriod()
- {
- PeriodLock = true,
- SystemLock = false,
- CalculatedLock = true,
- Period = period3
- };
- TeamPeriod teamPeriod10 = new TeamPeriod()
- {
- PeriodLock = true,
- SystemLock = false,
- CalculatedLock = true,
- Period = period1
- };
- TeamPeriod teamPeriod11 = new TeamPeriod()
- {
- PeriodLock = false,
- SystemLock = true,
- CalculatedLock = false,
- Period = period2
- };
- TeamPeriod teamPeriod12 = new TeamPeriod()
- {
- PeriodLock = false,
- SystemLock = false,
- CalculatedLock = false,
- Period = period3
- };
- #endregion
- Team team1 = new Team()
- {
- Name = "Team 1",
- TeamMembers = new Collection<User>() { kenneth, nelis },
- Game = game,
- TeamPeriods = new Collection<TeamPeriod>() { teamPeriod1, teamPeriod2, teamPeriod3 }
- };
- Team team2 = new Team()
- {
- Name = "Team 1",
- TeamMembers = new Collection<User>() { lennart, glenn },
- Game = game,
- TeamPeriods = new Collection<TeamPeriod>() { teamPeriod4, teamPeriod5, teamPeriod6 }
- };
- Team team3 = new Team()
- {
- Name = "Team 1",
- TeamMembers = new Collection<User>() { steven, amedeo },
- Game = game,
- TeamPeriods = new Collection<TeamPeriod>() { teamPeriod7, teamPeriod8, teamPeriod9 }
- };
- Team team4 = new Team()
- {
- Name = "Team 1",
- TeamMembers = new Collection<User>() { jeroen, jimi },
- Game = game,
- TeamPeriods = new Collection<TeamPeriod>() { teamPeriod10, teamPeriod11, teamPeriod12 }
- };
- context.Teams.Add(team1);
- context.Teams.Add(team2);
- context.Teams.Add(team3);
- context.Teams.Add(team4);
- kenneth.Team = team1;
- nelis.Team = team1;
- lennart.Team = team2;
- glenn.Team = team2;
- amedeo.Team = team3;
- steven.Team = team3;
- jimi.Team = team4;
- jeroen.Team = team4;
- context.Users.Add(kenneth);
- context.Users.Add(nelis);
- context.Users.Add(steven);
- context.Users.Add(lennart);
- context.Users.Add(glenn);
- context.Users.Add(amedeo);
- context.Users.Add(jeroen);
- context.Users.Add(jimi);
- context.Periods.Add(period1);
- context.Periods.Add(period2);
- context.Periods.Add(period3);
- context.TeamPeriods.Add(teamPeriod1);
- context.TeamPeriods.Add(teamPeriod2);
- context.TeamPeriods.Add(teamPeriod3);
- context.Games.Add(game);
- context.SaveChanges();
- }
- catch (DbEntityValidationException e)
- {
- string text = String.Empty;
- foreach (var eve in e.EntityValidationErrors)
- {
- text += String.Format("Entity of type {0} in state {1} has the following validation errors:",
- eve.Entry.Entity.GetType().Name, eve.Entry.GetValidationResult());
- foreach (var ve in eve.ValidationErrors)
- {
- text += String.Format("- Property: {0}, Error:{1}", ve.PropertyName, ve.ErrorMessage);
- }
- }
- throw new ApplicationException(text);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment