Guest User

Untitled

a guest
Aug 12th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 119.48 KB | None | 0 0
  1. using System;
  2. using System.Collections.ObjectModel;
  3. using System.Data.Entity.Validation;
  4. using System.Data.Entity;
  5. using PMES.Models.Domain.Common;
  6. using PMES.Models.Domain.Districo;
  7. using PMES.Models.Domain.Game;
  8. using PMES.Models.Domain.Newport;
  9. using PMES.Infrastructure;
  10.  
  11.  
  12. namespace PMES.Models.DAL
  13. {
  14. public class ProjectManagementInitializer : DropCreateDatabaseAlways<ProjectManagementContext>
  15. {
  16. private void GenerateDb(ProjectManagementContext context)
  17. {
  18. SkillType HS = new SkillType("HS", "Hard Skill");
  19. context.SkillTypes.Add(HS);
  20. SkillType NS = new SkillType("NS", "NPC Soft Skill");
  21. context.SkillTypes.Add(NS);
  22. SkillType RE = new SkillType("RE", "Resistance");
  23. context.SkillTypes.Add(RE);
  24. SkillType SS = new SkillType("SS", "Soft Skill");
  25. context.SkillTypes.Add(SS);
  26. Branche branche;
  27. branche = new Branche() {Name = "Branch - Barcelona"};
  28. context.Branches.Add(branche);
  29. branche = new Branche() {Name = "Branch - Hong-Kong"};
  30. context.Branches.Add(branche);
  31. branche = new Branche() {Name = "Branch - NewPort"};
  32. context.Branches.Add(branche);
  33. DocumentType dt1 = new DocumentType() {Name = "email"};
  34. context.DocumentTypes.Add(dt1);
  35. DocumentType dt2 = new DocumentType() {Name = "voicemail"};
  36. context.DocumentTypes.Add(dt2);
  37. DocumentType dt3 = new DocumentType() {Name = "document"};
  38. context.DocumentTypes.Add(dt3);
  39. DocumentType dt4 = new DocumentType() {Name = "attachment"};
  40. context.DocumentTypes.Add(dt4);
  41. DocumentType dt5 = new DocumentType() {Name = "convmm"};
  42. context.DocumentTypes.Add(dt5);
  43. Department department1 = new Department()
  44. {Name = "NP (NewPort) Branch", LevelAscending = "", LevelHqRelationship = ""};
  45. context.Departments.Add(department1);
  46. Department department2 = new Department()
  47. {
  48. Name = "HQ Corporate Projects Office",
  49. LevelAscending = "",
  50. LevelHqRelationship = ""
  51. };
  52. context.Departments.Add(department2);
  53. Department department3 = new Department()
  54. {
  55. Name = "HQ Corporate Finance Dpt",
  56. LevelAscending = "",
  57. LevelHqRelationship = ""
  58. };
  59. context.Departments.Add(department3);
  60. Department department4 = new Department()
  61. {
  62. Name = "NP Facilities & Maintenance",
  63. LevelAscending = "",
  64. LevelHqRelationship = ""
  65. };
  66. context.Departments.Add(department4);
  67. Department department5 = new Department()
  68. {
  69. Name = "NP Local Administration",
  70. LevelAscending = "",
  71. LevelHqRelationship = ""
  72. };
  73. context.Departments.Add(department5);
  74. Department department6 = new Department()
  75. {Name = "NP Local Sales", LevelAscending = "", LevelHqRelationship = ""};
  76. context.Departments.Add(department6);
  77. Department department7 = new Department()
  78. {
  79. Name = "NP Distribution Operations",
  80. LevelAscending = "",
  81. LevelHqRelationship = ""
  82. };
  83. context.Departments.Add(department7);
  84. Department department8 = new Department()
  85. {
  86. Name = "NP Distribution Services",
  87. LevelAscending = "",
  88. LevelHqRelationship = ""
  89. };
  90. context.Departments.Add(department8);
  91. Department department9 = new Department()
  92. {
  93. Name = "HQ Project & Program Delivery",
  94. LevelAscending = "",
  95. LevelHqRelationship = ""
  96. };
  97. context.Departments.Add(department9);
  98. SupconStarRating rating1 = new SupconStarRating()
  99. {
  100. SupconStarCategory = "S1",
  101. Description = "\"Does what is promised\"",
  102. FactorWorkloadActuals = 50,
  103. FactorDurationActuals = 50,
  104. Weight = 1
  105. };
  106. context.SupconStarRatings.Add(rating1);
  107. SupconStarRating rating2 = new SupconStarRating()
  108. {
  109. SupconStarCategory = "S1",
  110. Description = "\"Does what is promised.\"",
  111. FactorWorkloadActuals = 75,
  112. FactorDurationActuals = 75,
  113. Weight = 1
  114. };
  115. context.SupconStarRatings.Add(rating2);
  116. SupconStarRating rating3 = new SupconStarRating()
  117. {
  118. SupconStarCategory = "S1",
  119. Description = "\"Does what is promised.\"",
  120. FactorWorkloadActuals = 100,
  121. FactorDurationActuals = 100,
  122. Weight = 1
  123. };
  124. context.SupconStarRatings.Add(rating3);
  125. SupconStarRating rating4 = new SupconStarRating()
  126. {
  127. SupconStarCategory = "S2",
  128. Description = "\"Delivers on time.\"",
  129. FactorWorkloadActuals = 75,
  130. FactorDurationActuals = 75,
  131. Weight = 2
  132. };
  133. context.SupconStarRatings.Add(rating4);
  134. SupconStarRating rating5 = new SupconStarRating()
  135. {
  136. SupconStarCategory = "S2",
  137. Description = "\"Delivers on time.\"",
  138. FactorWorkloadActuals = 100,
  139. FactorDurationActuals = 100,
  140. Weight = 2
  141. };
  142. context.SupconStarRatings.Add(rating5);
  143. SupconStarRating rating6 = new SupconStarRating()
  144. {
  145. SupconStarCategory = "S2",
  146. Description = "\"Delivers on time.\"",
  147. FactorWorkloadActuals = 115,
  148. FactorDurationActuals = 115,
  149. Weight = 2
  150. };
  151. context.SupconStarRatings.Add(rating6);
  152. SupconStarRating rating7 = new SupconStarRating()
  153. {
  154. SupconStarCategory = "S3",
  155. Description = "\"Well equiped.\"",
  156. FactorWorkloadActuals = 100,
  157. FactorDurationActuals = 100,
  158. Weight = 1
  159. };
  160. context.SupconStarRatings.Add(rating7);
  161. SupconStarRating rating8 = new SupconStarRating()
  162. {
  163. SupconStarCategory = "S3",
  164. Description = "\"Well equiped.\"",
  165. FactorWorkloadActuals = 100,
  166. FactorDurationActuals = 100,
  167. Weight = 1
  168. };
  169. context.SupconStarRatings.Add(rating8);
  170. SupconStarRating rating9 = new SupconStarRating()
  171. {
  172. SupconStarCategory = "S3",
  173. Description = "\"Well equiped.\"",
  174. FactorWorkloadActuals = 100,
  175. FactorDurationActuals = 100,
  176. Weight = 1
  177. };
  178. context.SupconStarRatings.Add(rating9);
  179. SupconStarRating rating10 = new SupconStarRating()
  180. {
  181. SupconStarCategory = "S4",
  182. Description = "\"Competent workers.\"",
  183. FactorWorkloadActuals = 75,
  184. FactorDurationActuals = 75,
  185. Weight = 3
  186. };
  187. context.SupconStarRatings.Add(rating10);
  188. SupconStarRating rating12 = new SupconStarRating()
  189. {
  190. SupconStarCategory = "S4",
  191. Description = "\"Competent workers.\"",
  192. FactorWorkloadActuals = 100,
  193. FactorDurationActuals = 100,
  194. Weight = 3
  195. };
  196. context.SupconStarRatings.Add(rating12);
  197. SupconStarRating rating13 = new SupconStarRating()
  198. {
  199. SupconStarCategory = "S4",
  200. Description = "\"Competent workers.\"",
  201. FactorWorkloadActuals = 115,
  202. FactorDurationActuals = 115,
  203. Weight = 3
  204. };
  205. context.SupconStarRatings.Add(rating13);
  206. SupconStarRating rating14 = new SupconStarRating()
  207. {
  208. SupconStarCategory = "S5",
  209. Description = "\"Past client satisfaction.\"",
  210. FactorWorkloadActuals = 100,
  211. FactorDurationActuals = 100,
  212. Weight = 3
  213. };
  214. context.SupconStarRatings.Add(rating14);
  215. SupconStarRating rating15 = new SupconStarRating()
  216. {
  217. SupconStarCategory = "S5",
  218. Description = "\"Past client satisfaction.\"",
  219. FactorWorkloadActuals = 100,
  220. FactorDurationActuals = 100,
  221. Weight = 3
  222. };
  223. context.SupconStarRatings.Add(rating15);
  224. SupconStarRating rating16 = new SupconStarRating()
  225. {
  226. SupconStarCategory = "S5",
  227. Description = "\"Past client satisfaction.\"",
  228. FactorWorkloadActuals = 100,
  229. FactorDurationActuals = 100,
  230. Weight = 3
  231. };
  232. context.SupconStarRatings.Add(rating16);
  233. Business business1 = new Business() {Name = "Districo"};
  234. context.Businesses.Add(business1);
  235. business1.AddSupconStarRating(rating3);
  236. business1.AddSupconStarRating(rating5);
  237. business1.AddSupconStarRating(rating9);
  238. business1.AddSupconStarRating(rating13);
  239. business1.AddSupconStarRating(rating15);
  240. Business business2 = new Business() {Name = "SupCon Ltd"};
  241. context.Businesses.Add(business2);
  242. business2.AddSupconStarRating(rating3);
  243. business2.AddSupconStarRating(rating6);
  244. business2.AddSupconStarRating(rating9);
  245. business2.AddSupconStarRating(rating13);
  246. business2.AddSupconStarRating(rating16);
  247. Business business3 = new Business() {Name = "testPURCHASE"};
  248. context.Businesses.Add(business3);
  249. business3.AddSupconStarRating(rating3);
  250. business3.AddSupconStarRating(rating6);
  251. business3.AddSupconStarRating(rating9);
  252. business3.AddSupconStarRating(rating13);
  253. business3.AddSupconStarRating(rating16);
  254. Business business4 = new Business() {Name = "Constract Ltd"};
  255. context.Businesses.Add(business4);
  256. business4.AddSupconStarRating(rating2);
  257. business4.AddSupconStarRating(rating5);
  258. business4.AddSupconStarRating(rating9);
  259. business4.AddSupconStarRating(rating13);
  260. business4.AddSupconStarRating(rating15);
  261. Business business5 = new Business() {Name = "Construct Yourself Discounter"};
  262. context.Businesses.Add(business5);
  263. business5.AddSupconStarRating(rating1);
  264. business5.AddSupconStarRating(rating4);
  265. business5.AddSupconStarRating(rating9);
  266. business5.AddSupconStarRating(rating12);
  267. business5.AddSupconStarRating(rating15);
  268. Business business6 = new Business() {Name = "WASUP, Amir"};
  269. context.Businesses.Add(business6);
  270. business6.AddSupconStarRating(rating1);
  271. business6.AddSupconStarRating(rating4);
  272. business6.AddSupconStarRating(rating9);
  273. business6.AddSupconStarRating(rating10);
  274. business6.AddSupconStarRating(rating15);
  275. Business business7 = new Business() {Name = "Floors & Doors"};
  276. context.Businesses.Add(business7);
  277. business7.AddSupconStarRating(rating3);
  278. business7.AddSupconStarRating(rating6);
  279. business7.AddSupconStarRating(rating7);
  280. business7.AddSupconStarRating(rating13);
  281. business7.AddSupconStarRating(rating15);
  282. Business business9 = new Business() {Name = "Tradelux"};
  283. context.Businesses.Add(business9);
  284. business9.AddSupconStarRating(rating2);
  285. business9.AddSupconStarRating(rating6);
  286. business9.AddSupconStarRating(rating9);
  287. business9.AddSupconStarRating(rating13);
  288. business9.AddSupconStarRating(rating16);
  289. Business business10 = new Business() {Name = "EduWarezz"};
  290. context.Businesses.Add(business10);
  291. business10.AddSupconStarRating(rating3);
  292. business10.AddSupconStarRating(rating5);
  293. business10.AddSupconStarRating(rating9);
  294. business10.AddSupconStarRating(rating12);
  295. business10.AddSupconStarRating(rating16);
  296. Business business11 = new Business() {Name = "Flash à GoGo"};
  297. context.Businesses.Add(business11);
  298. business11.AddSupconStarRating(rating3);
  299. business11.AddSupconStarRating(rating5);
  300. business11.AddSupconStarRating(rating9);
  301. business11.AddSupconStarRating(rating12);
  302. business11.AddSupconStarRating(rating16);
  303. Business business12 = new Business() {Name = "ImmO"};
  304. context.Businesses.Add(business12);
  305. business12.AddSupconStarRating(rating3);
  306. business12.AddSupconStarRating(rating5);
  307. business12.AddSupconStarRating(rating9);
  308. business12.AddSupconStarRating(rating13);
  309. business12.AddSupconStarRating(rating16);
  310. Business business13 = new Business() {Name = "NewPort Cleaning Group Ltd"};
  311. context.Businesses.Add(business13);
  312. business13.AddSupconStarRating(rating2);
  313. business13.AddSupconStarRating(rating6);
  314. business13.AddSupconStarRating(rating9);
  315. business13.AddSupconStarRating(rating13);
  316. business13.AddSupconStarRating(rating15);
  317. Business business14 = new Business() {Name = "Rudi's Furniture & Decoration Shop"};
  318. context.Businesses.Add(business14);
  319. business14.AddSupconStarRating(rating2);
  320. business14.AddSupconStarRating(rating6);
  321. business14.AddSupconStarRating(rating9);
  322. business14.AddSupconStarRating(rating12);
  323. business14.AddSupconStarRating(rating16);
  324. Business business15 = new Business() {Name = "TemPeople"};
  325. context.Businesses.Add(business15);
  326. business15.AddSupconStarRating(rating3);
  327. business15.AddSupconStarRating(rating6);
  328. business15.AddSupconStarRating(rating9);
  329. business15.AddSupconStarRating(rating13);
  330. business15.AddSupconStarRating(rating15);
  331. Business business16 = new Business() {Name = "The Component Store"};
  332. context.Businesses.Add(business16);
  333. business16.AddSupconStarRating(rating1);
  334. business16.AddSupconStarRating(rating4);
  335. business16.AddSupconStarRating(rating8);
  336. business16.AddSupconStarRating(rating13);
  337. business16.AddSupconStarRating(rating15);
  338. Business business17 = new Business() {Name = "The Old Sailor"};
  339. context.Businesses.Add(business17);
  340. business17.AddSupconStarRating(rating1);
  341. business17.AddSupconStarRating(rating6);
  342. business17.AddSupconStarRating(rating8);
  343. business17.AddSupconStarRating(rating10);
  344. business17.AddSupconStarRating(rating14);
  345. Business business18 = new Business() {Name = "The Sniffer"};
  346. context.Businesses.Add(business18);
  347. business18.AddSupconStarRating(rating3);
  348. business18.AddSupconStarRating(rating6);
  349. business18.AddSupconStarRating(rating9);
  350. business18.AddSupconStarRating(rating13);
  351. business18.AddSupconStarRating(rating16);
  352. TeamRole teamrole1 = new TeamRole() {Name = "Builder"};
  353. context.TeamRoles.Add(teamrole1);
  354. TeamRole teamrole2 = new TeamRole() {Name = "Plasterer"};
  355. context.TeamRoles.Add(teamrole2);
  356. TeamRole teamrole3 = new TeamRole() {Name = "Floorer"};
  357. context.TeamRoles.Add(teamrole3);
  358. TeamRole teamrole4 = new TeamRole() {Name = "Staff"};
  359. context.TeamRoles.Add(teamrole4);
  360. TeamRole teamrole5 = new TeamRole() {Name = "Decorator"};
  361. context.TeamRoles.Add(teamrole5);
  362. TeamRole teamrole6 = new TeamRole() {Name = "Painter"};
  363. context.TeamRoles.Add(teamrole6);
  364. TeamRole teamrole7 = new TeamRole() {Name = "Laborer"};
  365. context.TeamRoles.Add(teamrole7);
  366. TeamRole teamrole8 = new TeamRole() {Name = "Electrician"};
  367. context.TeamRoles.Add(teamrole8);
  368. TeamRole teamrole9 = new TeamRole() {Name = "PC Engineer"};
  369. context.TeamRoles.Add(teamrole9);
  370. TeamRole teamrole10 = new TeamRole() {Name = "Network Service Engineer"};
  371. context.TeamRoles.Add(teamrole10);
  372. TeamRole teamrole11 = new TeamRole() {Name = "Cleaner"};
  373. context.TeamRoles.Add(teamrole11);
  374. context.SaveChanges();
  375. RealizationTask rr;
  376. rr = new RealizationTask()
  377. {
  378. Name = "Breaking Walls",
  379. MeasurementUnit = "m²",
  380. StandardReferenceDuration = 2.00M,
  381. StandardReferenceWorkload = 2.00M,
  382. MaterialCost = 0.00M
  383. };
  384. context.RealizationTasks.Add(rr);
  385. rr.AddTeamRole(teamrole1);
  386. rr = new RealizationTask()
  387. {
  388. Name = "Constructing Walls",
  389. MeasurementUnit = "m²",
  390. StandardReferenceDuration = 4.00M,
  391. StandardReferenceWorkload = 4.00M,
  392. MaterialCost = 0.00M
  393. };
  394. context.RealizationTasks.Add(rr);
  395. rr.AddTeamRole(teamrole1);
  396. rr = new RealizationTask()
  397. {
  398. Name = "Plastering Walls",
  399. MeasurementUnit = "m²",
  400. StandardReferenceDuration = 1.00M,
  401. StandardReferenceWorkload = 1.00M,
  402. MaterialCost = 0.00M
  403. };
  404. context.RealizationTasks.Add(rr);
  405. rr.AddTeamRole(teamrole2);
  406. rr = new RealizationTask()
  407. {
  408. Name = "Plastering Ceiling",
  409. MeasurementUnit = "m²",
  410. StandardReferenceDuration = 1.00M,
  411. StandardReferenceWorkload = 1.00M,
  412. MaterialCost = 0.00M
  413. };
  414. context.RealizationTasks.Add(rr);
  415. rr.AddTeamRole(teamrole2);
  416. rr.AddTeamRole(teamrole3);
  417. rr = new RealizationTask()
  418. {
  419. Name = "Flooring",
  420. MeasurementUnit = "m²",
  421. StandardReferenceDuration = 1.00M,
  422. StandardReferenceWorkload = 1.00M,
  423. MaterialCost = 0.00M
  424. };
  425. context.RealizationTasks.Add(rr);
  426. rr.AddTeamRole(teamrole1);
  427. rr.AddTeamRole(teamrole3);
  428. rr.AddTeamRole(teamrole5);
  429. rr = new RealizationTask()
  430. {
  431. Name = "Installing Windows & Doors",
  432. MeasurementUnit = "item",
  433. StandardReferenceDuration = 2.00M,
  434. StandardReferenceWorkload = 2.00M,
  435. MaterialCost = 0.00M
  436. };
  437. context.RealizationTasks.Add(rr);
  438. rr.AddTeamRole(teamrole1);
  439. rr = new RealizationTask()
  440. {
  441. Name = "Painting Walls (1 layer)",
  442. MeasurementUnit = "m²",
  443. StandardReferenceDuration = 1.00M,
  444. StandardReferenceWorkload = 1.00M,
  445. MaterialCost = 0.00M
  446. };
  447. context.RealizationTasks.Add(rr);
  448. rr.AddTeamRole(teamrole5);
  449. rr.AddTeamRole(teamrole6);
  450. rr = new RealizationTask()
  451. {
  452. Name = "Painting Ceiling (1 layer)",
  453. MeasurementUnit = "m²",
  454. StandardReferenceDuration = 1.00M,
  455. StandardReferenceWorkload = 1.00M,
  456. MaterialCost = 0.00M
  457. };
  458. context.RealizationTasks.Add(rr);
  459. rr.AddTeamRole(teamrole5);
  460. rr.AddTeamRole(teamrole6);
  461. rr = new RealizationTask()
  462. {
  463. Name = "Installing chair",
  464. MeasurementUnit = "item",
  465. StandardReferenceDuration = 1.00M,
  466. StandardReferenceWorkload = 1.00M,
  467. MaterialCost = 0.00M
  468. };
  469. context.RealizationTasks.Add(rr);
  470. rr.AddTeamRole(teamrole5);
  471. rr.AddTeamRole(teamrole7);
  472. rr = new RealizationTask()
  473. {
  474. Name = "Installing Desk",
  475. MeasurementUnit = "item",
  476. StandardReferenceDuration = 1.00M,
  477. StandardReferenceWorkload = 1.00M,
  478. MaterialCost = 0.00M
  479. };
  480. context.RealizationTasks.Add(rr);
  481. rr.AddTeamRole(teamrole5);
  482. rr.AddTeamRole(teamrole7);
  483. rr = new RealizationTask()
  484. {
  485. Name = "Installing Closet",
  486. MeasurementUnit = "item",
  487. StandardReferenceDuration = 1.00M,
  488. StandardReferenceWorkload = 1.00M,
  489. MaterialCost = 0.00M
  490. };
  491. context.RealizationTasks.Add(rr);
  492. rr.AddTeamRole(teamrole5);
  493. rr.AddTeamRole(teamrole7);
  494. rr = new RealizationTask()
  495. {
  496. Name = "Installing Project Screen or White Board",
  497. MeasurementUnit = "item",
  498. StandardReferenceDuration = 2.00M,
  499. StandardReferenceWorkload = 2.00M,
  500. MaterialCost = 0.00M
  501. };
  502. context.RealizationTasks.Add(rr);
  503. rr.AddTeamRole(teamrole1);
  504. rr.AddTeamRole(teamrole5);
  505. rr = new RealizationTask()
  506. {
  507. Name = "Installing Lights",
  508. MeasurementUnit = "item",
  509. StandardReferenceDuration = 1.00M,
  510. StandardReferenceWorkload = 1.00M,
  511. MaterialCost = 0.00M
  512. };
  513. context.RealizationTasks.Add(rr);
  514. rr.AddTeamRole(teamrole8);
  515. rr = new RealizationTask()
  516. {
  517. Name = "Installing Blinds",
  518. MeasurementUnit = "item",
  519. StandardReferenceDuration = 1.00M,
  520. StandardReferenceWorkload = 1.00M,
  521. MaterialCost = 0.00M
  522. };
  523. context.RealizationTasks.Add(rr);
  524. rr.AddTeamRole(teamrole5);
  525. rr = new RealizationTask()
  526. {
  527. Name = "Installing Accessory",
  528. MeasurementUnit = "item",
  529. StandardReferenceDuration = 1.00M,
  530. StandardReferenceWorkload = 1.00M,
  531. MaterialCost = 0.00M
  532. };
  533. context.RealizationTasks.Add(rr);
  534. rr.AddTeamRole(teamrole5);
  535. rr = new RealizationTask()
  536. {
  537. Name = "Installing Computers",
  538. MeasurementUnit = "item",
  539. StandardReferenceDuration = 4.00M,
  540. StandardReferenceWorkload = 4.00M,
  541. MaterialCost = 0.00M
  542. };
  543. context.RealizationTasks.Add(rr);
  544. rr.AddTeamRole(teamrole9);
  545. rr.AddTeamRole(teamrole10);
  546. rr = new RealizationTask()
  547. {
  548. Name = "Installing Beamer",
  549. MeasurementUnit = "item",
  550. StandardReferenceDuration = 1.00M,
  551. StandardReferenceWorkload = 1.00M,
  552. MaterialCost = 0.00M
  553. };
  554. context.RealizationTasks.Add(rr);
  555. rr.AddTeamRole(teamrole10);
  556. rr = new RealizationTask()
  557. {
  558. Name = "Cleaning-up roughly",
  559. MeasurementUnit = "m²",
  560. StandardReferenceDuration = 1.00M,
  561. StandardReferenceWorkload = 1.00M,
  562. MaterialCost = 0.00M
  563. };
  564. context.RealizationTasks.Add(rr);
  565. rr.AddTeamRole(teamrole7);
  566. rr.AddTeamRole(teamrole11);
  567. rr = new RealizationTask()
  568. {
  569. Name = "Cleaning-up (fine cleaning)",
  570. MeasurementUnit = "m²",
  571. StandardReferenceDuration = 2.00M,
  572. StandardReferenceWorkload = 2.00M,
  573. MaterialCost = 0.00M
  574. };
  575. context.RealizationTasks.Add(rr);
  576. rr.AddTeamRole(teamrole5);
  577. rr.AddTeamRole(teamrole7);
  578. rr.AddTeamRole(teamrole11);
  579. SkillCategory NSIC = new SkillCategory() {Name = "Increment for Credibility", SkillType = NS, Code = "NSIC"};
  580. context.SkillCategories.Add(NSIC);
  581. SkillCategory NSIE = new SkillCategory() {Name = "Increment for Experience", SkillType = NS, Code = "NSIE"};
  582. context.SkillCategories.Add(NSIE);
  583. SkillCategory NSIL = new SkillCategory() {Name = "Increment for leadership", SkillType = NS, Code = "NSIL"};
  584. context.SkillCategories.Add(NSIL);
  585. SkillCategory NSIP = new SkillCategory()
  586. {
  587. Name = "Increment for Project Management Expertise",
  588. SkillType = NS,
  589. Code = "NSIP"
  590. };
  591. context.SkillCategories.Add(NSIP);
  592. SkillCategory NSIS = new SkillCategory() {Name = "Increment for Soft Skills", SkillType = NS, Code = "NSIS"};
  593. context.SkillCategories.Add(NSIS);
  594. SkillCategory NSIT = new SkillCategory()
  595. {Name = "Increment for Technical Expertise", SkillType = NS, Code = "NSIT"};
  596. context.SkillCategories.Add(NSIT);
  597. SkillCategory NSIW = new SkillCategory() {Name = "Increment for Team work", SkillType = NS, Code = "NSIW"};
  598. context.SkillCategories.Add(NSIW);
  599. SkillCategory REAN = new SkillCategory() {Name = "Antagonism", SkillType = RE, Code = "REAN"};
  600. context.SkillCategories.Add(REAN);
  601. SkillCategory RESY = new SkillCategory() {Name = "Synergy", SkillType = RE, Code = "RESY"};
  602. context.SkillCategories.Add(RESY);
  603. SkillCategory SHCM = new SkillCategory() {Name = "Communication", SkillType = HS, Code = "SHCM"};
  604. context.SkillCategories.Add(SHCM);
  605. SkillCategory SHCO = new SkillCategory() {Name = "Cost", SkillType = HS, Code = "SHCO"};
  606. context.SkillCategories.Add(SHCO);
  607. SkillCategory SHHR = new SkillCategory() {Name = "Human Resource", SkillType = HS, Code = "SHHR"};
  608. context.SkillCategories.Add(SHHR);
  609. SkillCategory SHIN = new SkillCategory() {Name = "Integration", SkillType = HS, Code = "SHIN"};
  610. context.SkillCategories.Add(SHIN);
  611. SkillCategory SHPR = new SkillCategory() {Name = "Procurement", SkillType = HS, Code = "SHPR"};
  612. context.SkillCategories.Add(SHPR);
  613. SkillCategory SHQU = new SkillCategory() {Name = "Quality", SkillType = HS, Code = "SHQU"};
  614. context.SkillCategories.Add(SHQU);
  615. SkillCategory SHRI = new SkillCategory() {Name = "Risk", SkillType = HS, Code = "SHRI"};
  616. context.SkillCategories.Add(SHRI);
  617. SkillCategory SHSC = new SkillCategory() {Name = "Scope", SkillType = HS, Code = "SHSC"};
  618. context.SkillCategories.Add(SHSC);
  619. SkillCategory SHTI = new SkillCategory() {Name = "Time", SkillType = HS, Code = "SHTI"};
  620. context.SkillCategories.Add(SHTI);
  621. SkillCategory SSCR = new SkillCategory() {Name = "Credibility", SkillType = SS, Code = "SSCR"};
  622. context.SkillCategories.Add(SSCR);
  623. SkillCategory SSEX = new SkillCategory() {Name = "Experience", SkillType = SS, Code = "SSEX"};
  624. context.SkillCategories.Add(SSEX);
  625. SSEX.AddLevel(0, 5, 150, 25, 150, 25);
  626. SSEX.AddLevel(1, 5, 125, 50, 125, 50);
  627. SSEX.AddLevel(2, 5, 100, 75, 100, 75);
  628. SSEX.AddLevel(3, 5, 75, 100, 75, 100);
  629. SSEX.AddLevel(4, 5, 50, 125, 50, 125);
  630. SSEX.AddLevel(5, 5, 25, 150, 25, 150);
  631. SkillCategory SSLS = new SkillCategory() {Name = "Leadership", SkillType = SS, Code = "SSLS"};
  632. context.SkillCategories.Add(SSLS);
  633. SkillCategory SSPE = new SkillCategory()
  634. {Name = "Project Management Expertise", SkillType = SS, Code = "SSPE"};
  635. context.SkillCategories.Add(SSPE);
  636. SkillCategory SSSS = new SkillCategory() {Name = "Soft Skills", SkillType = SS, Code = "SSSS"};
  637. context.SkillCategories.Add(SSSS);
  638. SkillCategory SSTE = new SkillCategory() {Name = "Technical Expertise", SkillType = SS, Code = "SSTE"};
  639. context.SkillCategories.Add(SSTE);
  640. SkillCategory SSTW = new SkillCategory() {Name = "Team Work", SkillType = SS, Code = "SSTW"};
  641. context.SkillCategories.Add(SSTW);
  642. Function function1 = new Function()
  643. {
  644. Title = "Branch Manager",
  645. Description = null,
  646. StandardCostpricePerHour = 300.00M,
  647. TeamRole = teamrole4
  648. };
  649. context.Functions.Add(function1);
  650. Function function2 = new Function()
  651. {
  652. Title = "Senior Project Manager",
  653. Description = null,
  654. StandardCostpricePerHour = 150.00M,
  655. TeamRole = teamrole4
  656. };
  657. context.Functions.Add(function2);
  658. Function function3 = new Function()
  659. {
  660. Title = "Districo Laborer",
  661. Description = null,
  662. StandardCostpricePerHour = 75.00M,
  663. TeamRole = teamrole7
  664. };
  665. context.Functions.Add(function3);
  666. Function function4 = new Function()
  667. {
  668. Title = "Executive Assistant",
  669. Description = null,
  670. StandardCostpricePerHour = 35.00M,
  671. TeamRole = teamrole4
  672. };
  673. context.Functions.Add(function4);
  674. Function function5 = new Function()
  675. {
  676. Title = "Chief Financial Officer",
  677. Description = null,
  678. StandardCostpricePerHour = 300.00M,
  679. TeamRole = teamrole4
  680. };
  681. context.Functions.Add(function5);
  682. Function function6 = new Function()
  683. {
  684. Title = "Branch Sales Manager",
  685. Description = null,
  686. StandardCostpricePerHour = 200.00M,
  687. TeamRole = teamrole4
  688. };
  689. context.Functions.Add(function6);
  690. Function function7 = new Function()
  691. {
  692. Title = "Branch Operations Manager",
  693. Description = null,
  694. StandardCostpricePerHour = 200.00M,
  695. TeamRole = teamrole4
  696. };
  697. context.Functions.Add(function7);
  698. Function function8 = new Function()
  699. {
  700. Title = "Branch Services Manager",
  701. Description = null,
  702. StandardCostpricePerHour = 200.00M,
  703. TeamRole = teamrole4
  704. };
  705. context.Functions.Add(function8);
  706. Function function9 = new Function()
  707. {
  708. Title = "P&P Manager",
  709. Description = null,
  710. StandardCostpricePerHour = 200.00M,
  711. TeamRole = teamrole4
  712. };
  713. context.Functions.Add(function9);
  714. Function function10 = new Function()
  715. {
  716. Title = "Methodology Coach",
  717. Description = null,
  718. StandardCostpricePerHour = 100.00M,
  719. TeamRole = teamrole4
  720. };
  721. context.Functions.Add(function10);
  722. Stakeholder sth1 = new Stakeholder()
  723. {
  724. Name = "BROOCK",
  725. FirstName = "Will",
  726. History = null,
  727. Business = business1,
  728. Department = department1,
  729. Function = function1,
  730. AvailabilityPercentageForProject = 5,
  731. AvailabilityPercentageForCompany = 100
  732. };
  733. context.Stakeholders.Add(sth1);
  734. Stakeholder sth2 = new Stakeholder()
  735. {
  736. Name = "FOERT",
  737. FirstName = "Frank",
  738. History = null,
  739. Business = business1,
  740. Department = department2,
  741. Function = function2,
  742. AvailabilityPercentageForProject = 10,
  743. AvailabilityPercentageForCompany = 100
  744. };
  745. context.Stakeholders.Add(sth2);
  746. Stakeholder sth3 = new Stakeholder()
  747. {
  748. Name = "COVER",
  749. FirstName = "Al",
  750. History = null,
  751. Business = business1,
  752. Department = department4,
  753. Function = function3,
  754. AvailabilityPercentageForProject = 100,
  755. AvailabilityPercentageForCompany = 100
  756. };
  757. context.Stakeholders.Add(sth3);
  758. Stakeholder sth4 = new Stakeholder()
  759. {
  760. Name = "BURN",
  761. FirstName = "Lizz",
  762. History = null,
  763. Business = business1,
  764. Department = department1,
  765. Function = function4,
  766. AvailabilityPercentageForProject = 25,
  767. AvailabilityPercentageForCompany = 100
  768. };
  769. context.Stakeholders.Add(sth4);
  770. Stakeholder sth5 = new Stakeholder()
  771. {
  772. Name = "ROLLE",
  773. FirstName = "Catherine",
  774. History = null,
  775. Business = business1,
  776. Department = department3,
  777. Function = function5,
  778. AvailabilityPercentageForProject = 10,
  779. AvailabilityPercentageForCompany = 100
  780. };
  781. context.Stakeholders.Add(sth5);
  782. Stakeholder sth6 = new Stakeholder()
  783. {
  784. Name = "RIBODIE",
  785. FirstName = "Eve",
  786. History = null,
  787. Business = business1,
  788. Department = department6,
  789. Function = function6,
  790. AvailabilityPercentageForProject = 1,
  791. AvailabilityPercentageForCompany = 100
  792. };
  793. context.Stakeholders.Add(sth6);
  794. Stakeholder sth7 = new Stakeholder()
  795. {
  796. Name = "HENT",
  797. FirstName = "George",
  798. History = null,
  799. Business = business1,
  800. Department = department7,
  801. Function = function7,
  802. AvailabilityPercentageForProject = 1,
  803. AvailabilityPercentageForCompany = 100
  804. };
  805. context.Stakeholders.Add(sth7);
  806. Stakeholder sth8 = new Stakeholder()
  807. {
  808. Name = "BODIT",
  809. FirstName = "Annie",
  810. History = null,
  811. Business = business1,
  812. Department = department8,
  813. Function = function8,
  814. AvailabilityPercentageForProject = 1,
  815. AvailabilityPercentageForCompany = 100
  816. };
  817. context.Stakeholders.Add(sth8);
  818. Stakeholder sth9 = new Stakeholder()
  819. {
  820. Name = "BORROW",
  821. FirstName = "Peter",
  822. History = null,
  823. Business = business1,
  824. Department = department2,
  825. Function = function9,
  826. AvailabilityPercentageForProject = 10,
  827. AvailabilityPercentageForCompany = 100
  828. };
  829. context.Stakeholders.Add(sth9);
  830. Stakeholder sth10 = new Stakeholder()
  831. {
  832. Name = "LIANO",
  833. FirstName = "Gall",
  834. History = null,
  835. Business = business1,
  836. Department = department2,
  837. Function = function10,
  838. AvailabilityPercentageForProject = 1,
  839. AvailabilityPercentageForCompany = 80
  840. };
  841. context.Stakeholders.Add(sth10);
  842. context.SaveChanges();
  843. Period period1 = new Period()
  844. {
  845. Description = "Period 01",
  846. EndDay = 14,
  847. EndMonth = 8,
  848. FactorEstimateAccuracy = 13,
  849. Name = "Period 01",
  850. StartDay = 1,
  851. StartMonth = 8
  852. };
  853. context.Periods.Add(period1);
  854. Event event1 = period1.AddEvent("Welcome to Districo!",
  855. "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.",
  856. "ES", 4.00M, 1.00M, 3, "Welcome!", 3, 8, sth1);
  857. Event event2 = period1.AddEvent("Appropriate Questioning",
  858. "You get the opportunity to ask a maximum of 4 additional questions. Will Broock will provide you immediately with an answer.",
  859. "ET", 0.00M, 1.00M, 4, "", null, null, sth1);
  860. Event event3 = period1.AddEvent("How many and which templates do you need?",
  861. "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. ",
  862. "ES", 2.00M, 1.00M, 10, "FW: Project Documentation", 9, 8, sth10);
  863. context.SaveChanges();
  864. Period period2 = new Period()
  865. {
  866. Description = "Period 02",
  867. EndDay = 28,
  868. EndMonth = 8,
  869. FactorEstimateAccuracy = 7,
  870. Name = "Period 02",
  871. StartDay = 15,
  872. StartMonth = 8
  873. };
  874. context.Periods.Add(period2);
  875. Event event4 = period2.AddEvent("Chartering the project",
  876. "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...",
  877. "ES", 1.00M, 1.00M, 1, "You Zealot!", 8, 17, sth2);
  878. Event event7 = period2.AddEvent("Politeness Please!",
  879. "The following reactions to Frank's attitude can be given:", "ET", 1.00M,
  880. 1.00M, 1, "None", null, null, sth2);
  881. context.SaveChanges();
  882. Period period3 = new Period()
  883. {
  884. Description = "Period 03",
  885. EndDay = 11,
  886. EndMonth = 9,
  887. FactorEstimateAccuracy = 8,
  888. Name = "Period 03",
  889. StartDay = 29,
  890. StartMonth = 8
  891. };
  892. context.Periods.Add(period3);
  893. Event event6 = period3.AddEvent("Obtain the project charter",
  894. "The protagonist receives a correct project charter", "EI", 0.00M, 0.00M, 0,
  895. "Requested document", 9, 3, sth2);
  896. context.SaveChanges();
  897. context.SaveChanges();
  898. ManagementAction ma1 = new ManagementAction()
  899. {
  900. Name = "Perform Lessons Learned",
  901. Budget = 0.00M,
  902. Conversation = false,
  903. DefaultLock = true,
  904. Duration = 1.00M,
  905. EndPeriod = period1,
  906. Estimates = false,
  907. RequiredNewportCompany = false,
  908. RequiredNpc = true,
  909. RequiredRealizationTask = false,
  910. StartPeriod = period3,
  911. WorkloadPlayer = 4.00M,
  912. WorkloadNpc = 4.00M
  913. };
  914. context.ManagementActions.Add(ma1);
  915. ManagementAction ma2 = new ManagementAction()
  916. {
  917. Name = "Buy yourself a technical managzine",
  918. Budget = 50.00M,
  919. Conversation = false,
  920. DefaultLock = false,
  921. Duration = 0.00M,
  922. EndPeriod = period2,
  923. Estimates = false,
  924. RequiredNewportCompany = false,
  925. RequiredNpc = false,
  926. RequiredRealizationTask = false,
  927. StartPeriod = period3,
  928. WorkloadPlayer = 1.00M,
  929. WorkloadNpc = 0.00M
  930. };
  931. context.ManagementActions.Add(ma2);
  932. ManagementAction ma3 = new ManagementAction()
  933. {
  934. Name = "Buy a technical magazine for",
  935. Budget = 50.00M,
  936. Conversation = false,
  937. DefaultLock = false,
  938. Duration = 0.00M,
  939. EndPeriod = period2,
  940. Estimates = false,
  941. RequiredNewportCompany = false,
  942. RequiredNpc = true,
  943. RequiredRealizationTask = false,
  944. StartPeriod = period3,
  945. WorkloadPlayer = 1.00M,
  946. WorkloadNpc = 0.00M
  947. };
  948. context.ManagementActions.Add(ma3);
  949. ManagementAction ma4 = new ManagementAction()
  950. {
  951. Name = "Invite somebody to the Old Sailor",
  952. Budget = 20.00M,
  953. Conversation = true,
  954. DefaultLock = false,
  955. Duration = 0.50M,
  956. EndPeriod = period1,
  957. Estimates = false,
  958. RequiredNewportCompany = false,
  959. RequiredNpc = true,
  960. RequiredRealizationTask = false,
  961. StartPeriod = period3,
  962. WorkloadPlayer = 2.00M,
  963. WorkloadNpc = 2.00M
  964. };
  965. context.ManagementActions.Add(ma4);
  966. ManagementAction ma5 = new ManagementAction()
  967. {
  968. Name = "Invite somebody to Flash à GoGo",
  969. Budget = 50.00M,
  970. Conversation = true,
  971. DefaultLock = false,
  972. Duration = 0.50M,
  973. EndPeriod = period1,
  974. Estimates = false,
  975. RequiredNewportCompany = false,
  976. RequiredNpc = true,
  977. RequiredRealizationTask = false,
  978. StartPeriod = period3,
  979. WorkloadPlayer = 3.00M,
  980. WorkloadNpc = 3.00M
  981. };
  982. context.ManagementActions.Add(ma5);
  983. ManagementAction ma6 = new ManagementAction()
  984. {
  985. Name = "Invite somebody to The Sniffer",
  986. Budget = 150.00M,
  987. Conversation = true,
  988. DefaultLock = false,
  989. Duration = 0.50M,
  990. EndPeriod = period1,
  991. Estimates = false,
  992. RequiredNewportCompany = false,
  993. RequiredNpc = true,
  994. RequiredRealizationTask = false,
  995. StartPeriod = period3,
  996. WorkloadPlayer = 4.00M,
  997. WorkloadNpc = 4.00M
  998. };
  999. context.ManagementActions.Add(ma6);
  1000. ManagementAction ma7 = new ManagementAction()
  1001. {
  1002. Name = "Coach Team Member on Soft-Skills",
  1003. Budget = 0.00M,
  1004. Conversation = false,
  1005. DefaultLock = false,
  1006. Duration = 1.00M,
  1007. EndPeriod = period2,
  1008. Estimates = false,
  1009. RequiredNewportCompany = false,
  1010. RequiredNpc = true,
  1011. RequiredRealizationTask = false,
  1012. StartPeriod = period3,
  1013. WorkloadPlayer = 4.00M,
  1014. WorkloadNpc = 8.00M
  1015. };
  1016. context.ManagementActions.Add(ma7);
  1017. ManagementAction ma8 = new ManagementAction()
  1018. {
  1019. Name = "Coach Team Member on Project Management",
  1020. Budget = 0.00M,
  1021. Conversation = false,
  1022. DefaultLock = false,
  1023. Duration = 1.00M,
  1024. EndPeriod = period2,
  1025. Estimates = false,
  1026. RequiredNewportCompany = false,
  1027. RequiredNpc = true,
  1028. RequiredRealizationTask = false,
  1029. StartPeriod = period3,
  1030. WorkloadPlayer = 4.00M,
  1031. WorkloadNpc = 8.00M
  1032. };
  1033. context.ManagementActions.Add(ma8);
  1034. ManagementAction ma9 = new ManagementAction()
  1035. {
  1036. Name = "Ask estimates",
  1037. Budget = 0.00M,
  1038. Conversation = false,
  1039. DefaultLock = false,
  1040. Duration = 1.00M,
  1041. EndPeriod = period1,
  1042. Estimates = true,
  1043. RequiredNewportCompany = false,
  1044. RequiredNpc = true,
  1045. RequiredRealizationTask = true,
  1046. StartPeriod = period3,
  1047. WorkloadPlayer = 0.50M,
  1048. WorkloadNpc = 1.00M
  1049. };
  1050. context.ManagementActions.Add(ma9);
  1051. ManagementAction ma10 = new ManagementAction()
  1052. {
  1053. Name = "Ask actual workload on a performed realization task",
  1054. Budget = 0.00M,
  1055. Conversation = false,
  1056. DefaultLock = false,
  1057. Duration = 0.50M,
  1058. EndPeriod = period2,
  1059. Estimates = false,
  1060. RequiredNewportCompany = false,
  1061. RequiredNpc = true,
  1062. RequiredRealizationTask = true,
  1063. StartPeriod = period3,
  1064. WorkloadPlayer = 0.50M,
  1065. WorkloadNpc = 0.50M
  1066. };
  1067. context.ManagementActions.Add(ma10);
  1068. context.SaveChanges();
  1069. EventDecisionDetail edd;
  1070. event1.AddEventDecisionDetail(1, "Talk to Will again.", true, event2, null, false, 1.00M, 0.00M, 0.00M, null,
  1071. null);
  1072. EventDecisionDetail edd1 = event1.GetBySeqNbr(1);
  1073. edd1.AddSkill(SHCO, 1.00M);
  1074. edd1.AddSkill(SSSS, 0.33M);
  1075. context.SaveChanges();
  1076. event1.AddEventDecisionDetail(2, "Talk to Frank Foert", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
  1077. null);
  1078. EventDecisionDetail edd2 = event1.GetBySeqNbr(2);
  1079. edd2.AddSkill(SHCO, 1.00M);
  1080. edd2.AddSkill(SSSS, 0.33M);
  1081. context.SaveChanges();
  1082. event1.AddEventDecisionDetail(3, "Talk to Al Cover", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
  1083. null);
  1084. EventDecisionDetail edd3 = event1.GetBySeqNbr(3);
  1085. edd3.AddSkill(SSSS, 0.33M);
  1086. edd3.AddSkill(SHCO, 0.50M);
  1087. context.SaveChanges();
  1088. event1.AddEventDecisionDetail(4, "Talk to Lizz Burn", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
  1089. null);
  1090. EventDecisionDetail edd4 = event1.GetBySeqNbr(4);
  1091. edd4.AddSkill(SSSS, 0.33M);
  1092. edd4.AddSkill(SHCO, 0.50M);
  1093. context.SaveChanges();
  1094. event1.AddEventDecisionDetail(5, "Talk to Catherine Rolle", true, null, null, false, 1.00M, 0.00M, 0.00M,
  1095. null, null);
  1096. EventDecisionDetail edd5 = event1.GetBySeqNbr(5);
  1097. edd5.AddSkill(SHCO, 1.00M);
  1098. edd5.AddSkill(SSSS, 0.33M);
  1099. context.SaveChanges();
  1100. event1.AddEventDecisionDetail(6, "Talk to Eve Ribodie", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
  1101. null);
  1102. EventDecisionDetail edd6 = event1.GetBySeqNbr(6);
  1103. edd6.AddSkill(SHCO, 0.50M);
  1104. edd6.AddSkill(SSSS, 0.33M);
  1105. context.SaveChanges();
  1106. event1.AddEventDecisionDetail(7, "Talk to George Ent", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
  1107. null);
  1108. EventDecisionDetail edd7 = event1.GetBySeqNbr(7);
  1109. edd7.AddSkill(SHCO, 0.50M);
  1110. edd7.AddSkill(SSSS, 0.33M);
  1111. context.SaveChanges();
  1112. event1.AddEventDecisionDetail(8, "Talk to Annie Bodit", true, null, null, false, 1.00M, 0.00M, 0.00M, null,
  1113. null);
  1114. EventDecisionDetail edd8 = event1.GetBySeqNbr(8);
  1115. edd8.AddSkill(SHCO, 0.50M);
  1116. edd8.AddSkill(SSSS, 0.33M);
  1117. context.SaveChanges();
  1118. context.SaveChanges();
  1119. event1.AddSkill(SHCO, 3.00M);
  1120. event1.AddSkill(SSSS, 1.00M);
  1121. event2.AddEventDecisionDetail(1,
  1122. "Can you please tell me more about the safety instructions for construction projects?",
  1123. true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
  1124. EventDecisionDetail edd9 = event2.GetBySeqNbr(1);
  1125. context.SaveChanges();
  1126. event2.AddEventDecisionDetail(2, "Is it possible to indicate me how you see the painting works?", true, null,
  1127. null, false, 1.00M, 0.00M, 0.00M, null, null);
  1128. EventDecisionDetail edd10 = event2.GetBySeqNbr(2);
  1129. context.SaveChanges();
  1130. event2.AddEventDecisionDetail(3,
  1131. "Would you be able to indicate to me your priorities on the triple constraint?",
  1132. true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
  1133. EventDecisionDetail edd11 = event2.GetBySeqNbr(3);
  1134. context.SaveChanges();
  1135. event2.AddEventDecisionDetail(4, "Could you provide me insight in the specific ICT requirements?", true,
  1136. null, null, false, 1.00M, 0.00M, 0.00M, null, null);
  1137. EventDecisionDetail edd12 = event2.GetBySeqNbr(4);
  1138. context.SaveChanges();
  1139. event2.AddEventDecisionDetail(5,
  1140. "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?",
  1141. true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
  1142. EventDecisionDetail edd13 = event2.GetBySeqNbr(5);
  1143. context.SaveChanges();
  1144. event2.AddEventDecisionDetail(6,
  1145. "Do you think that this project is supported by Districo's Senior Management?",
  1146. true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
  1147. EventDecisionDetail edd14 = event2.GetBySeqNbr(6);
  1148. context.SaveChanges();
  1149. event2.AddEventDecisionDetail(7, "Have you any idea how Mr. Cover performed on this project to-date?", true,
  1150. null, null, false, 1.00M, 0.00M, 0.00M, null, null);
  1151. EventDecisionDetail edd15 = event2.GetBySeqNbr(7);
  1152. context.SaveChanges();
  1153. event2.AddEventDecisionDetail(8, "Has Districo already performed in the past this kind of projects?", true,
  1154. null, null, false, 1.00M, 0.00M, 0.00M, null, null);
  1155. EventDecisionDetail edd16 = event2.GetBySeqNbr(8);
  1156. context.SaveChanges();
  1157. event2.AddEventDecisionDetail(9,
  1158. "I noted that Mss. Burn is your executive assistant. Can she be involved as a team member for this project?",
  1159. true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
  1160. EventDecisionDetail edd17 = event2.GetBySeqNbr(9);
  1161. context.SaveChanges();
  1162. event2.AddEventDecisionDetail(10,
  1163. "I note that the Marbella Heights is an upstading location. Wouldn't that be a perfect location for the training center?",
  1164. true, null, null, false, 1.00M, 0.00M, 0.00M, null, null);
  1165. EventDecisionDetail edd18 = event2.GetBySeqNbr(10);
  1166. context.SaveChanges();
  1167. context.SaveChanges();
  1168. event3.AddEventDecisionDetail(1, "Template: Project Charter", false, event6, null, false, 0.00M, 0.00M,
  1169. 50.00M, 0.00M, null);
  1170. EventDecisionDetail edd19 = event3.GetBySeqNbr(1);
  1171. edd19.AddSkill(SHIN, 1.00M);
  1172. context.SaveChanges();
  1173. event3.AddEventDecisionDetail(2, "Template: Master Project Plan", false, null, null, false, 0.00M, 0.00M,
  1174. 50.00M, 0.00M, null);
  1175. EventDecisionDetail edd20 = event3.GetBySeqNbr(2);
  1176. edd20.AddSkill(SHIN, 1.00M);
  1177. context.SaveChanges();
  1178. event3.AddEventDecisionDetail(3, "Template: Project Scope Definition - Vision Document", false, null, null,
  1179. false, 0.00M, 0.00M, 50.00M, 0.00M, null);
  1180. EventDecisionDetail edd21 = event3.GetBySeqNbr(3);
  1181. context.SaveChanges();
  1182. event3.AddEventDecisionDetail(4, "Template: Project flexibility matrix", false, null, null, false, 0.00M,
  1183. 0.00M, 50.00M, 0.00M, null);
  1184. EventDecisionDetail edd22 = event3.GetBySeqNbr(4);
  1185. context.SaveChanges();
  1186. event3.AddEventDecisionDetail(5, "Template: Scope change control procedure", false, null, null, false, 0.00M,
  1187. 0.00M, 50.00M, 0.00M, null);
  1188. EventDecisionDetail edd23 = event3.GetBySeqNbr(5);
  1189. edd23.AddSkill(SHSC, 1.00M);
  1190. context.SaveChanges();
  1191. event3.AddEventDecisionDetail(6, "Template: Deliverables definition form", false, null, null, false, 0.00M,
  1192. 0.00M, 50.00M, 0.00M, null);
  1193. EventDecisionDetail edd24 = event3.GetBySeqNbr(6);
  1194. context.SaveChanges();
  1195. event3.AddEventDecisionDetail(7, "Template: Project alternatives trade-off table", false, null, null, false,
  1196. 0.00M, 0.00M, 50.00M, 0.00M, null);
  1197. EventDecisionDetail edd25 = event3.GetBySeqNbr(7);
  1198. context.SaveChanges();
  1199. event3.AddEventDecisionDetail(8, "Template: Planning & Scheduling: Tasks list", false, null, null, false,
  1200. 0.00M, 0.00M, 50.00M, 0.00M, null);
  1201. EventDecisionDetail edd26 = event3.GetBySeqNbr(8);
  1202. context.SaveChanges();
  1203. event3.AddEventDecisionDetail(9, "Template: Communications Matrix", false, null, null, false, 0.00M, 0.00M,
  1204. 50.00M, 0.00M, null);
  1205. EventDecisionDetail edd27 = event3.GetBySeqNbr(9);
  1206. edd27.AddSkill(SHCM, 1.00M);
  1207. context.SaveChanges();
  1208. event3.AddEventDecisionDetail(10, "Template: Vendor assessment checklist", false, null, null, false, 0.00M,
  1209. 0.00M, 50.00M, 0.00M, null);
  1210. EventDecisionDetail edd28 = event3.GetBySeqNbr(10);
  1211. context.SaveChanges();
  1212. event3.AddEventDecisionDetail(11, "Template: Status Meeting Agenda & Minutes", false, null, null, false,
  1213. 0.00M, 0.00M, 50.00M, 0.00M, null);
  1214. EventDecisionDetail edd29 = event3.GetBySeqNbr(11);
  1215. edd29.AddSkill(SHCM, 1.00M);
  1216. context.SaveChanges();
  1217. event3.AddEventDecisionDetail(12, "Template: Steering Group meeting agenda & minutes", false, null, null,
  1218. false, 0.00M, 0.00M, 50.00M, 0.00M, null);
  1219. EventDecisionDetail edd30 = event3.GetBySeqNbr(12);
  1220. edd30.AddSkill(SHCM, 1.00M);
  1221. context.SaveChanges();
  1222. event3.AddEventDecisionDetail(13, "Template: Effective meetings checklist", false, null, null, false, 0.00M,
  1223. 0.00M, 50.00M, 0.00M, null);
  1224. EventDecisionDetail edd31 = event3.GetBySeqNbr(13);
  1225. context.SaveChanges();
  1226. event3.AddEventDecisionDetail(14, "Template: Project or software release one-page summary", false, null,
  1227. null, false, 0.00M, 0.00M, 50.00M, 0.00M, null);
  1228. EventDecisionDetail edd32 = event3.GetBySeqNbr(14);
  1229. context.SaveChanges();
  1230. event3.AddEventDecisionDetail(15, "Template: RFP for training program development", false, null, null, false,
  1231. 0.00M, 0.00M, 50.00M, 0.00M, null);
  1232. EventDecisionDetail edd33 = event3.GetBySeqNbr(15);
  1233. context.SaveChanges();
  1234. event3.AddEventDecisionDetail(16, "Template: Scope change request", false, null, null, false, 0.00M, 0.00M,
  1235. 50.00M, 0.00M, null);
  1236. EventDecisionDetail edd34 = event3.GetBySeqNbr(16);
  1237. edd34.AddSkill(SHSC, 1.00M);
  1238. context.SaveChanges();
  1239. event3.AddEventDecisionDetail(17, "Template: Decision matrix", false, null, null, false, 0.00M, 0.00M,
  1240. 50.00M, 0.00M, null);
  1241. EventDecisionDetail edd35 = event3.GetBySeqNbr(17);
  1242. context.SaveChanges();
  1243. event3.AddEventDecisionDetail(18, "Template: Risk, opportunity & issues register", false, null, null, false,
  1244. 0.00M, 0.00M, 50.00M, 0.00M, null);
  1245. EventDecisionDetail edd36 = event3.GetBySeqNbr(18);
  1246. edd36.AddSkill(SHRI, 1.00M);
  1247. context.SaveChanges();
  1248. event3.AddEventDecisionDetail(19, "Template: Project status report", false, null, null, false, 0.00M, 0.00M,
  1249. 50.00M, 0.00M, null);
  1250. EventDecisionDetail edd37 = event3.GetBySeqNbr(19);
  1251. edd37.AddSkill(SHCM, 1.00M);
  1252. context.SaveChanges();
  1253. event3.AddEventDecisionDetail(20, "Template: Lessons learned document", false, null, ma1, true, 0.00M, 0.00M,
  1254. 50.00M, 0.00M, null);
  1255. EventDecisionDetail edd38 = event3.GetBySeqNbr(20);
  1256. edd38.AddSkill(SHIN, 1.00M);
  1257. context.SaveChanges();
  1258. context.SaveChanges();
  1259. event3.AddSkill(SHIN, 3.00M);
  1260. event3.AddSkill(SHCM, 4.00M);
  1261. event3.AddSkill(SHSC, 2.00M);
  1262. event3.AddSkill(SHRI, 1.00M);
  1263. event4.AddEventDecisionDetail(1, "Talk to Frank concerning his attitude. ", false, event7, null, false,
  1264. 0.00M, 0.00M, 0.00M, 0.00M, null);
  1265. EventDecisionDetail edd39 = event4.GetBySeqNbr(1);
  1266. edd39.AddSkill(SSSS, 0.25M);
  1267. context.SaveChanges();
  1268. event4.AddEventDecisionDetail(2, "Do not mind Franks reaction. It is not that important.", false, null, null,
  1269. false, 0.00M, 0.00M, 0.00M, 0.00M, null);
  1270. EventDecisionDetail edd40 = event4.GetBySeqNbr(2);
  1271. edd40.AddSkill(SSSS, -0.25M);
  1272. context.SaveChanges();
  1273. context.SaveChanges();
  1274. event4.AddSkill(SSSS, 0.25M);
  1275. context.SaveChanges();
  1276. event7.AddEventDecisionDetail(1, "Reprimand Frank in a strong way!", true, null, null, false, 1.00M, 1.00M,
  1277. 0.00M, 1.00M, sth2);
  1278. EventDecisionDetail edd41 = event7.GetBySeqNbr(1);
  1279. edd41.AddSkill(SSSS, -0.50M);
  1280. edd41.AddSkill(RESY, -2.00M);
  1281. edd41.AddSkill(REAN, 2.00M);
  1282. context.SaveChanges();
  1283. event7.AddEventDecisionDetail(2, "Show your point of view.", true, null, null, false, 1.00M, 1.00M, 0.00M,
  1284. 1.00M, sth2);
  1285. EventDecisionDetail edd42 = event7.GetBySeqNbr(2);
  1286. edd42.AddSkill(REAN, 1.00M);
  1287. edd42.AddSkill(RESY, -1.00M);
  1288. context.SaveChanges();
  1289. event7.AddEventDecisionDetail(3, "Provide help to Frank.", true, null, null, false, 2.00M, 1.00M, 0.00M,
  1290. 2.00M, sth2);
  1291. EventDecisionDetail edd43 = event7.GetBySeqNbr(3);
  1292. edd43.AddSkill(SSSS, 0.50M);
  1293. edd43.AddSkill(RESY, 1.00M);
  1294. context.SaveChanges();
  1295. context.SaveChanges();
  1296. event7.AddSkill(SSSS, 0.50M);
  1297. ma2.AddSkill(SSTE, 0.25M);
  1298. ma3.AddSkill(NSIT, 0.25M);
  1299. ma4.AddSkill(SSSS, 0.25M);
  1300. ma4.AddSkill(RESY, 0.05M);
  1301. ma5.AddSkill(SSSS, 0.25M);
  1302. ma5.AddSkill(RESY, 0.10M);
  1303. ma6.AddSkill(SSSS, 0.25M);
  1304. ma6.AddSkill(RESY, 0.15M);
  1305. ma7.AddSkill(SSEX, 0.10M);
  1306. ma7.AddSkill(SSLS, 0.10M);
  1307. ma7.AddSkill(SSTW, 0.10M);
  1308. ma7.AddSkill(NSIS, 0.50M);
  1309. ma7.AddSkill(NSIW, 0.10M);
  1310. ma8.AddSkill(SSEX, 0.10M);
  1311. ma8.AddSkill(SSLS, 0.25M);
  1312. ma8.AddSkill(SSTW, 0.10M);
  1313. ma8.AddSkill(NSIP, 0.50M);
  1314. ma8.AddSkill(NSIW, 0.10M);
  1315. context.SaveChanges();
  1316. sth1.AddSkill(SSCR, 5.00M);
  1317. sth1.AddSkill(SSPE, 3.00M);
  1318. sth1.AddSkill(SSTE, 2.00M);
  1319. sth1.AddSkill(SSEX, 4.00M);
  1320. sth1.AddSkill(SSSS, 4.00M);
  1321. sth1.AddSkill(SSLS, 5.00M);
  1322. sth1.AddSkill(SSTW, 1.00M);
  1323. sth1.AddSkill(REAN, 1.00M);
  1324. sth1.AddSkill(RESY, 4.00M);
  1325. sth2.AddSkill(SSCR, 4.00M);
  1326. sth2.AddSkill(SSPE, 1.00M);
  1327. sth2.AddSkill(SSTE, 4.00M);
  1328. sth2.AddSkill(SSEX, 4.00M);
  1329. sth2.AddSkill(SSSS, 5.00M);
  1330. sth2.AddSkill(SSLS, 4.00M);
  1331. sth2.AddSkill(SSTW, 4.00M);
  1332. sth2.AddSkill(REAN, 3.00M);
  1333. sth2.AddSkill(RESY, 1.00M);
  1334. sth3.AddSkill(SSCR, 4.00M);
  1335. sth3.AddSkill(SSPE, 1.00M);
  1336. sth3.AddSkill(SSTE, 3.00M);
  1337. sth3.AddSkill(SSEX, 4.00M);
  1338. sth3.AddSkill(SSSS, 1.00M);
  1339. sth3.AddSkill(SSLS, 1.00M);
  1340. sth3.AddSkill(SSTW, 2.00M);
  1341. sth3.AddSkill(REAN, 2.00M);
  1342. sth3.AddSkill(RESY, 3.00M);
  1343. sth4.AddSkill(SSCR, 4.00M);
  1344. sth4.AddSkill(SSPE, 1.00M);
  1345. sth4.AddSkill(SSTE, 1.00M);
  1346. sth4.AddSkill(SSEX, 3.00M);
  1347. sth4.AddSkill(SSSS, 3.00M);
  1348. sth4.AddSkill(SSLS, 1.00M);
  1349. sth4.AddSkill(SSTW, 4.00M);
  1350. sth4.AddSkill(REAN, 2.00M);
  1351. sth4.AddSkill(RESY, 2.00M);
  1352. sth5.AddSkill(SSCR, 5.00M);
  1353. sth5.AddSkill(SSPE, 1.00M);
  1354. sth5.AddSkill(SSTE, 4.00M);
  1355. sth5.AddSkill(SSEX, 4.00M);
  1356. sth5.AddSkill(SSSS, 1.00M);
  1357. sth5.AddSkill(SSLS, 4.00M);
  1358. sth5.AddSkill(SSTW, 1.00M);
  1359. sth5.AddSkill(REAN, 4.00M);
  1360. sth5.AddSkill(RESY, 1.00M);
  1361. sth9.AddSkill(SSCR, 4.00M);
  1362. sth9.AddSkill(SSPE, 3.00M);
  1363. sth9.AddSkill(SSTE, 3.00M);
  1364. sth9.AddSkill(SSEX, 3.00M);
  1365. sth9.AddSkill(SSSS, 2.00M);
  1366. sth9.AddSkill(SSLS, 1.00M);
  1367. sth9.AddSkill(SSTW, 1.00M);
  1368. sth9.AddSkill(REAN, 1.00M);
  1369. sth9.AddSkill(RESY, 3.00M);
  1370. EventDecisionDetail el = null;
  1371. el = edd1;
  1372. Conversation co1 = new Conversation()
  1373. {
  1374. Diplomacy = 0.00M,
  1375. EndPeriod = period1,
  1376. EventDecisionDetail = el,
  1377. ManagementActionLock = null,
  1378. ManagementActionLockToggle = false,
  1379. Npc = sth1,
  1380. NpcText = "Of course... How can I help you?",
  1381. PlayerText =
  1382. "Hi again Mr. Broock. Thanks for the introduction. I would like to ask you some more questions, if possible.",
  1383. StartPeriod = period1
  1384. };
  1385. context.Conversations.Add(co1);
  1386. el = edd2;
  1387. Conversation co2 = new Conversation()
  1388. {
  1389. Diplomacy = 0.00M,
  1390. EndPeriod = period1,
  1391. EventDecisionDetail = el,
  1392. ManagementActionLock = null,
  1393. ManagementActionLockToggle = false,
  1394. Npc = sth2,
  1395. NpcText =
  1396. "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. ",
  1397. PlayerText =
  1398. "Hello Frank! Can you please provide me with some background information on the project?",
  1399. StartPeriod = period1
  1400. };
  1401. context.Conversations.Add(co2);
  1402. el = edd3;
  1403. Conversation co3 = new Conversation()
  1404. {
  1405. Diplomacy = 0.00M,
  1406. EndPeriod = period1,
  1407. EventDecisionDetail = el,
  1408. ManagementActionLock = null,
  1409. ManagementActionLockToggle = false,
  1410. Npc = sth3,
  1411. NpcText =
  1412. "I hope that I can support you in many ways on this project. Collaboration is crucial!",
  1413. PlayerText =
  1414. "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?",
  1415. StartPeriod = period1
  1416. };
  1417. context.Conversations.Add(co3);
  1418. el = edd4;
  1419. Conversation co4 = new Conversation()
  1420. {
  1421. Diplomacy = 0.00M,
  1422. EndPeriod = period1,
  1423. EventDecisionDetail = el,
  1424. ManagementActionLock = null,
  1425. ManagementActionLockToggle = false,
  1426. Npc = sth4,
  1427. NpcText =
  1428. "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.",
  1429. PlayerText =
  1430. "Hello Lizz. Nice to meet you at last! I have hear a lot about you...",
  1431. StartPeriod = period1
  1432. };
  1433. context.Conversations.Add(co4);
  1434. el = edd5;
  1435. Conversation co5 = new Conversation()
  1436. {
  1437. Diplomacy = 0.00M,
  1438. EndPeriod = period1,
  1439. EventDecisionDetail = el,
  1440. ManagementActionLock = null,
  1441. ManagementActionLockToggle = false,
  1442. Npc = sth5,
  1443. NpcText =
  1444. "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.",
  1445. PlayerText =
  1446. "Hello Mss. Rolle. May I disturb you? I am very pleased that you gave me the opportunity to take responsibility for this project.",
  1447. StartPeriod = period1
  1448. };
  1449. context.Conversations.Add(co5);
  1450. el = edd6;
  1451. Conversation co6 = new Conversation()
  1452. {
  1453. Diplomacy = 0.00M,
  1454. EndPeriod = period1,
  1455. EventDecisionDetail = el,
  1456. ManagementActionLock = null,
  1457. ManagementActionLockToggle = false,
  1458. Npc = sth6,
  1459. NpcText =
  1460. "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.",
  1461. PlayerText = "Hi Eve! How are you today?",
  1462. StartPeriod = period1
  1463. };
  1464. context.Conversations.Add(co6);
  1465. el = edd7;
  1466. Conversation co7 = new Conversation()
  1467. {
  1468. Diplomacy = 0.00M,
  1469. EndPeriod = period1,
  1470. EventDecisionDetail = el,
  1471. ManagementActionLock = null,
  1472. ManagementActionLockToggle = false,
  1473. Npc = sth7,
  1474. NpcText =
  1475. "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.",
  1476. PlayerText = "Euh... you must be George, isn't it?",
  1477. StartPeriod = period1
  1478. };
  1479. context.Conversations.Add(co7);
  1480. el = edd8;
  1481. Conversation co8 = new Conversation()
  1482. {
  1483. Diplomacy = 0.00M,
  1484. EndPeriod = period1,
  1485. EventDecisionDetail = el,
  1486. ManagementActionLock = null,
  1487. ManagementActionLockToggle = false,
  1488. Npc = sth8,
  1489. NpcText =
  1490. "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.",
  1491. PlayerText =
  1492. "Hello, aren't you the Services Manager? I forgot your name, how was it again?",
  1493. StartPeriod = period1
  1494. };
  1495. context.Conversations.Add(co8);
  1496. el = edd9;
  1497. Conversation co9 = new Conversation()
  1498. {
  1499. Diplomacy = 0.00M,
  1500. EndPeriod = period1,
  1501. EventDecisionDetail = el,
  1502. ManagementActionLock = null,
  1503. ManagementActionLockToggle = false,
  1504. Npc = sth1,
  1505. NpcText =
  1506. "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.",
  1507. PlayerText =
  1508. "Can you please tell me more about the safety instructions for construction projects?",
  1509. StartPeriod = period1
  1510. };
  1511. context.Conversations.Add(co9);
  1512. el = edd10;
  1513. Conversation co10 = new Conversation()
  1514. {
  1515. Diplomacy = 0.00M,
  1516. EndPeriod = period1,
  1517. EventDecisionDetail = el,
  1518. ManagementActionLock = null,
  1519. ManagementActionLockToggle = false,
  1520. Npc = sth1,
  1521. NpcText =
  1522. "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...",
  1523. PlayerText =
  1524. "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.",
  1525. StartPeriod = period1
  1526. };
  1527. context.Conversations.Add(co10);
  1528. el = edd11;
  1529. Conversation co11 = new Conversation()
  1530. {
  1531. Diplomacy = 0.00M,
  1532. EndPeriod = period1,
  1533. EventDecisionDetail = el,
  1534. ManagementActionLock = null,
  1535. ManagementActionLockToggle = false,
  1536. Npc = sth1,
  1537. NpcText =
  1538. "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.",
  1539. PlayerText =
  1540. "Would you be able to indicate to me your priorities on the triple constraint?",
  1541. StartPeriod = period1
  1542. };
  1543. context.Conversations.Add(co11);
  1544. el = edd12;
  1545. Conversation co12 = new Conversation()
  1546. {
  1547. Diplomacy = 0.00M,
  1548. EndPeriod = period1,
  1549. EventDecisionDetail = el,
  1550. ManagementActionLock = null,
  1551. ManagementActionLockToggle = false,
  1552. Npc = sth1,
  1553. NpcText =
  1554. "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.",
  1555. PlayerText =
  1556. "Could you provide me the requirements of the ICT network infrastructure as well as the required software installation?",
  1557. StartPeriod = period1
  1558. };
  1559. context.Conversations.Add(co12);
  1560. el = edd13;
  1561. Conversation co13 = new Conversation()
  1562. {
  1563. Diplomacy = 0.00M,
  1564. EndPeriod = period1,
  1565. EventDecisionDetail = el,
  1566. ManagementActionLock = null,
  1567. ManagementActionLockToggle = false,
  1568. Npc = sth1,
  1569. NpcText =
  1570. "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!",
  1571. PlayerText =
  1572. "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?",
  1573. StartPeriod = period1
  1574. };
  1575. context.Conversations.Add(co13);
  1576. el = edd14;
  1577. Conversation co14 = new Conversation()
  1578. {
  1579. Diplomacy = 0.00M,
  1580. EndPeriod = period1,
  1581. EventDecisionDetail = el,
  1582. ManagementActionLock = null,
  1583. ManagementActionLockToggle = false,
  1584. Npc = sth1,
  1585. NpcText =
  1586. "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.",
  1587. PlayerText =
  1588. "Do you think that this project is supported by Districo's Senior Management?",
  1589. StartPeriod = period1
  1590. };
  1591. context.Conversations.Add(co14);
  1592. el = edd15;
  1593. Conversation co15 = new Conversation()
  1594. {
  1595. Diplomacy = 0.00M,
  1596. EndPeriod = period1,
  1597. EventDecisionDetail = el,
  1598. ManagementActionLock = null,
  1599. ManagementActionLockToggle = false,
  1600. Npc = sth1,
  1601. NpcText =
  1602. "That is a question for Frank! But into my knowledge, Al has not been working yet on this project. Just ask Frank...",
  1603. PlayerText =
  1604. "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.",
  1605. StartPeriod = period1
  1606. };
  1607. context.Conversations.Add(co15);
  1608. el = edd16;
  1609. Conversation co16 = new Conversation()
  1610. {
  1611. Diplomacy = 0.00M,
  1612. EndPeriod = period1,
  1613. EventDecisionDetail = el,
  1614. ManagementActionLock = null,
  1615. ManagementActionLockToggle = false,
  1616. Npc = sth1,
  1617. NpcText =
  1618. "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. ",
  1619. PlayerText = "Has Districo already peformed this kind of projects in the past?",
  1620. StartPeriod = period1
  1621. };
  1622. context.Conversations.Add(co16);
  1623. el = edd17;
  1624. Conversation co17 = new Conversation()
  1625. {
  1626. Diplomacy = 0.00M,
  1627. EndPeriod = period1,
  1628. EventDecisionDetail = el,
  1629. ManagementActionLock = null,
  1630. ManagementActionLockToggle = false,
  1631. Npc = sth1,
  1632. NpcText =
  1633. "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.",
  1634. PlayerText =
  1635. "I noted that Mss. Burn is your executive assistant. Can she be involved as a team member for this project?",
  1636. StartPeriod = period1
  1637. };
  1638. context.Conversations.Add(co17);
  1639. el = edd18;
  1640. Conversation co18 = new Conversation()
  1641. {
  1642. Diplomacy = 0.00M,
  1643. EndPeriod = period1,
  1644. EventDecisionDetail = el,
  1645. ManagementActionLock = null,
  1646. ManagementActionLockToggle = false,
  1647. Npc = sth1,
  1648. NpcText =
  1649. "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.",
  1650. PlayerText =
  1651. "I note that the Marbella Heights is an upstanding location. Wouldn't that be a perfect location for the training center?",
  1652. StartPeriod = period1
  1653. };
  1654. context.Conversations.Add(co18);
  1655. el = null;
  1656. Conversation co19 = new Conversation()
  1657. {
  1658. Diplomacy = 0.00M,
  1659. EndPeriod = period1,
  1660. EventDecisionDetail = el,
  1661. ManagementActionLock = ma6,
  1662. ManagementActionLockToggle = false,
  1663. Npc = sth4,
  1664. NpcText =
  1665. "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...",
  1666. PlayerText = "The food is very nice here at The Sniffer, don't you think?",
  1667. StartPeriod = period1
  1668. };
  1669. context.Conversations.Add(co19);
  1670. el = null;
  1671. Conversation co20 = new Conversation()
  1672. {
  1673. Diplomacy = 3.00M,
  1674. EndPeriod = period2,
  1675. EventDecisionDetail = el,
  1676. ManagementActionLock = ma6,
  1677. ManagementActionLockToggle = false,
  1678. Npc = sth4,
  1679. NpcText =
  1680. "Me too, but for the second period, I really can't give you some tips for the project. ",
  1681. PlayerText = "Hello Lizz. I like our small meetings at The Sniffer.",
  1682. StartPeriod = period2
  1683. };
  1684. context.Conversations.Add(co20);
  1685. el = null;
  1686. Conversation co21 = new Conversation()
  1687. {
  1688. Diplomacy = 0.00M,
  1689. EndPeriod = period2,
  1690. EventDecisionDetail = el,
  1691. ManagementActionLock = ma6,
  1692. ManagementActionLockToggle = false,
  1693. Npc = sth4,
  1694. NpcText = "Well, I'm just here because Mr. Broock told me I had to be here!",
  1695. PlayerText = "Hello Lizz, I appreciate your company here at The Sniffer.",
  1696. StartPeriod = period2
  1697. };
  1698. context.Conversations.Add(co21);
  1699. el = edd41;
  1700. Conversation co22 = new Conversation()
  1701. {
  1702. Diplomacy = 0.00M,
  1703. EndPeriod = period1,
  1704. EventDecisionDetail = el,
  1705. ManagementActionLock = null,
  1706. ManagementActionLockToggle = false,
  1707. Npc = sth2,
  1708. NpcText = "Do whatever you want! ",
  1709. PlayerText =
  1710. "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!",
  1711. StartPeriod = period3
  1712. };
  1713. context.Conversations.Add(co22);
  1714. el = edd42;
  1715. Conversation co23 = new Conversation()
  1716. {
  1717. Diplomacy = 0.00M,
  1718. EndPeriod = period1,
  1719. EventDecisionDetail = el,
  1720. ManagementActionLock = null,
  1721. ManagementActionLockToggle = false,
  1722. Npc = sth2,
  1723. NpcText = "Hmmm....",
  1724. PlayerText =
  1725. "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.",
  1726. StartPeriod = period3
  1727. };
  1728. context.Conversations.Add(co23);
  1729. el = edd43;
  1730. Conversation co24 = new Conversation()
  1731. {
  1732. Diplomacy = 0.00M,
  1733. EndPeriod = period1,
  1734. EventDecisionDetail = el,
  1735. ManagementActionLock = null,
  1736. ManagementActionLockToggle = false,
  1737. Npc = sth2,
  1738. NpcText =
  1739. "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.",
  1740. PlayerText =
  1741. "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?",
  1742. StartPeriod = period3
  1743. };
  1744. context.Conversations.Add(co24);
  1745. Document doc;
  1746. doc = new Document()
  1747. {
  1748. Description = "Welcome",
  1749. DocumentType = dt1,
  1750. Event = event1,
  1751. FileName = "A-P01E01-v2 - Welcome E-mail from Will Broock.pdf",
  1752. Name = "P01E01",
  1753. Period = null
  1754. };
  1755. context.Documents.Add(doc);
  1756. doc = new Document()
  1757. {
  1758. Description = "Attachment to Welcome mail",
  1759. DocumentType = dt4,
  1760. Event = event1,
  1761. FileName = "A-P01D04 - Memo Project Description.pdf",
  1762. Name = "P01D04",
  1763. Period = null
  1764. };
  1765. context.Documents.Add(doc);
  1766. doc = new Document()
  1767. {
  1768. Description = "How many templates do you need.",
  1769. DocumentType = dt1,
  1770. Event = event3,
  1771. FileName = "A-P01E02 - E-mail from Peter BORROW.pdf",
  1772. Name = "P01E02",
  1773. Period = period1
  1774. };
  1775. context.Documents.Add(doc);
  1776. doc = new Document()
  1777. {
  1778. Description = "Test audio file type",
  1779. DocumentType = dt2,
  1780. Event = event2,
  1781. FileName = "ping.MP3",
  1782. Name = "P01V01",
  1783. Period = null
  1784. };
  1785. context.Documents.Add(doc);
  1786. doc = new Document()
  1787. {
  1788. Description = "Information about Stakeholder Management.",
  1789. DocumentType = dt3,
  1790. Event = null,
  1791. FileName = "Management Letter \"Stakeholders\"",
  1792. Name = "A-ML001",
  1793. Period = period1
  1794. };
  1795. context.Documents.Add(doc);
  1796. context.SaveChanges();
  1797. }
  1798.  
  1799. protected override void Seed(ProjectManagementContext context)
  1800. {
  1801. try
  1802. {
  1803.  
  1804. GenerateDb(context);
  1805.  
  1806. #region Users
  1807. User admin = new User()
  1808. {
  1809. Email = "admin@hogent.be",
  1810. FirstName = "Steven",
  1811. Name = "Goeman",
  1812. IsAdminstrator = true,
  1813. WritePermissions = true,
  1814. Password = CustomMembershipProvider.Encrypt("123456")
  1815. };
  1816.  
  1817. User kenneth = new User()
  1818. {
  1819. Email = "kenneth@mail.com",
  1820. FirstName = "Kenneth",
  1821. Name = "Witman",
  1822. IsAdminstrator = false,
  1823. WritePermissions = false,
  1824. Password = CustomMembershipProvider.Encrypt("123456")
  1825. };
  1826.  
  1827. User nelis = new User()
  1828. {
  1829. Email = "nelis@mail.com",
  1830. FirstName = "Nelis",
  1831. Name = "Braems",
  1832. IsAdminstrator = false,
  1833. WritePermissions = false,
  1834. Password = CustomMembershipProvider.Encrypt("123456")
  1835. };
  1836.  
  1837. User lennart = new User()
  1838. {
  1839. Email = "lennart@mail.com",
  1840. FirstName = "Lennart",
  1841. Name = "Lapage",
  1842. IsAdminstrator = false,
  1843. WritePermissions = false,
  1844. Password = CustomMembershipProvider.Encrypt("123456")
  1845. };
  1846.  
  1847. User glenn = new User()
  1848. {
  1849. Email = "glenn@mail.com",
  1850. FirstName = "Glenn",
  1851. Name = "Gosse",
  1852. IsAdminstrator = false,
  1853. WritePermissions = false,
  1854. Password = CustomMembershipProvider.Encrypt("123456")
  1855. };
  1856.  
  1857. User steven = new User()
  1858. {
  1859. Email = "steven@mail.com",
  1860. FirstName = "Steven",
  1861. Name = "Van Lunter",
  1862. IsAdminstrator = false,
  1863. WritePermissions = false,
  1864. Password = CustomMembershipProvider.Encrypt("123456")
  1865. };
  1866.  
  1867. User amedeo = new User()
  1868. {
  1869. Email = "amedeo@mail.com",
  1870. FirstName = "Amedeo",
  1871. Name = "Rochtus",
  1872. IsAdminstrator = false,
  1873. WritePermissions = false,
  1874. Password = CustomMembershipProvider.Encrypt("123456")
  1875. };
  1876.  
  1877. User laurent = new User()
  1878. {
  1879. Email = "laurent@mail.com",
  1880. FirstName = "Laurent",
  1881. Name = "De Wilde",
  1882. IsAdminstrator = false,
  1883. WritePermissions = false,
  1884. Password = CustomMembershipProvider.Encrypt("123456")
  1885. };
  1886.  
  1887. User jeroen = new User()
  1888. {
  1889. Email = "jeroen@mail.com",
  1890. FirstName = "Jeroen",
  1891. Name = "Van Eetvelde",
  1892. IsAdminstrator = false,
  1893. WritePermissions = false,
  1894. Password = CustomMembershipProvider.Encrypt("123456")
  1895. };
  1896.  
  1897. User jimi = new User()
  1898. {
  1899. Email = "jimi@mail.com",
  1900. FirstName = "Jimi",
  1901. Name = "Heyndrickxs",
  1902. IsAdminstrator = false,
  1903. WritePermissions = false,
  1904. Password = CustomMembershipProvider.Encrypt("123456")
  1905. };
  1906. #endregion
  1907.  
  1908. #region Periods
  1909. Period period1 = new Period()
  1910. {
  1911. Description = "TestPeriod 1",
  1912. Name = "TestPeriod 1",
  1913. StartDay = 1,
  1914. StartMonth = 1,
  1915. EndDay = 14,
  1916. EndMonth = 1
  1917. };
  1918.  
  1919. Period period2 = new Period()
  1920. {
  1921. Description = "TestPeriod 2",
  1922. Name = "TestPeriod 2",
  1923. StartDay = 15,
  1924. StartMonth = 1,
  1925. EndDay = 29,
  1926. EndMonth = 1
  1927. };
  1928.  
  1929. Period period3 = new Period()
  1930. {
  1931. Description = "TestPeriod 3",
  1932. Name = "TestPeriod 3",
  1933. StartDay = 1,
  1934. StartMonth = 2,
  1935. EndDay = 14,
  1936. EndMonth = 2
  1937. };
  1938. #endregion
  1939.  
  1940. Game game = new Game()
  1941. {
  1942. CurrentPeriod = period2,
  1943. Name = "Game 1"
  1944. };
  1945.  
  1946. #region TeamPeriods
  1947. TeamPeriod teamPeriod1 = new TeamPeriod()
  1948. {
  1949. PeriodLock = false,
  1950. SystemLock = false,
  1951. CalculatedLock = false,
  1952. Period = period1
  1953. };
  1954.  
  1955. TeamPeriod teamPeriod2 = new TeamPeriod()
  1956. {
  1957. PeriodLock = false,
  1958. SystemLock = false,
  1959. CalculatedLock = false,
  1960. Period = period2
  1961. };
  1962.  
  1963. TeamPeriod teamPeriod3 = new TeamPeriod()
  1964. {
  1965. PeriodLock = false,
  1966. SystemLock = false,
  1967. CalculatedLock = false,
  1968. Period = period3
  1969. };
  1970.  
  1971. TeamPeriod teamPeriod4 = new TeamPeriod()
  1972. {
  1973. PeriodLock = true,
  1974. SystemLock = false,
  1975. CalculatedLock = true,
  1976. Period = period1
  1977. };
  1978.  
  1979. TeamPeriod teamPeriod5 = new TeamPeriod()
  1980. {
  1981. PeriodLock = false,
  1982. SystemLock = false,
  1983. CalculatedLock = false,
  1984. Period = period2
  1985. };
  1986.  
  1987. TeamPeriod teamPeriod6 = new TeamPeriod()
  1988. {
  1989. PeriodLock = false,
  1990. SystemLock = false,
  1991. CalculatedLock = false,
  1992. Period = period3
  1993. };
  1994.  
  1995. TeamPeriod teamPeriod7 = new TeamPeriod()
  1996. {
  1997. PeriodLock = true,
  1998. SystemLock = false,
  1999. CalculatedLock = true,
  2000. Period = period1
  2001. };
  2002.  
  2003. TeamPeriod teamPeriod8 = new TeamPeriod()
  2004. {
  2005. PeriodLock = true,
  2006. SystemLock = false,
  2007. CalculatedLock = true,
  2008. Period = period2
  2009. };
  2010.  
  2011. TeamPeriod teamPeriod9 = new TeamPeriod()
  2012. {
  2013. PeriodLock = true,
  2014. SystemLock = false,
  2015. CalculatedLock = true,
  2016. Period = period3
  2017. };
  2018.  
  2019. TeamPeriod teamPeriod10 = new TeamPeriod()
  2020. {
  2021. PeriodLock = true,
  2022. SystemLock = false,
  2023. CalculatedLock = true,
  2024. Period = period1
  2025. };
  2026.  
  2027. TeamPeriod teamPeriod11 = new TeamPeriod()
  2028. {
  2029. PeriodLock = false,
  2030. SystemLock = true,
  2031. CalculatedLock = false,
  2032. Period = period2
  2033. };
  2034.  
  2035. TeamPeriod teamPeriod12 = new TeamPeriod()
  2036. {
  2037. PeriodLock = false,
  2038. SystemLock = false,
  2039. CalculatedLock = false,
  2040. Period = period3
  2041. };
  2042.  
  2043. #endregion
  2044.  
  2045.  
  2046. Team team1 = new Team()
  2047. {
  2048. Name = "Team 1",
  2049. TeamMembers = new Collection<User>() {kenneth, nelis},
  2050. Game = game,
  2051. TeamPeriods = new Collection<TeamPeriod>() { teamPeriod1, teamPeriod2, teamPeriod3 }
  2052. };
  2053. Team team2 = new Team()
  2054. {
  2055. Name = "Team 1",
  2056. TeamMembers = new Collection<User>() { lennart, glenn },
  2057. Game = game,
  2058. TeamPeriods = new Collection<TeamPeriod>() { teamPeriod4, teamPeriod5, teamPeriod6 }
  2059. };
  2060. Team team3 = new Team()
  2061. {
  2062. Name = "Team 1",
  2063. TeamMembers = new Collection<User>() { steven, amedeo },
  2064. Game = game,
  2065. TeamPeriods = new Collection<TeamPeriod>() { teamPeriod7, teamPeriod8, teamPeriod9 }
  2066. };
  2067. Team team4 = new Team()
  2068. {
  2069. Name = "Team 1",
  2070. TeamMembers = new Collection<User>() { jeroen, jimi },
  2071. Game = game,
  2072. TeamPeriods = new Collection<TeamPeriod>() { teamPeriod10, teamPeriod11, teamPeriod12 }
  2073. };
  2074.  
  2075. context.Teams.Add(team1);
  2076. context.Teams.Add(team2);
  2077. context.Teams.Add(team3);
  2078. context.Teams.Add(team4);
  2079.  
  2080. kenneth.Team = team1;
  2081. nelis.Team = team1;
  2082. lennart.Team = team2;
  2083. glenn.Team = team2;
  2084. amedeo.Team = team3;
  2085. steven.Team = team3;
  2086. jimi.Team = team4;
  2087. jeroen.Team = team4;
  2088.  
  2089. context.Users.Add(kenneth);
  2090. context.Users.Add(nelis);
  2091. context.Users.Add(steven);
  2092. context.Users.Add(lennart);
  2093. context.Users.Add(glenn);
  2094. context.Users.Add(amedeo);
  2095. context.Users.Add(jeroen);
  2096. context.Users.Add(jimi);
  2097.  
  2098. context.Periods.Add(period1);
  2099. context.Periods.Add(period2);
  2100. context.Periods.Add(period3);
  2101.  
  2102. context.TeamPeriods.Add(teamPeriod1);
  2103. context.TeamPeriods.Add(teamPeriod2);
  2104. context.TeamPeriods.Add(teamPeriod3);
  2105.  
  2106. context.Games.Add(game);
  2107.  
  2108.  
  2109. context.SaveChanges();
  2110. }
  2111. catch (DbEntityValidationException e)
  2112. {
  2113. string text = String.Empty;
  2114. foreach (var eve in e.EntityValidationErrors)
  2115. {
  2116. text += String.Format("Entity of type {0} in state {1} has the following validation errors:",
  2117. eve.Entry.Entity.GetType().Name, eve.Entry.GetValidationResult());
  2118. foreach (var ve in eve.ValidationErrors)
  2119. {
  2120. text += String.Format("- Property: {0}, Error:{1}", ve.PropertyName, ve.ErrorMessage);
  2121. }
  2122. }
  2123. throw new ApplicationException(text);
  2124. }
  2125. }
  2126. }
  2127. }
Add Comment
Please, Sign In to add comment