public NetWorkingViewModel()
        {
            //var dt = DatabaseHelper.ExecuteQuery("select *,'' as Value from kr_check_type where DeleteFlag = 0");
            //CheckTypeMapList = new CheckTypeMapListModel(dt);
            Trace.WriteLine("test:1");
            _networkingConfig = KRNetworkingConfig.Load();

            DatabaseConfigModel = _networkingConfig.DatabaseConfigModel ?? new DatabaseConfigModel();
            PatientMapModel     = _networkingConfig.PatientMapModel ?? new PatientMapModel(DatabaseHelper.LocalConnStr);
            ReportSaveModel     = _networkingConfig.ReportSaveModel ?? new ReportSaveModel();
            DataCallBackModel   = _networkingConfig.DataCallBackModel ?? new DataCallBackModel();
            HttpConfigModel     = _networkingConfig.HttpConfigModel ?? new HttpConfigModel();
            WcfConfigModel      = _networkingConfig.WcfConfigModel ?? new WcfConfigModel();

            _callbackFieldList = new ObservableCollection <string>();

            foreach (TableFieldMapModel field in PatientMapModel.PatientTableMap)
            {
                _callbackFieldList.Add(string.Format("[{0}]", field.LocalField));
            }

            _callbackFieldList.Add("[CheckDate]");
            _callbackFieldList.Add("[CheckResult]");
            _callbackFieldList.Add("[Diagnosis]");
            _callbackFieldList.Add("<ImagePath>");
            _callbackFieldList.Add("<Image>");
            _callbackFieldList.Add("[Position]");
            _callbackFieldList.Add("[LimbSide]");
            _callbackFieldList.Add("[SOS]");
            _callbackFieldList.Add("[T]");
            _callbackFieldList.Add("[Z]");
            _callbackFieldList.Add("[Percent]");
            _callbackFieldList.Add("[RRF]");
            _callbackFieldList.Add("[EOA]");
            _callbackFieldList.Add("[PAB]");
            _callbackFieldList.Add("[HP]");
            _callbackFieldList.Add("[STI]");
            _callbackFieldList.Add("[Parameters]");


            TestReportSaveCommand          = new TestReportSaveCommand(this);
            TestPatientFieldSqlCommand     = new TestPatientFieldSQLCommand(this);
            TestConnectionCommand          = new TestConnectionCommand(this);
            CreateConnectionCommand        = new CreateUDLConnectionCommand(this);
            QueryDatabaseNameCommand       = new QueryDatabaseNameCommand(this);
            QueryTargetPatientFieldCommand = new QueryTargetPatientFieldCommand(this);

            QueryCallbackFieldCommand = new QueryCallbackFieldCommand(this);
        }
Ejemplo n.º 2
0
        private void OnFinished(object sender, RoutedEventArgs e)
        {
            var vm = Resources["NetworkingViewModel"] as NetWorkingViewModel;

            if (vm == null)
            {
                return;
            }
            object s = _patientGrid.FindName("_cboField");


            var config = new KRNetworkingConfig();

            config.NetType             = vm.NetworkingConfig.NetType;
            config.DatabaseConfigModel = vm.DatabaseConfigModel;
            config.PatientMapModel     = vm.PatientMapModel;
            config.ReportSaveModel     = vm.ReportSaveModel;
            config.DataCallBackModel   = vm.DataCallBackModel;
            config.HttpConfigModel     = vm.HttpConfigModel;
            config.WcfConfigModel      = vm.WcfConfigModel;
            config.Save();
        }
Ejemplo n.º 3
0
 public static void SetupConfig()
 {
     KRNetworkingConfig.Load();
 }