private void button9_Click(object sender, EventArgs e) { string _strExePath = Application.StartupPath + @"\MessagePlatform.exe"; Process.Start(_strExePath); RemoteMessage.InitClient(); }
/// <summary> /// 自动上传 /// 2016-01-25 /// 吴海龙 /// </summary> public static void AutomaticUploaded() { string _strExePath = Application.StartupPath + @"\MessagePlatform.exe"; Process.Start(_strExePath); RemoteMessage.InitClient(); while (true) { string _strSQL = uctlBaseConfig.GetConfig("AdapterSQL"); PublicVar.m_dtPatients = CommonFunction.OleExecuteBySQL(_strSQL, "", "EMR"); //每24小时执行一次 //Thread t1 = new Thread(new ThreadStart(GrabInfo.GetPatientData)); //t1.Start(); GrabInfo.GetPatientData(); string _strTimeSpan = uctlBaseConfig.GetConfig("TimeSpan"); if (_strTimeSpan == "1天") { Thread.Sleep(1000 * 60 * 60 * 24); } else if (_strTimeSpan == "1小时") { Thread.Sleep(1000 * 60 * 60); } else if (_strTimeSpan == "1分钟") { Thread.Sleep(1000 * 60); } else { Thread.Sleep(1000 * 60); } } }
private void button11_Click(object sender, EventArgs e) { string _strExePath = Application.StartupPath + @"\MessagePlatform.exe"; Process.Start(_strExePath); RemoteMessage.InitClient(); richTextBox1.Text = GrabInfo.GrabPatientInfoFromFile(textBox3.Text, textBox1.Text, textBox2.Text); }
private void MainForm_Load(object sender, EventArgs e) { //臨時註釋123 //EmrInfoManagement.InitStatus(); Configuration config = System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); string _strUploadFlag = config.AppSettings.Settings["UploadFlag"].Value; string _strUseAdapter = uctlBaseConfig.GetConfig("UseAdapterSQL"); if ("TRUE" == _strUploadFlag.ToUpper() && "TRUE" == _strUseAdapter) { string _strExePath = Application.StartupPath + @"\MessagePlatform.exe"; m_proRemoteMessage = Process.Start(_strExePath); RemoteMessage.InitClient(); string _strSQL = uctlBaseConfig.GetConfig("AdapterSQL"); PublicVar.m_dtPatients = CommonFunction.OleExecuteBySQL(_strSQL, "", "EMR"); Thread t1 = new Thread(new ThreadStart(GrabInfo.GetPatientData)); t1.Start(); } }
private void simpleButton1_Click(object sender, EventArgs e) { string _strExePath = Application.StartupPath + @"\MessagePlatform.exe"; Process.Start(_strExePath); RemoteMessage.InitClient(); string _strSQL = string.Empty; #region 获取病人discharge_date_time string _strUseAdapter = uctlBaseConfig.GetConfig("UseAdapterSQL"); if ("TRUE" == _strUseAdapter) { _strSQL = uctlBaseConfig.GetConfig("AdapterSQL"); } else { string _strDBType = uctlBaseConfig.GetConfig("DBType"); string _strTimeKind = uctlBaseConfig.GetConfig("TimeKind"); if ("ORACLE" == _strDBType.ToUpper()) { _strSQL = string.Format("select m.PATIENT_ID,m.VISIT_ID from pat_visit m where {0} >TO_DATE('{1}','yyyy-MM-dd') and {0}< TO_DATE('{2}','yyyy-MM-dd') ", _strTimeKind, dt_sta.Text, dt_end.Text); } else if ("SQLSERVER" == _strDBType.ToUpper()) { _strSQL = string.Format("select m.PATIENT_ID,m.VISIT_ID from pat_visit m where {0} >'{1}' and {0}< '{2}' ", _strTimeKind, dt_sta.Text, dt_end.Text); } } PublicVar.m_dtPatients = CommonFunction.OleExecuteBySQL(_strSQL, "", "EMR"); ExportDB.m_strTimeRange = "[时间]:" + dt_sta.Text + "至" + dt_end.Text; dataGridView1.DataSource = PublicVar.m_dtPatients; //RemoteMessage.SendMessage("==========================[启动文件下载线程]=========================="); //EmrFile ef = new EmrFile(dt_sta.Text, dt_end.Text); //Thread t = new Thread(ef.PreDownLoadFile); //t.Start(); #endregion }