コード例 #1
0
        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);
                }
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public void UpdateOtherTest(OtherTests otherTests)
 {
     otherTestsRepository.Update(otherTests);
 }
コード例 #5
0
 public void InsertOtherTest(OtherTests otherTests)
 {
     otherTestsRepository.Insert(otherTests);
 }