示例#1
0
        ///<summary>Only used from Unit Tests.  Since we clear the db of hl7Defs we have to insert this internal def not update it.</summary>
        public static void EnableInternalForTests(HL7InternalType internalType)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), internalType);
                return;
            }
            HL7Def        hl7Def  = null;
            List <HL7Def> defList = GetDeepInternalList();

            for (int i = 0; i < defList.Count; i++)
            {
                if (defList[i].InternalType == internalType)
                {
                    hl7Def = defList[i];
                    break;
                }
            }
            if (hl7Def == null)
            {
                return;
            }
            hl7Def.IsEnabled = true;
            Insert(hl7Def);
        }
示例#2
0
文件: HL7Defs.cs 项目: mnisl/OD
		///<summary>Gets an internal HL7Def from the database of the specified type.</summary>
		public static HL7Def GetInternalFromDb(HL7InternalType internalType) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetObject<HL7Def>(MethodBase.GetCurrentMethod(),internalType);
			}
			string command="SELECT * FROM hl7def WHERE IsInternal=1 "
				+"AND InternalType='"+POut.String(internalType.ToString())+"'";
			return Crud.HL7DefCrud.SelectOne(command);
		}
示例#3
0
        ///<summary>Gets an internal HL7Def from the database of the specified type.</summary>
        public static HL7Def GetInternalFromDb(HL7InternalType internalType)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetObject <HL7Def>(MethodBase.GetCurrentMethod(), internalType));
            }
            string command = "SELECT * FROM hl7def WHERE IsInternal=1 "
                             + "AND InternalType='" + POut.String(internalType.ToString()) + "'";

            return(Crud.HL7DefCrud.SelectOne(command));
        }
示例#4
0
文件: HL7Defs.cs 项目: mnisl/OD
		///<summary>Only used from Unit Tests.  Since we clear the db of hl7Defs we have to insert this internal def not update it.</summary>
		public static void EnableInternalForTests(HL7InternalType internalType) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),internalType);
				return;
			}
			HL7Def hl7Def=null;
			List<HL7Def> defList=GetDeepInternalList();
			for(int i=0;i<defList.Count;i++){
				if(defList[i].InternalType==internalType){
					hl7Def=defList[i];
					break;
				}
			}
			if(hl7Def==null) {
				return;
			}
			hl7Def.IsEnabled=true;
			Insert(hl7Def);
		}