Guest User

Untitled

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