public TaggedMentalHealthInstrumentAdministrationArrays(IndexedHashtable t) { if (t.Count == 0) { return; } arrays = new TaggedMentalHealthInstrumentAdministrationArray[t.Count]; for (int i = 0; i < t.Count; i++) { if (t.GetValue(i) == null) { arrays[i] = new TaggedMentalHealthInstrumentAdministrationArray((string)t.GetKey(i)); } else if (t.GetValue(i).GetType().IsArray) { arrays[i] = new TaggedMentalHealthInstrumentAdministrationArray((string)t.GetKey(i), (MentalHealthInstrumentAdministration[])t.GetValue(i)); } else if (MdwsUtils.isException(t.GetValue(i))) { fault = new FaultTO((Exception)t.GetValue(i)); } else { arrays[i] = new TaggedMentalHealthInstrumentAdministrationArray((string)t.GetKey(i), (List<MentalHealthInstrumentAdministration>)t.GetValue(i)); } } count = t.Count; }
public TaggedDrgArrays(IndexedHashtable t) { if (t.Count == 0) { return; } arrays = new TaggedDrgArray[t.Count]; for (int i = 0; i < t.Count; i++) { if (MdwsUtils.isException(t.GetValue(i))) { fault = new FaultTO((Exception)t.GetValue(i)); } else if (t.GetValue(i) == null) { arrays[i] = new TaggedDrgArray((string)t.GetKey(i)); } else if (t.GetValue(i).GetType().IsArray) { arrays[i] = new TaggedDrgArray((string)t.GetKey(i), (Drg[])t.GetValue(i)); } else { arrays[i] = new TaggedDrgArray((string)t.GetKey(i), (Drg)t.GetValue(i)); } } count = t.Count; }
/// <summary> /// US:838 US:840 /// MDWS status class that derives from our CStatus class so we /// handle MDWS errors in a consistent way /// </summary> /// <param name="fault"></param> public CMDWSStatus(FaultTO fault) { if (fault != null) { this.Status = false; this.StatusCode = k_STATUS_CODE.Failed; this.StatusComment = fault.message; } }
public UserSecurityKeyTO(AbstractPermission p) { if (p.Type != PermissionType.SecurityKey) { fault = new FaultTO(p.Name + " is not a Security Key"); return; } this.id = p.PermissionId; this.name = p.Name; }
public TaggedDemographicsRecordArrays(IndexedHashtable t) { if (t.Count == 0) { return; } if (t.Count == 1 && MdwsUtils.isException(t.GetValue(0))) { fault = new FaultTO((Exception)t.GetValue(0)); return; } arrays = new TaggedDemographicsRecordArray[t.Count]; for (int i = 0; i < t.Count; i++) { string ky = (string)t.GetKey(i); if (t.GetValue(i) == null) { arrays[i] = new TaggedDemographicsRecordArray(ky); } else if (MdwsUtils.isException(t.GetValue(i))) { arrays[i] = new TaggedDemographicsRecordArray(ky, (Exception)t.GetValue(i)); } else if (t.GetValue(i).GetType().IsArray) { arrays[i] = new TaggedDemographicsRecordArray(ky, (DemographicsRecord[])t.GetValue(i)); } else if (t.GetValue(i).GetType().IsInstanceOfType(new List<DemographicsRecord>())) { arrays[i] = new TaggedDemographicsRecordArray(ky, (List<DemographicsRecord>)t.GetValue(i)); } else { //arrays[i] = new TaggedDemographicsRecordArray(ky, (DemographicsRecord)t.GetValue(i)); } } count = t.Count; }
public DataSourceArray(IndexedHashtable t) { if (t.Count == 0) { return; } items = new DataSourceTO[t.Count]; for (int i = 0; i < t.Count; i++) { if (t.GetValue(i).GetType().IsAssignableFrom(typeof(Exception))) { fault = new FaultTO((Exception)t.GetValue(i)); } //else if (t.GetValue(i) == null) //{ // items[i] = new TaggedAdtArray((string)t.GetKey(i)); //} else { items[i] = new DataSourceTO((DataSource)t.GetValue(i)); } } count = items.Length; }