public TestComboListTypeDto GetTestTitleDto(TestTitles testTitle) { var dto = new TestComboListTypeDto(); dto.Id = testTitle.Id; dto.Name = testTitle.Name; return(dto); }
public TestTitles GetTestTitle(TestTitles testTitle, TestTitleDto testTitleDto) { testTitle.Id = testTitleDto.Id; testTitle.GroupId = testTitleDto.GroupId; testTitle.Name = testTitleDto.Name; testTitle.Charges = testTitleDto.Charges; testTitle.OrderBy = testTitleDto.OrderBy; testTitle.HeaderNote = testTitleDto.HeaderNote; testTitle.FooterNote = testTitleDto.FooterNote; testTitle.WordFormatResult = testTitleDto.WordFormatResult; testTitle.ShowNormalRangeHeader = testTitleDto.ShowNormalRangeHeader; testTitle.ModifiedBy = testTitleDto.ModifiedBy; testTitle.ModifiedDate = DateTime.UtcNow; return(testTitle); }
public TestTitleDto GetTestTitleDto(TestTitles testTitle) { var dto = new TestTitleDto(); dto.Id = testTitle.Id; dto.GroupId = testTitle.GroupId; dto.Name = testTitle.Name; dto.Charges = testTitle.Charges; dto.OrderBy = testTitle.OrderBy; dto.HeaderNote = testTitle.HeaderNote; dto.FooterNote = testTitle.FooterNote; dto.WordFormatResult = testTitle.WordFormatResult; dto.ShowNormalRangeHeader = testTitle.ShowNormalRangeHeader; dto.ModifiedBy = testTitle.ModifiedBy; dto.ModifiedDate = testTitle.ModifiedDate; return(dto); }
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); } } }
float?GetReferringAmount(ReferringRateList rateList, TestTitles testTitle, string registrationName) { if (rateList == null) { return(null); } if (rateList.ReferringAmount.HasValue && rateList.ReferringAmount != 0) { return((float?)rateList.ReferringAmount); } else if (rateList.ReferringPercentage.HasValue && rateList.ReferringPercentage != 0) { return((float?)(testTitle.Charges * rateList.ReferringPercentage) / 100); } else { return(null); } }
public void UpdateTestTitle(TestTitles testTitle) { testTitlesRepository.Update(testTitle); }
public void InsertTestTitle(TestTitles testTitle) { testTitlesRepository.Insert(testTitle); }