private void CheckBox_Checked(object sender, RoutedEventArgs e) { CheckBox checkBox = (CheckBox)sender; string str = (string)checkBox.Tag; LabTestType labTestType = new LabTestType(str); types.Add(labTestType); }
private void selection1(object sender, SelectionChangedEventArgs e) { if (listTopics.SelectedItem != null) { var name = ((Show)listTopics.SelectedItem).Name; LabTestType type = new LabTestType(name); types.Add(type); } }
public LabTestType Create(LabTestType entity) { if (!ExistsInSystem(entity)) { var allTypes = stream.GetAll().ToList(); allTypes.Add(entity); stream.SaveAll(allTypes); return(entity); } else { throw new EntityAlreadyExists(ALREADY_EXISTS); } }
public bool ExistsInSystem(LabTestType symptoms) { var allTypes = stream.GetAll().ToList(); return(allTypes.Any(item => item.TestName == symptoms.TestName)); }
public LabTestType CreateLabTestType(LabTestType type) => labTestTypeService.CreateLabTestType(type);
public LabTestType CreateLabTestType(LabTestType type) => labTestTypeRepository.Create(type);