public ITest CreateInstance(string testName, IModelCommon testObj) { var type = GetType(testName + "TestVM"); if (type == null) { return(nullTest); } var ctor = type.GetConstructor(new[] { typeof(IModelCommon) }); return(ctor.Invoke(new object[] { testObj }) as ITest); }
public Tuple <string, ITest> CreateInstance(IModelCommon testObj) { var name = testObj.GetType().Name; var type = GetType(name + "TestVM"); if (type == null) { return(new Tuple <string, ITest>("", nullTest)); } ; var ctor = type.GetConstructor(new[] { typeof(IModelCommon) }); return(new Tuple <string, ITest>(name + "TestVM", ctor.Invoke(new object[] { testObj }) as ITest)); }
public FrameViewModel(Patient patient, IModelCommon testInstance) { _patient = patient; _patientVM = new AddPatientViewModel(patient, SimpleIoc.Default.GetInstance <IPatientsRepository>()); ViewModelName = patient.Name; PatientId = _patientVM.PatientTests.PatientID; var tuple = SimpleIoc.Default.GetInstance <TestFactory>() .CreateInstance(testInstance); _selectedtest = tuple.Item2 as ViewModelCommon; SelectedPage = _selectedtest; SetCommands(); //var stack = new Stack<ViewModelCommon>(3); //stack.Push(_selectedtest); // _testsDictionery = new Dictionary<string, Stack<ViewModelCommon>> { { _selectedtest, stack } }; //SelectedPage = _patientVM; }
public PatientTestVM(IModelCommon patient) { _patientw = new PatientW(patient as Patient); }
public BloodGroupTestVM(IModelCommon bloodgroup) { _bloodgroupw = new BloodGroupW(bloodgroup as BloodGroup); }
public SerologyTestVM(IModelCommon serology) { _serologyw = new SerologyW(serology as Serology); }
public HaematologyTestVM(IModelCommon haematology) { _haematologyw = new HaematologyW(haematology as Haematology); }
public UrineExaminationTestVM(IModelCommon urineexamination) { _urineexaminationw = new UrineExaminationW(urineexamination as UrineExamination); }
public ElisaTbTestVM(IModelCommon elisatb) { _elisatbw = new ElisaTbW(elisatb as ElisaTb); }
public DoctorTestVM(IModelCommon doctor) { _doctorw = new DoctorW(doctor as Doctor); }
public ElisaHcvTestVM(IModelCommon elisahcv) { _elisahcvw = new ElisaHcvW(elisahcv as ElisaHcv); }
public ElisaHbsagTestVM(IModelCommon elisahbsag) { _elisahbsagw = new ElisaHbsagW(elisahbsag as ElisaHbsag); }
public BiochemistryTestVM(IModelCommon biochemistry) { _biochemistryw = new BiochemistryW(biochemistry as Biochemistry); }
public SemenAnalysisTestVM(IModelCommon semenanalysis) { _semenanalysisw = new SemenAnalysisW(semenanalysis as SemenAnalysis); }