public Core.Domain.CheifComplain AddCheifComplain(Core.Domain.CheifComplain cheifComplain) { if (cheifComplain == null) { throw new ArgumentNullException(nameof(cheifComplain)); } _cheifComplainRepository.Insert(cheifComplain); return(cheifComplain); }
private void RegisterInitialDataForOrganization(int organizationId) { Core.Domain.CheifComplain cheifComplain = new Core.Domain.CheifComplain() { Name = "CC 1", CreatedDate = DateTime.Now, OrganizationId = organizationId, Level = 1 }; _cheifComplainRepository.Insert(cheifComplain); Core.Domain.CheifComplain diagnostic = new Core.Domain.CheifComplain() { Name = "DX 1", CreatedDate = DateTime.Now, OrganizationId = organizationId, Level = 2, ParentCheifComplainId = cheifComplain.Id }; _cheifComplainRepository.Insert(diagnostic); Core.Domain.CheifComplain diagnostic2 = new Core.Domain.CheifComplain() { Name = "dx 2", CreatedDate = DateTime.Now, OrganizationId = organizationId, Level = 2, ParentCheifComplainId = cheifComplain.Id }; _cheifComplainRepository.Insert(diagnostic2); Core.Domain.CheifComplain diagnostic3 = new Core.Domain.CheifComplain() { Name = "dx 3", CreatedDate = DateTime.Now, OrganizationId = organizationId, Level = 2, ParentCheifComplainId = cheifComplain.Id }; _cheifComplainRepository.Insert(diagnostic3); Core.Domain.CheifComplain redFlag = new Core.Domain.CheifComplain() { Name = "RF 1", CreatedDate = DateTime.Now, OrganizationId = organizationId, Level = 3, ParentCheifComplainId = diagnostic.Id }; _cheifComplainRepository.Insert(redFlag); Core.Domain.CheifComplain redFlag2 = new Core.Domain.CheifComplain() { Name = "RF 2", CreatedDate = DateTime.Now, OrganizationId = organizationId, Level = 3, ParentCheifComplainId = diagnostic.Id }; _cheifComplainRepository.Insert(redFlag2); Core.Domain.CheifComplain redFlag3 = new Core.Domain.CheifComplain() { Name = "RF 3", CreatedDate = DateTime.Now, OrganizationId = organizationId, Level = 3, ParentCheifComplainId = diagnostic.Id }; _cheifComplainRepository.Insert(redFlag3); Core.Domain.CheifComplain redFlag4 = new Core.Domain.CheifComplain() { Name = "RF 4", CreatedDate = DateTime.Now, OrganizationId = organizationId, Level = 3, ParentCheifComplainId = diagnostic2.Id }; _cheifComplainRepository.Insert(redFlag4); Core.Domain.CheifComplain redFlag5 = new Core.Domain.CheifComplain() { Name = "RF 5", CreatedDate = DateTime.Now, OrganizationId = organizationId, Level = 3, ParentCheifComplainId = diagnostic2.Id }; _cheifComplainRepository.Insert(redFlag5); Core.Domain.CheifComplain redFlag6 = new Core.Domain.CheifComplain() { Name = "RF 6", CreatedDate = DateTime.Now, OrganizationId = organizationId, Level = 3, ParentCheifComplainId = diagnostic3.Id }; _cheifComplainRepository.Insert(redFlag6); }