private void FrmSelectLanguage_Load(object sender, EventArgs e) { //this.DialogResult = DialogResult.Cancel; InputLanguageCollection ilc = InputLanguage.InstalledInputLanguages; for (int i = 0; i < InputLanguage.InstalledInputLanguages.Count; i++) { InputLanguage il = InputLanguage.InstalledInputLanguages[i]; cboLanguage.Items.Add(il.LayoutName); } string customInputLanguage = ApiFunction.GetIniString("INPUTLANGUAGE", "N" + TrasenFrame.Forms.FrmMdiMain.CurrentUser.LoginCode, Constant.ApplicationDirectory + "//CustomInputLanguage.ini"); if (customInputLanguage == "" || customInputLanguage == null) { lblNote.Text = "提示:您(" + TrasenFrame.Forms.FrmMdiMain.CurrentUser.Name + ")在本机还未设置个人中文输入法"; } for (int i = 0; i < cboLanguage.Items.Count; i++) { if (cboLanguage.Items[i].ToString() == customInputLanguage) { cboLanguage.SelectedIndex = i; lblNote.Text = "您(" + TrasenFrame.Forms.FrmMdiMain.CurrentUser.Name + ")已经在本机设置了中文输入法"; return; } } }
public static void InitializationHLYY(string Employeeid, string dept_id, int Systemid, string mzh, int cs, string brxm, string xb, string csrq) { SystemCfg cfg3027 = new SystemCfg(3027);//挂号有效天数 if (cfg3027.Config == "1") { try { //0=用户 1=科室 2=模块 3=住院号 4=住院次数 5=病人姓名 6=性别 7=出生日期 8=体重 9=身高 10=出院日期 object[] _values = new object[11]; _values[0] = Employeeid; //用户 _values[1] = dept_id; //科室 _values[2] = Systemid; //系统str _values[3] = mzh; _values[4] = cs; //入院次数默认1 _values[5] = brxm; _values[6] = xb; _values[7] = Convert.ToDateTime(csrq).ToString("yyyy-MM-dd"); _values[8] = ""; _values[9] = ""; _values[10] = ""; string hlyytype = ApiFunction.GetIniString("hlyy", "name", System.Windows.Forms.Application.StartupPath + "\\Hlyy.ini"); Ts_Hlyy_Interface.HlyyInterface hl = Ts_Hlyy_Interface.HlyyFactory.Hlyy(hlyytype); hl.RegisterServer_fun(_values); hl.Refresh(); } catch (System.Exception err) { } } }
//Add By tany 2015-05-05 private void btBljgcx_Click(object sender, EventArgs e) { try { DataTable dataSource = this.myDataGrid1.DataSource as DataTable; if ((dataSource != null) && (dataSource.Rows.Count > 0)) { int currentRowIndex = this.myDataGrid1.CurrentRowIndex; if (currentRowIndex != -1) { DataRow row = dataSource.Rows[currentRowIndex]; Guid BinID = new Guid(row["INPATIENT_ID"].ToString()); string sfqy = ApiFunction.GetIniString("bl", "是否启用", Constant.ApplicationDirectory + "\\bl.ini"); if (sfqy == "1") { Ts_Bl_interface.BlFactory bf = new Ts_Bl_interface.BlFactory(); //bf.Create("").ShowPatBlInfo(BinID, Ts_Bl_interface.PatientSource.住院); bf.Create("").ShowPatBlInfo(BinID, Ts_Bl_interface.PatientSource.住院); } else { MessageBox.Show("没有开启病理接口,请联系管理员"); } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
//打印卡单据 public static void M_PrintCard(string barCode) { try { DataRow rxx = InstanceForm.BDatabase.GetDataRow(string.Format("select a.KH,b.BRXM,dbo.FUN_ZY_SEEKSEXNAME( b.XB) as xb from yy_kdjb a inner join yy_brxx b on a.brxxid=b.brxxid where a.KH='{0}' and a.ZFBZ=0 and b.BSCBZ = 0", barCode)); Trasen.Print.Grid5.Interface.IPrinter printer = new Trasen.Print.Grid5.ReportPrinter(); Trasen.Print.Grid5.ReportParameter[] ps = new Trasen.Print.Grid5.ReportParameter[3]; ps[0] = new Trasen.Print.Grid5.ReportParameter("barcode", barCode); ps[1] = new Trasen.Print.Grid5.ReportParameter("name", Convertor.IsNull(rxx["BRXM"], "")); ps[2] = new Trasen.Print.Grid5.ReportParameter("sex", Convertor.IsNull(rxx["XB"], "")); printer.ReportTemplateFile = Application.StartupPath + "\\CardReport.grf"; printer.ReportParameters = ps; string bView = ApiFunction.GetIniString("划价收费", "发票预览", TrasenFrame.Classes.Constant.ApplicationDirectory + "//ClientWindow.ini"); if (bView == "true") { printer.Preview(); } else { printer.Print(); } } catch (Exception ex) { MessageBox.Show("打印诊疗卡单据出错:" + ex.Message); } }
private void Frmyjqr_Load(object sender, EventArgs e) { this.WindowState = FormWindowState.Maximized; //SystemCfg sysrq = new SystemCfg(10007, InstanceForm.BDatabase); this.dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).AddDays(Convert.ToInt32(1)); string Bkh = ApiFunction.GetIniString("划价收费", "卡号优先获得焦点", Constant.ApplicationDirectory + "//ClientWindow.ini"); if (Bkh == "true") { txtkh.Focus(); } else { txtmzh.Focus(); } //自动读射频卡 string sbxh = ApiFunction.GetIniString("医院健康卡", "设备型号", Constant.ApplicationDirectory + "//ClientWindow.ini"); ts_Read_hospitalCard.Icall ReadCard = ts_Read_hospitalCard.CardFactory.NewCall(sbxh); if (ReadCard != null) { ReadCard.AutoReadCard(_menuTag.Function_Name, cmbklx, txtkh); } }
/// <summary> /// 显示当前用户设置的输入法 /// </summary> private void ShowCurrentUserIL() { //中文 string customInputLanguage = ApiFunction.GetIniString("INPUTLANGUAGE_CN", "N" + loginCode, Constant.ApplicationDirectory + "//UserCustomSetting.ini"); if (customInputLanguage == "" || customInputLanguage == null) { cboChineseIL.SelectedIndex = -1; } for (int i = 0; i < cboChineseIL.Items.Count; i++) { if (cboChineseIL.Items[i].ToString( ) == customInputLanguage) { cboChineseIL.SelectedIndex = i; break; } } //英文 customInputLanguage = HIS.SYSTEM.PubicBaseClasses.ApiFunction.GetIniString("INPUTLANGUAGE_EN", "N" + loginCode, Constant.ApplicationDirectory + "//UserCustomSetting.ini"); if (customInputLanguage == "" || customInputLanguage == null) { cboEnglishIL.SelectedIndex = -1; } for (int i = 0; i < cboEnglishIL.Items.Count; i++) { if (cboEnglishIL.Items[i].ToString( ) == customInputLanguage) { cboEnglishIL.SelectedIndex = i; break; } } }
/// <summary> /// 根据当前用户和系统实例化科室 /// </summary> /// <returns></returns> //private Department InstanceCurrentDept() //{ // string sql = "select dept_id as ksbh from jc_emp_dept_role where employee_id=" + CurrentUser.EmployeeId + " and xtbh = " + CurrentSystem.SystemId + " and dept_id in (select dept_id from jc_dept_property where jgbm=" + FrmMdiMain.Jgbm + ")";//Modify By tany 2010-04-01 读取默认科室的时候判断一下该科室不是当前机构编码下的科室 // //string sql = "select dept_id as ksbh from jc_emp_dept_role where employee_id=" + CurrentUser.EmployeeId + " and [default] = 1"; // DataRow dr = FrmMdiMain.Database.GetDataRow( sql ); // if ( dr == null ) // { // return null; // } // else // { // try // { // return new Department( Convert.ToInt32( dr["ksbh"] ) , FrmMdiMain.Database ); // } // catch // { // return null; // } // } //} /// <summary> /// 获得机构编码和名称 /// </summary> /// <returns></returns> public static object[] GetJgbmmc() { object[] obj = new object[4]; string serverName = TrasenClasses.GeneralClasses.ApiFunction.GetIniString("SERVER_NAME", "NAME", Constant.ApplicationDirectory + "\\ClientConfig.ini"); string _ip = Crypto.Instance().Decrypto(ApiFunction.GetIniString(serverName, "HOSTNAME", Constant.ApplicationDirectory + "\\ClientConfig.ini")); ; //jianqg 2012-9-26 增加第2ip地址连接 处理 //string _sql = "select * from jc_jgbm where ipaddr='" + _ip.ToString().Trim() + "'"; string _sql = "select * from jc_jgbm where ipaddr='" + _ip.ToString().Trim() + "' or IPADDR2='" + _ip.ToString().Trim() + "' "; DataTable tb = Database.GetDataTable(_sql); if (tb == null || tb.Rows.Count == 0) { throw new Exception("没有找到该主机地址对应的机构编码,请联系系统管理员!"); } else { obj[0] = Convert.ToInt32(tb.Rows[0]["jgbm"]); obj[1] = tb.Rows[0]["jgmc"].ToString().Trim(); obj[2] = Convert.ToInt32(tb.Rows[0]["yybm"]); obj[3] = tb.Rows[0]["ipaddr"].ToString().Trim(); //是否是用IPADDR2连接 if (tb.Rows[0]["IPADDR2"].ToString().ToLower() == _ip.ToString().Trim().ToLower()) { obj[3] = tb.Rows[0]["IPADDR2"].ToString(); } return(obj); } }
/// <summary> /// 设置输入法状态 /// </summary> /// <param name="userCode">用户代码</param> /// <param name="OnOff">true打开中文输入法,false关闭中文输入法</param> public static void SetILStatus(string userCode, bool OnOff) { InputLanguageCollection ilc = InputLanguage.InstalledInputLanguages; string cnIL = ApiFunction.GetIniString("INPUTLANGUAGE_CN", "N" + userCode, Constant.ApplicationDirectory + "//UserCustomSetting.ini"); string enIL = ApiFunction.GetIniString("INPUTLANGUAGE_EN", "N" + userCode, Constant.ApplicationDirectory + "//UserCustomSetting.ini"); string needSetIL = ""; if (OnOff == true) { needSetIL = cnIL; } else { needSetIL = enIL; } for (int i = 0; i < InputLanguage.InstalledInputLanguages.Count; i++) { InputLanguage il = InputLanguage.InstalledInputLanguages[i]; if (il.LayoutName == needSetIL) { InputLanguage.CurrentInputLanguage = il; return; } } }
private static string GetConnnectionString(string cfgPath, ConnectionType type, string DatabaseName) { string cnnString, hostName, database, userID, password, protocol, port, strCnnType; switch (type) { case ConnectionType.SQLSERVER: hostName = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "HOSTNAME", cfgPath)); database = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "DATASOURCE", cfgPath)); userID = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "USER_ID", cfgPath)); password = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "PASSWORD", cfgPath)); if (hostName.Trim() == "" && database.Trim() == "" && userID.Trim() == "" && password.Trim() == "") { cnnString = ""; } else { cnnString = @"packet size=4096;user id=" + userID + ";password="******";data source=" + hostName + ";persist security info=True;initial catalog=" + database; } break; case ConnectionType.IBMDB2: hostName = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "HOSTNAME", cfgPath)); protocol = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "PROTOCOL", cfgPath)); port = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "PORT", cfgPath)); database = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "DATASOURCE", cfgPath)); userID = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "USER_ID", cfgPath)); password = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "PASSWORD", cfgPath)); strCnnType = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "CONNECTIONTYPE", cfgPath)); if (strCnnType == "1") { cnnString = @"Provider=IBMDADB2;Database=" + database + ";HostName=" + hostName + ";Protocol=" + protocol + ";Port=" + port + ";User ID=" + userID + ";Password="******"Provider=IBMDADB2.1;User ID=" + userID + ";Password="******";Data Source=" + database + ";Mode=ReadWrite;Extended Properties="; } break; case ConnectionType.MSACCESS: database = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "DATASOURCE", cfgPath)); cnnString = @"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Data Source=" + database + ";Mode=Share Deny None;Jet OLEDB:Engine Type=5;Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:System database=;Jet OLEDB:SFP=False;persist security info=False;Extended Properties=;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1"; break; case ConnectionType.ORACLE: database = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "DATASOURCE", cfgPath)); userID = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "USER_ID", cfgPath)); password = Crypto.Instance().Decrypto(ApiFunction.GetIniString(DatabaseName, "PASSWORD", cfgPath)); cnnString = "Provider=msdaora;Data Source=" + database + ";User Id=" + userID + ";Password="******"Provider=DB2OLEDB;Host=192.168.0.50; Service=8888; Server=cxhosp_tcp; Database=pu_hos; User ID=ypgl; Password=ypgl2233; Protocol=olsoctcp;"; //cnnString = "Dsn=oldhis;uid=ypgl;pwd=ypgl2233"; // cnnString = "Dsn=oldhis;uid=ypgl;database=pu_hos;host=192.168.0.50;srvr=cxhosp_tcp;serv=8888;pro=olsoctcp;cloc=en_US.819;dloc=en_US.819;vmb=0;curb=0;scur=0;icur=0;oac=1;optofc=0;rkc=0;odtyp=0;ddfp=0;dnl=0;rcwc=0"; break; } return(cnnString); }
/// <summary> /// 调整语音朗诵对象的语速 /// </summary> public void VoiceRate() { try { string RateValue = ApiFunction.GetIniString("分诊语音", "音速", Application.StartupPath + @"\ClientWindow.ini"); // jianqg 修改 不限定使用捷通 2013-12-05 int rateValue = -1; //语速 bool flag_rate = int.TryParse(RateValue, out rateValue); if (flag_rate == false) { rateValue = -1; } voiceInfo.rate = rateValue; voiceInfo.init = true;//初始化完毕 //以下是 周鹏原来使用 捷通语音的 jianqg 2013-12-05 注释 //uint value=2; //uint.TryParse(RateValue, out value); //Jtts.jTTS_SetParam(Jtts.PARAM_SPEED, value); //调节语速 } catch (Exception ea) { throw ea; } }
public IBl Create(string Bltypename) { //Ts_Bl_interface // FileInfo f = new FileInfo(@"\ConsoleApplication1.exe"); Bltypename = ApiFunction.GetIniString("bl", "bl类型", Constant.ApplicationDirectory + "\\bl.ini"); // string sDllName = f.Name.Remove(f.Name.LastIndexOf(f.Extension), f.Extension.Length).Trim(); Assembly assembly = Assembly.LoadFrom(Application.StartupPath + "\\Ts_Bl_interface.dll"); Type type1 = null; try { type1 = assembly.GetType("Ts_Bl_interface." + Bltypename, true, true); } catch { throw new Exception("没有提供" + Bltypename + "类型的接口"); } MethodInfo method = type1.GetMethod("creat"); object obj1 = System.Activator.CreateInstance(type1); object obj2 = method.Invoke(obj1, null); //Type t=typeof(Bltypename); return((IBl)obj2); }
private void SetImage() { try { int ncom = Convert.ToInt32(com); if (kind == 4) { string filename = ApiFunction.GetIniString("报价器文件路径", "相册文件夹", Constant.ApplicationDirectory + "//ClientWindow.ini"); if (File.Exists(Constant.ApplicationDirectory + "\\" + filename + "//" + _empname + ".bmp")) { dsbdll(ncom, "&B0,0," + Constant.ApplicationDirectory + "\\" + filename + "//" + _empname + ".bmp$");//在0,0位置,显示bmp类型图片 } else { dsbdll(ncom, "&B0,0," + Constant.ApplicationDirectory + "\\" + filename + "//默认.bmp$"); } } } catch (Exception ea) { throw ea; } finally { if (currentThread != null && currentThread.ThreadState == ThreadState.Running) { currentThread.Abort(); } } }
/// <summary> /// 获取INI信息 /// </summary> /// <param name="type">类型0、SQL SERVER 1、IBM DB2</param> /// <param name="applicationName">INI文件中段(SECTION)名称</param> private void GetIniInformation(ConnectionType type, string applicationName) { string strCnnType = ""; switch (type) { case ConnectionType.SQLSERVER: //SQL SERVER txtHostNameSql.Text = Crypto.Instance().Decrypto(ApiFunction.GetIniString(applicationName, "HOSTNAME", Constant.ApplicationDirectory + "\\ClientConfig.ini")); txtDatabaseSql.Text = Crypto.Instance().Decrypto(ApiFunction.GetIniString(applicationName, "DATASOURCE", Constant.ApplicationDirectory + "\\ClientConfig.ini")); break; case ConnectionType.IBMDB2: //IBM DB2 txtHostNameSql.Text = Crypto.Instance().Decrypto(ApiFunction.GetIniString(applicationName, "HOSTNAME", Constant.ApplicationDirectory + "\\ClientConfig.ini")); txtDatabaseSql.Text = Crypto.Instance().Decrypto(ApiFunction.GetIniString(applicationName, "DATASOURCE", Constant.ApplicationDirectory + "\\ClientConfig.ini")); break; case ConnectionType.MSACCESS: //本机ACCESS txtHostNameSql.Text = Crypto.Instance().Decrypto(ApiFunction.GetIniString(applicationName, "DATASOURCE", Constant.ApplicationDirectory + "\\ClientConfig.ini")); break; case ConnectionType.ORACLE: //Oracle txtHostNameSql.Text = Crypto.Instance().Decrypto(ApiFunction.GetIniString(applicationName, "DATASOURCE", Constant.ApplicationDirectory + "\\ClientConfig.ini")); break; default: break; } }
private void Frmbrxxcx_Load(object sender, EventArgs e) { FunAddComboBox.AddBrlx(true, 0, cmbbrlx, InstanceForm.BDatabase); FunAddComboBox.AddKlx(false, 0, cmbklx, InstanceForm.BDatabase); FunAddComboBox.AddOperator(true, cmbdjy, InstanceForm.BDatabase); FunAddComboBox.AddYblx(true, 0, cmbcblx, InstanceForm.BDatabase); FunAddComboBox.AddGj(true, cmbgj, InstanceForm.BDatabase); FunAddComboBox.AddMz(true, cmbmz, InstanceForm.BDatabase); // chkdjsj.Checked = true; dtpcsrq1.Value = dtpcsrq1.Value.AddYears(-1); //自动读射频卡 string sbxh = ApiFunction.GetIniString("医院健康卡", "设备型号", Constant.ApplicationDirectory + "//ClientWindow.ini"); ts_Read_hospitalCard.Icall ReadCard = ts_Read_hospitalCard.CardFactory.NewCall(sbxh); if (ReadCard != null) { ReadCard.AutoReadCard(_menuTag.Function_Name, cmbklx, txtkh); } //150108 chencan/ 右键菜单添加“诊疗卡打印” if (cfg1161.Config == "1") { ToolStripMenuItem menuprint = new ToolStripMenuItem(); menuprint.Text = "重打条码单"; menuprint.Click += new EventHandler(menuprint_Click); this.contextMenuStrip1.Items.Add(menuprint); } cmbklx.Focus(); }
public static ts_cp_interface Cpinterface(string cpname) { try { if (ApiFunction.GetIniString("SfQy", "SfQy", Constant.ApplicationDirectory + "\\Cpset.ini").Trim() == "0") { throw new Exception("没有启用临床路径系统,请设置Cpset.ini中相关配置!!"); return(null); } ts_cp_interface _Cp; if (cpname.Trim() == "") { cpname = "创星科技"; } switch (cpname) { case "创星科技": _Cp = new Ts_ts_pathway(); break; default: throw new Exception("没有这种临床路径接口类型"); } return(_Cp); } catch (Exception ex) { throw ex; return(null); } }
private void btnReadIDCard_Click(object sender, EventArgs e) { try { string msg = " "; string bqy = ApiFunction.GetIniString("身份证扫描器", "启用身份证扫描器", Constant.ApplicationDirectory + "//ClientWindow.ini"); if (bqy == "true") { string bsbxh = ApiFunction.GetIniString("身份证扫描器", "设备型号", Constant.ApplicationDirectory + "//ClientWindow.ini"); string bshow = ApiFunction.GetIniString("身份证扫描器", "显示窗口信息", Constant.ApplicationDirectory + "//ClientWindow.ini"); ts_ReadCard.Icard card = ts_ReadCard.CardFactory.NewCard(bsbxh); ts_ReadCard.IDCardData _IDCardData = new ts_ReadCard.IDCardData(); bool bok = card.ReadCard(ref _IDCardData, ref msg); if (bok == false) { return; } txtsfzh.Text = _IDCardData.IDCardNo; } } catch (System.Exception err) { MessageBox.Show(err.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void Frmhjsf_Load(object sender, EventArgs e) { //年龄单位 DataTable tb = new DataTable(); tb.Columns.Add("ID", Type.GetType("System.Int32")); tb.Columns.Add("NAME", Type.GetType("System.String")); DataRow row = tb.NewRow(); row["ID"] = 0; row["NAME"] = "岁"; tb.Rows.Add(row); row = tb.NewRow(); row["ID"] = 1; row["NAME"] = "月"; tb.Rows.Add(row); row = tb.NewRow(); row["ID"] = 2; row["NAME"] = "天"; tb.Rows.Add(row); row = tb.NewRow(); row["ID"] = 3; row["NAME"] = "小时"; tb.Rows.Add(row); cmbDW.DisplayMember = "NAME"; cmbDW.ValueMember = "ID"; cmbDW.DataSource = tb; cmbDW.SelectedIndex = 0; //ini文件读取 string Bxm = ApiFunction.GetIniString("划价收费", "姓名处停留", Constant.ApplicationDirectory + "//ClientWindow.ini"); FunAddComboBox.Addxb(false, cmbxb, InstanceForm.BDatabase); }
//影像信息查询 Add by zp 2013-10-12 private void toolStripMenuItem2_Click(object sender, EventArgs e) { try { try { if (this.dataGridView1.CurrentRow == null) { MessageBox.Show("请先选择病人记录!", "提示"); } if (ApiFunction.GetIniString("PACS", "是否启用", Constant.ApplicationDirectory + "\\pacs.ini").Trim() != "1") { MessageBox.Show("对不起,暂未启用PACS接口!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } string pacsName = ApiFunction.GetIniString("PACS", "PACS类型", Constant.ApplicationDirectory + "\\pacs.ini"); ts_pacs_interface.Ipacs pacs = ts_pacs_interface.PacsFactory.Pacs(pacsName); string _brid = this.dataGridView1.CurrentRow.Cells["BRXXID"].Value.ToString(); Guid brxxid = new Guid(_brid); pacs.ShowPatPacsInfo(brxxid, ts_pacs_interface.PatientSource.门诊); //GetPacsInfo(id); } catch (Exception ex) { MessageBox.Show("没有找到有效的记录,请重新查证!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ea) { MessageBox.Show("出现异常!原因:" + ea.Message, "提示"); } }
public override string[] LoadConfig() { string[] args = new string[4]; args[0] = ApiFunction.GetIniString(CONST_NODENAME, CONST_SERVERNAME, ClientWindowIni); args[1] = ApiFunction.GetIniString(CONST_NODENAME, CONST_DBNAME, ClientWindowIni); args[2] = ApiFunction.GetIniString(CONST_NODENAME, CONST_USERID, ClientWindowIni); args[3] = ApiFunction.GetIniString(CONST_NODENAME, CONST_PASSWORD, ClientWindowIni); return(args); }
private void Frmghdj_Load(object sender, EventArgs e) { this.WindowState = FormWindowState.Maximized; FunAddComboBox.AddBrlx(true, 0, cmbbrlx, InstanceForm.BDatabase); FunAddComboBox.AddGhlx(true, 0, cmbghlx, InstanceForm.BDatabase); FunAddComboBox.AddKlx(true, 0, cmbklx, InstanceForm.BDatabase); FunAddComboBox.AddGhjb(true, 0, cmbghjb, InstanceForm.BDatabase); FunAddComboBox.AddOperator(true, cmbsky, InstanceForm.BDatabase); Tbks = Fun.GetGhks(false, InstanceForm.BDatabase); Tbys = Fun.GetGhys(0, InstanceForm.BDatabase); #region 窗口输入项的控制 //ghlb_ini = ApiFunction.GetIniString("挂号屏蔽项", "诊别", Constant.ApplicationDirectory + "//ClientWindow.ini"); //klx_ini = ApiFunction.GetIniString("挂号屏蔽项", "卡类型", Constant.ApplicationDirectory + "//ClientWindow.ini"); //kh_ini = ApiFunction.GetIniString("挂号屏蔽项", "卡号", Constant.ApplicationDirectory + "//ClientWindow.ini"); //xm_ini = ApiFunction.GetIniString("挂号屏蔽项", "姓名", Constant.ApplicationDirectory + "//ClientWindow.ini"); //xb_ini = ApiFunction.GetIniString("挂号屏蔽项", "性别", Constant.ApplicationDirectory + "//ClientWindow.ini"); //nl_ini = ApiFunction.GetIniString("挂号屏蔽项", "年龄", Constant.ApplicationDirectory + "//ClientWindow.ini"); //lxfs_ini = ApiFunction.GetIniString("挂号屏蔽项", "联系方式", Constant.ApplicationDirectory + "//ClientWindow.ini"); //jtdz_ini = ApiFunction.GetIniString("挂号屏蔽项", "家庭地址", Constant.ApplicationDirectory + "//ClientWindow.ini"); //brlx_ini = ApiFunction.GetIniString("挂号屏蔽项", "病人类型", Constant.ApplicationDirectory + "//ClientWindow.ini"); //ghks_ini = ApiFunction.GetIniString("挂号屏蔽项", "挂号科室", Constant.ApplicationDirectory + "//ClientWindow.ini"); //ghjb_ini = ApiFunction.GetIniString("挂号屏蔽项", "挂号级别", Constant.ApplicationDirectory + "//ClientWindow.ini"); //ghys_ini = ApiFunction.GetIniString("挂号屏蔽项", "挂号医生", Constant.ApplicationDirectory + "//ClientWindow.ini"); //yblx_ini = ApiFunction.GetIniString("挂号屏蔽项", "医保类型", Constant.ApplicationDirectory + "//ClientWindow.ini"); //readcard_ini = ApiFunction.GetIniString("挂号屏蔽项", "读卡", Constant.ApplicationDirectory + "//ClientWindow.ini"); //blb_ini = ApiFunction.GetIniString("挂号屏蔽项", "病历本", Constant.ApplicationDirectory + "//ClientWindow.ini"); //sfplx_ini = ApiFunction.GetIniString("划价收费", "挂号使用收费票", Constant.ApplicationDirectory + "//ClientWindow.ini"); //syk_ini = ApiFunction.GetIniString("挂号收费", "挂号时必须使用卡", Constant.ApplicationDirectory + "//ClientWindow.ini"); //Bview = ApiFunction.GetIniString("划价收费", "发票预览", Constant.ApplicationDirectory + "//ClientWindow.ini"); //Fplx = sfplx_ini == "true" ? 1 : 0; //cmbghlx.Enabled = ghlb_ini == "true" ? false : true; //cmbklx.Enabled = klx_ini == "true" ? false : true; //txtkh.Enabled = kh_ini == "true" ? false : true; //txtxm.Enabled = xm_ini == "true" ? false : true; //txtgrlxfs.Enabled = lxfs_ini == "true" ? false : true; //txtjtdz.Enabled = jtdz_ini == "true" ? false : true; //cmbbrlx.Enabled = brlx_ini == "true" ? false : true; //txtks.Enabled = ghks_ini == "true" ? false : true; //cmbghjb.Enabled = ghjb_ini == "true" ? false : true; //txtys.Enabled = ghys_ini == "true" ? false : true; #endregion //自动读射频卡 string sbxh = ApiFunction.GetIniString("医院健康卡", "设备型号", Constant.ApplicationDirectory + "//ClientWindow.ini"); ts_Read_hospitalCard.Icall ReadCard = ts_Read_hospitalCard.CardFactory.NewCall(sbxh); if (ReadCard != null) { ReadCard.AutoReadCard(_menuTag.Function_Name, cmbklx, txtkh); } }
/// <summary> /// 取配置值 jianqg 2012-8-8 增加 处理 非外部设备等 /// </summary> /// <param name="lpKeyName"></param> /// <returns></returns> public static string GetClientConfig(string lpKeyName) { string strValue = Crypto.Instance().Decrypto(ApiFunction.GetIniString("CUSTOMSETTING" + CurrentUserId, lpKeyName, CustomDirectory + "\\ClientConfig.ini")); //没有该账号的配置时,去公共的 if (CurrentUserId != "" && (strValue == null || strValue == "")) { strValue = Crypto.Instance().Decrypto(ApiFunction.GetIniString("CUSTOMSETTING", lpKeyName, CustomDirectory + "\\ClientConfig.ini")); } return(strValue); }
private void Frmjhkqr_Load(object sender, EventArgs e) { //自动读射频卡 string sbxh = ApiFunction.GetIniString("医院健康卡", "设备型号", Constant.ApplicationDirectory + "//ClientWindow.ini"); ts_Read_hospitalCard.Icall ReadCard = ts_Read_hospitalCard.CardFactory.NewCall(sbxh); if (ReadCard != null) { ReadCard.AutoReadCard(InstanceForm._menuTag.Function_Name, cmbklx, txtxkh); } }
/// <summary> /// 调整语音朗诵对象的语速 /// </summary> public void VoiceRate() { try { string RateValue = ApiFunction.GetIniString("分诊系统呼叫速度调节", "Rate", Application.StartupPath + @"\ClientWindow.ini"); uint value = 2; uint.TryParse(RateValue, out value); Jtts.jTTS_SetParam(Jtts.PARAM_SPEED, value); //调节语速 } catch (Exception ea) { throw ea; } }
private void Frmcfsh_Load(object sender, EventArgs e) { AddTree(); FunAddComboBox.AddKlx(false, 0, cmbklx, InstanceForm.BDatabase); //自动读射频卡 string sbxh = ApiFunction.GetIniString("医院健康卡", "设备型号", Constant.ApplicationDirectory + "//ClientWindow.ini"); ts_Read_hospitalCard.Icall ReadCard = ts_Read_hospitalCard.CardFactory.NewCall(sbxh); if (ReadCard != null) { ReadCard.AutoReadCard(_menuTag.Function_Name, cmbklx, txtkh); } }
private void Frmyyjl_Load(object sender, EventArgs e) { this.dataGridView1.AutoGenerateColumns = false; FunAddComboBox.AddKlx(false, 0, cmbklx, TrasenFrame.Forms.FrmMdiMain.Database); txtyzm.Focus(); //自动读射频卡 string sbxh = ApiFunction.GetIniString("医院健康卡", "设备型号", Constant.ApplicationDirectory + "//ClientWindow.ini"); ts_Read_hospitalCard.Icall ReadCard = ts_Read_hospitalCard.CardFactory.NewCall(sbxh); if (ReadCard != null) { ReadCard.AutoReadCard("", cmbklx, txtkh); } }
private void FrmCardChange_FL_Load(object sender, EventArgs e) { //自动读射频卡 string sbxh = ApiFunction.GetIniString("医院健康卡", "设备型号", Constant.ApplicationDirectory + "//ClientWindow.ini"); ts_Read_hospitalCard.Icall ReadCard = ts_Read_hospitalCard.CardFactory.NewCall(sbxh); if (ReadCard != null) { ReadCard.AutoReadCard(InstanceForm._menuTag.Function_Name, cmbklx, txtxkh); } if (cmbklx.Items.Count > 0 && cmbklx.SelectedValue == null) { cmbklx.SelectedIndex = 0; } }
public static DataTable LisServiceInput(LisInfo[] _lisinfo) { WebReference.lisService ls = new Ts_HisVsLis_interface.WebReference.lisService(); string url = ApiFunction.GetIniString(TrasenFrame.Classes.Constant.HospitalName, "url", System.Windows.Forms.Application.StartupPath + "\\LisInterface.ini"); ls.Url = url;//"http://192.168.0.81:8012/lisService.asmx"; string xml = @"<message><call> <targetLogicService>LIS_INSERT_EXAMINITEMS_BYHIS</targetLogicService> <targetLogicApp>LIS</targetLogicApp> </call> "; xml += "<body bodyId=\"LIS.BODY.1\"> "; xml += @"<examReqInfo><examReqType>2</examReqType> "; for (int i = 0; i < _lisinfo.Length; i++) { xml += "<item>"; xml += "<itemId>" + TrasenHIS.BLL.HisFunctions.GetOldHISXmYpBM("2", _lisinfo[i].itemid, TrasenFrame.Forms.FrmMdiMain.Database) + @"</itemId> "; xml += "<hisid>\"" + _lisinfo[i].hisid + "\"</hisid> "; xml += "<itemName>" + _lisinfo[i].itemName + @"</itemName>"; xml += "<bbmc>" + _lisinfo[i].bbmc + @"</bbmc>"; //Add By Tany 2015-08-04 增加标本名称 //<EM>0 表示 常规,1表示急诊</EM> //Add By Tany 2015-08-17 增加急诊标记 xml += "<EM>" + (_lisinfo[i].itemName.Contains("急") ? 1 : 0) + @"</EM>"; xml += "</item>"; } xml += @"<patientType>2</patientType><id>" + _lisinfo[0].zyh + @"</id> <patientName>" + _lisinfo[0].brxm + @"</patientName> <patientSex>" + _lisinfo[0].xb + @"</patientSex> <patientBirthday>" + _lisinfo[0].csrq + @"</patientBirthday> <patientBedNo>" + _lisinfo[0].ch + @"</patientBedNo> <Diagnose>" + _lisinfo[0].zd + @"</Diagnose><reqDept> <deptId>" + TrasenHIS.BLL.HisFunctions.ConvertNewhisidToOldHisid(TrasenHIS.BLL.HisFunctions.DataMapType.JC_DEPT_PROPERTY, _lisinfo[0].deptid, TrasenFrame.Forms.FrmMdiMain.Database) + @"</deptId> <deptName>" + _lisinfo[0].deptname + @"</deptName> </reqDept> <reqDoctor> <employeeId>" + TrasenHIS.BLL.HisFunctions.ConvertNewhisidToOldHisid(TrasenHIS.BLL.HisFunctions.DataMapType.JC_EMPLOYEE_PROPERTY, _lisinfo[0].employeeId, TrasenFrame.Forms.FrmMdiMain.Database) + "</employeeId><employeeName>" + _lisinfo[0].employeeName + @"</employeeName> </reqDoctor> <crtDateTime>" + _lisinfo[0].crtDateTime + @"</crtDateTime> <status>20</status> </examReqInfo> </body> </message>"; //System.Windows.Forms.MessageBox.Show(xml); string ss1 = ls.LisServiceInput(xml); return(Converttb(ss1)); }
private void Frmyjjjk_Load(object sender, EventArgs e) { //卡类型 FunAddComboBox.AddKlx(false, 0, cmbklx, InstanceForm.BDatabase); this.WindowState = FormWindowState.Maximized; dtpjsrq1.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 00:00:00"); dtpjsrq2.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 23:59:59"); //自动读射频卡 string sbxh = ApiFunction.GetIniString("医院健康卡", "设备型号", Constant.ApplicationDirectory + "//ClientWindow.ini"); ts_Read_hospitalCard.Icall ReadCard = ts_Read_hospitalCard.CardFactory.NewCall(sbxh); if (ReadCard != null) { ReadCard.AutoReadCard(_menuTag.Function_Name, cmbklx, txtkh); } }
private void FrmYgcz_Mz_Load(object sender, EventArgs e) { if (new SystemCfg(3104).Config == "1") { this.Text = "门诊日志"; } FunAddComboBox.AddKlx(false, 0, cmbklx, InstanceForm.BDatabase); //自动读射频卡 string sbxh = ApiFunction.GetIniString("医院健康卡", "设备型号", Constant.ApplicationDirectory + "//ClientWindow.ini"); ts_Read_hospitalCard.Icall ReadCard = ts_Read_hospitalCard.CardFactory.NewCall(sbxh); if (ReadCard != null) { ReadCard.AutoReadCard(_menuTag.Function_Name, cmbklx, txtkh); } }
/// <summary> /// 查看Pasc结果 /// </summary> /// <param name="id"></param> public void ReadPacsInfo(Guid id) { string pacsName = ""; try { pacsName = ApiFunction.GetIniString("PACS", "PACS类型", Constant.ApplicationDirectory + "\\pacs.ini"); ts_pacs_interface.Ipacs pacs = ts_pacs_interface.PacsFactory.Pacs(pacsName); pacs.ShowPacsInfo(id.ToString(), ts_pacs_interface.PatientSource.门诊); //GetPacsInfo(id); } catch (Exception ex) { MessageBox.Show("没有找到有效的记录,请重新查证!\n" + ex.Message + pacsName, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } }