public void AddTestTitlesForOtherGroup(AddTestTitlesInGoupResponseModel model) { foreach (var test in model.SelectedTestTitles) { var testTitle = new TestTitles(); testTitle.Charges = test.Charges; testTitle.FooterNote = test.FooterNote; testTitle.HeaderNote = test.HeaderNote; testTitle.GroupId = model.SelectedGroupId; testTitle.ModifiedDate = DateTime.Now; testTitle.Name = test.Name; testTitle.OrderBy = test.OrderBy; testTitle.ShowNormalRangeHeader = test.ShowNormalRangeHeader; testTitle.WordFormatResult = test.WordFormatResult; testTitle.ModifiedBy = model.ModifiedBy; testTitlesRepository.Insert(testTitle); var otherTests = otherTestsRepository.GetAll().Where(x => x.TestTitleId == test.Id).ToList(); foreach (var otherTest in otherTests) { var otherTestModel = new OtherTests(); otherTestModel.TestGroupId = testTitle.GroupId; otherTestModel.TestTitleId = testTitle.Id; otherTestModel.Name = otherTest.Name; otherTestModel.OrderBy = otherTest.OrderBy; otherTestModel.Unit = otherTest.Unit; otherTestModel.DisplayInTestResult = otherTest.DisplayInTestResult; otherTestModel.DisplayInBoldFontInReport = otherTest.DisplayInBoldFontInReport; otherTestModel.DescriptiveResult = otherTest.DescriptiveResult; otherTestModel.ValMale = otherTest.ValMale; otherTestModel.ValFemale = otherTest.ValFemale; otherTestModel.ValNoenatal = otherTest.ValNoenatal; otherTestModel.ValChild = otherTest.ValChild; otherTestModel.DefaultValue = otherTest.DefaultValue; otherTestModel.Options = otherTest.Options; otherTestModel.ModifiedDate = DateTime.Now; otherTestModel.ModifiedBy = model.ModifiedBy; otherTestsRepository.Insert(otherTestModel); } } }
public OtherTests GetOtherTest(OtherTests otherTest, OtherTestDto otherTestDto) { otherTest.Id = otherTestDto.Id; otherTest.TestGroupId = otherTestDto.TestGroupId; otherTest.TestTitleId = otherTestDto.TestTitleId; otherTest.Name = otherTestDto.Name; otherTest.OrderBy = otherTestDto.OrderBy; otherTest.Unit = otherTestDto.Unit; otherTest.DisplayInTestResult = otherTestDto?.DisplayInTestResult; otherTest.DisplayInBoldFontInReport = otherTestDto?.DisplayInBoldFontInReport; otherTest.DescriptiveResult = otherTestDto?.DescriptiveResult; otherTest.ValMale = otherTestDto?.ValMale; otherTest.ValFemale = otherTestDto?.ValFemale; otherTest.ValNoenatal = otherTestDto?.ValNoenatal; otherTest.ValChild = otherTestDto?.ValChild; otherTest.DefaultValue = otherTestDto?.DefaultValue; otherTest.Options = otherTestDto?.Options; otherTest.ModifiedBy = otherTestDto.ModifiedBy; otherTest.ModifiedDate = DateTime.UtcNow; return(otherTest); }
public OtherTestDto GetOtherTestDto(OtherTests otherTest) { var dto = new OtherTestDto(); dto.Id = otherTest.Id; dto.TestGroupId = otherTest.TestGroupId; dto.TestTitleId = otherTest.TestTitleId; dto.Name = otherTest.Name; dto.OrderBy = otherTest.OrderBy; dto.Unit = otherTest.Unit; dto.DisplayInTestResult = otherTest?.DisplayInTestResult; dto.DisplayInBoldFontInReport = otherTest?.DisplayInBoldFontInReport; dto.DescriptiveResult = otherTest?.DescriptiveResult; dto.ValMale = otherTest?.ValMale; dto.ValFemale = otherTest?.ValFemale; dto.ValNoenatal = otherTest?.ValNoenatal; dto.ValChild = otherTest?.ValChild; dto.DefaultValue = otherTest?.DefaultValue; dto.Options = otherTest?.Options; dto.ModifiedBy = otherTest.ModifiedBy; dto.ModifiedDate = otherTest.ModifiedDate; return(dto); }
public void UpdateOtherTest(OtherTests otherTests) { otherTestsRepository.Update(otherTests); }
public void InsertOtherTest(OtherTests otherTests) { otherTestsRepository.Insert(otherTests); }