/// <summary> /// 检索控制信息 只显示让客户可以看见的信息 /// </summary> /// <returns></returns> public ArrayList QueryControlerInfo() { string strSql = ""; ArrayList al = new ArrayList(); if (this.Sql.GetSql("QueryControlerInfo.1", ref strSql) == -1) { return(null); } //strSql = string.Format( strSql, Neusoft.FrameWork.Management.Connection.Hospital.ID ); if (this.ExecQuery(strSql) == -1) { return(null); } //0控制参数代码1控制参数名称2控制参数值3显示标记 while (this.Reader.Read()) { Neusoft.HISFC.Models.Base.ControlParam Controler = new Neusoft.HISFC.Models.Base.ControlParam(); try { Controler.ID = this.Reader[0].ToString(); Controler.Name = this.Reader[1].ToString(); Controler.ControlerValue = this.Reader[2].ToString(); Controler.IsVisible = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[3].ToString()); Controler.User01 = this.Reader[4].ToString(); Controler.User02 = this.Reader[5].ToString(); } catch (Exception ex) { this.Err = "查询控制信息赋值错误!" + ex.Message; return(null); } finally { this.Reader.Close(); } al.Add(Controler); } return(al); }
/// <summary> /// 获得整个控制类信息 /// </summary> /// <param name="controlName"></param> /// <returns></returns> public Neusoft.HISFC.Models.Base.ControlParam QueryControlInfoByName(string controlName) { string strSql = ""; if (this.Sql.GetSql("QueryControlInfoByName", ref strSql) == -1) { return(null); } strSql = string.Format(strSql, controlName); if (this.ExecQuery(strSql) == -1) { return(null); } Neusoft.HISFC.Models.Base.ControlParam Controler = null; //0控制参数代码1控制参数名称2控制参数值3显示标记 while (this.Reader.Read()) { Controler = new Neusoft.HISFC.Models.Base.ControlParam(); try { Controler.ID = this.Reader[0].ToString(); Controler.Name = this.Reader[1].ToString(); Controler.ControlerValue = this.Reader[2].ToString(); Controler.IsVisible = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[3].ToString()); Controler.User01 = this.Reader[4].ToString(); Controler.User02 = this.Reader[5].ToString(); } catch (Exception ex) { this.Err = "查询控制信息赋值错误!" + ex.Message; return(null); } finally { this.Reader.Close(); } } return(Controler); }
/// <summary> /// 更新控制信息 /// </summary> /// <param name="controlParam"></param> /// <returns></returns> public int UpdateControlerInfo(Neusoft.HISFC.Models.Base.ControlParam controlParam) { string strSql = ""; if (this.Sql.GetSql("UpdateControlerInfo.1", ref strSql) == -1) { return(-1); } try { //0控制参数代码1控制参数名称2控制参数值3显示标记4操作员5操作时间 strSql = string.Format(strSql, controlParam.ID, controlParam.Name, controlParam.ControlerValue, Neusoft.FrameWork.Function.NConvert.ToInt32(controlParam.IsVisible).ToString(), this.Operator.ID); } catch (Exception ex) { this.Err = ex.Message; return(-1); } return(this.ExecNoQuery(strSql)); }
/// <summary> /// 通过合同单位编码获得 /// </summary> /// <param name="pactCode">合同单位编码</param> /// <returns>成功: 医保接口实例 失败: null</returns> public Neusoft.HISFC.BizProcess.Interface.FeeInterface.IMedcare GetInterfaceFromPact(string pactCode) { Neusoft.FrameWork.Management.ControlParam myCtrl = new Neusoft.FrameWork.Management.ControlParam(); //Trans为全局量 不需要单独SetTrans //if (this.trans != null) //{ // myCtrl.SetTrans(trans.Trans); //} Neusoft.HISFC.Models.Base.ControlParam con = myCtrl.QueryControlInfoByName(pactCode); if (con == null) { this.errMsg = "获得调用接口处错!" + myCtrl.Err; return(null); } try { Assembly a = Assembly.LoadFrom(con.ControlerValue); System.Type[] types = a.GetTypes(); foreach (System.Type type in types) { if (type.GetInterface("IMedcare") != null) { objInterface = System.Activator.CreateInstance(type); } } } catch (Exception e) { this.errMsg = e.Message; return(null); } return((Neusoft.HISFC.BizProcess.Interface.FeeInterface.IMedcare)objInterface); }