private RemoveAidDefinition[] createAidRemoveObject(Aid aid) { RemoveAidDefinition[] au = new RemoveAidDefinition[1]; au[0] = new RemoveAidDefinition(); au[0].aidoid = aid.aidoid; au[0].aidoidSpecified = true; return au; }
private AidUpdateDefinition[] createAidUpdateObject(Aid aid) { AidUpdateDefinition[] au = new AidUpdateDefinition[1]; NewAidDefinition[] na = new NewAidDefinition[1]; PartsUpdateDefinition parts = new PartsUpdateDefinition(); if (aid.aidoid != 0) { au[0] = new AidUpdateDefinition(); au[0].aidtypeoid = aid.aidtypeoid; au[0].aidtypeoidSpecified = true; au[0].isonumber = aid.isonumber; au[0].description = aid.description; au[0].name = aid.name; au[0].aidoid = aid.aidoid; au[0].aidoidSpecified = true; au[0].externalaidid = aid.orderno.PadRight(6, '_') + aid.row.Trim(); au[0].isFirstTimePatientSpecified = true; au[0].isFirstTimePatient = aid.FirstTimePatient; if (ECS.noNULL(aid.ProdStat).Equals("1")) { au[0].statusSpecified = true; au[0].status = AidStatusValues.KLARFORFAKTURERING; } parts.newpart = createPartNewDefinition(aid.parts); parts.partupdate = createPartUpdateDefinition(aid.parts); parts.removepart = createPartRemoveDefinition(aid.parts); au[0].parts = parts; } else { MessageBox.Show("Hjälpmedlet (" + aid.isonumber + ") saknar identitet i Thord (AidOid). Detta hjälpmedel kan inte\nuppdateras till Thord utan måste hanteras manuellt", "Kan inte posta till Thord"); } return au; }
/// <summary> /// Creates a NewAidDefinition with all parts inkluded. /// </summary> /// <param name="referral"></param> /// <returns></returns> private NewAidDefinition[] createAidNewObject(Aid aid) { NewAidDefinition[] na = new NewAidDefinition[1]; NewPartsDefinition parts = new NewPartsDefinition(); na[0] = new NewAidDefinition(); na[0].aidtypeoid = aid.aidtypeoid; na[0].aidtypeoidSpecified = true; na[0].isonumber = aid.isonumber; na[0].description = aid.description; na[0].name = aid.name; na[0].needstep = aid.needstep; na[0].needstepSpecified = aid.needstepSpecified; na[0].externalaidid = aid.orderno.PadRight(6, '_') + aid.row.Trim(); na[0].isFirstTimePatientSpecified = true; na[0].isFirstTimePatient = aid.FirstTimePatient; parts.newpart = createPartNewDefinition(aid.parts); na[0].parts = parts; return na; }