///<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); }
///<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); }
///<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)); }
///<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); }