public void AddPlannedWorkgroup(DrillingDepartmentId id, RequestId requestId, WorkgroupEntity we, ITimeProvider provider)
        {
            // Create the Planned Workgroup
            DoWork("Create a Planned Workgroup and add to the Drilling Department Structure");

            RecordAndRealizeThat(new PlannedWorkgroupAddedToDepartment(id, requestId, we, provider.GetUtcNow()));
        }
        public void Execute(ConsoleEnvironment env, string[] args)
        {
            const int wginteger = 1000;
            var requestId = new RequestId(Guid.NewGuid());
            var workgroupName = string.Join(" ", args);
            var we = new WorkgroupEntity(wginteger, requestId, workgroupName);

            env.DrillingDepartmentAppService.When(new AddPlannedWorkgroupToDepartment(env.Session.SystemId, requestId, we));

            env.log.Info("Workgroup added to Department!");
        }
 /// <summary>
 /// Clear all workgroups from the department
 /// </summary>
 public void Clear()
 {
     RootWorkgroup = null;
 }
示例#4
0
        /*
        public void DepartmentStructureAdded(DrillingDepartmentStructure structure)
        {
            DeptStructure = structure;
        }
        */
        public void NewWorkgroupEntityAdded(WorkgroupEntity entity)
        {
            var item = new WorkgroupEntityView
            {
                Id = entity.Id,
                WorkgroupNumber = entity.WorkgroupNumber,
                Name = entity.Name,
                Type = entity.WorkgroupType
            };

            Workgroups.Add(entity.Id, item);
            DictOfAllItems.Add(entity.Id.Id, item);
        }
示例#5
0
 public AddPlannedWorkgroupToDepartment(DrillingDepartmentId id, RequestId requestId, WorkgroupEntity we)
 {
     Id = id;
     RequestId = requestId;
     We = we;
 }
示例#6
0
 public PlannedWorkgroupAddedToDepartment(DrillingDepartmentId id, RequestId requestId, WorkgroupEntity we, DateTime timeUtc)
 {
     Id = id;
     RequestId = requestId;
     We = we;
     TimeUtc = timeUtc;
 }