Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
 public PatientTestVM(IModelCommon patient)
 {
     _patientw = new PatientW(patient as Patient);
 }
Exemplo n.º 5
0
 public BloodGroupTestVM(IModelCommon bloodgroup)
 {
     _bloodgroupw = new BloodGroupW(bloodgroup as BloodGroup);
 }
 public SerologyTestVM(IModelCommon serology)
 {
     _serologyw = new SerologyW(serology as Serology);
 }
Exemplo n.º 7
0
 public HaematologyTestVM(IModelCommon haematology)
 {
     _haematologyw = new HaematologyW(haematology as Haematology);
 }
Exemplo n.º 8
0
 public UrineExaminationTestVM(IModelCommon urineexamination)
 {
     _urineexaminationw = new UrineExaminationW(urineexamination as UrineExamination);
 }
Exemplo n.º 9
0
 public ElisaTbTestVM(IModelCommon elisatb)
 {
     _elisatbw = new ElisaTbW(elisatb as ElisaTb);
 }
Exemplo n.º 10
0
 public DoctorTestVM(IModelCommon doctor)
 {
     _doctorw = new DoctorW(doctor as Doctor);
 }
Exemplo n.º 11
0
 public ElisaHcvTestVM(IModelCommon elisahcv)
 {
     _elisahcvw = new ElisaHcvW(elisahcv as ElisaHcv);
 }
Exemplo n.º 12
0
 public ElisaHbsagTestVM(IModelCommon elisahbsag)
 {
     _elisahbsagw = new ElisaHbsagW(elisahbsag as ElisaHbsag);
 }
Exemplo n.º 13
0
 public BiochemistryTestVM(IModelCommon biochemistry)
 {
     _biochemistryw = new BiochemistryW(biochemistry as Biochemistry);
 }
 public SemenAnalysisTestVM(IModelCommon semenanalysis)
 {
     _semenanalysisw = new SemenAnalysisW(semenanalysis as SemenAnalysis);
 }