/// <summary> /// Action <code>ActionAddress_CreateOrUpdate</code> that represents the Service Studio user action /// <code>Address_CreateOrUpdate</code> <p> Description: This action creates or updates the give /// n address.</p> /// </summary> public static void ActionAddress_CreateOrUpdate(HeContext heContext, ENAddressEntityRecord inParamAddressR, out long outParamAddressId) { lcoAddress_CreateOrUpdate result = new lcoAddress_CreateOrUpdate(); lcvAddress_CreateOrUpdate localVars = new lcvAddress_CreateOrUpdate(inParamAddressR); try { // new address? if (((localVars.inParamAddressR.ssId == Convert.ToInt64(BuiltInFunction.NullIdentifier())))) { // creation info // AddressR.Active = True localVars.inParamAddressR.ssActive = true; // AddressR.CreatedDate = CurrDateTime localVars.inParamAddressR.ssCreatedDate = BuiltInFunction.CurrDateTime(); // AddressR.CreatedBy = GetUserId localVars.inParamAddressR.ssCreatedBy = BuiltInFunction.GetUserId(); } // update info // AddressR.LastUpdatedDate = CurrDateTime localVars.inParamAddressR.ssLastUpdatedDate = BuiltInFunction.CurrDateTime(); // AddressR.LastUpdatedBy = GetUserId localVars.inParamAddressR.ssLastUpdatedBy = BuiltInFunction.GetUserId(); // CreateOrUpdateAddress ExtendedActions.CreateOrUpdateAddress(heContext, localVars.inParamAddressR.ChangedAttributes, (((RCAddressRecord)localVars.inParamAddressR)), out localVars.resCreateOrUpdateAddress_outParamId); // AddressId = CreateOrUpdateAddress.Id result.outParamAddressId = localVars.resCreateOrUpdateAddress_outParamId; } // try finally { outParamAddressId = result.outParamAddressId; } }
/// <summary> /// Action <code>ActionAddressType_GetOrCreateByLabel</code> that represents the Service Studio user /// action <code>AddressType_GetOrCreateByLabel</code> <p> Description: Gets or creates the addres /// s type for that label.</p> /// </summary> public static void ActionAddressType_GetOrCreateByLabel(HeContext heContext, string inParamLabel, out long outParamAddressTypeId) { lcoAddressType_GetOrCreateByLabel result = new lcoAddressType_GetOrCreateByLabel(); lcvAddressType_GetOrCreateByLabel localVars = new lcvAddressType_GetOrCreateByLabel(inParamLabel); try { // Query datasetGetAddressTypesByLabel int datasetGetAddressTypesByLabel_maxRecords = 0; localVars.queryResGetAddressTypesByLabel_outParamList = FuncActionAddressType_GetOrCreateByLabel.datasetGetAddressTypesByLabel(heContext, datasetGetAddressTypesByLabel_maxRecords, IterationMultiplicity.Never, out localVars.queryResGetAddressTypesByLabel_outParamCount, localVars.inParamLabel ); // exists? if (((!localVars.queryResGetAddressTypesByLabel_outParamList.Empty))) { // AddressTypeId = GetAddressTypesByLabel.List.Current.AddressType.Id result.outParamAddressTypeId = localVars.queryResGetAddressTypesByLabel_outParamList.CurrentRec.ssENAddressType.ssId; } else { // set AddressType // GetAddressTypesByLabel.List.Current.AddressType.Label = Label localVars.queryResGetAddressTypesByLabel_outParamList.CurrentRec.ssENAddressType.ssLabel = localVars.inParamLabel; // GetAddressTypesByLabel.List.Current.AddressType.Active = True localVars.queryResGetAddressTypesByLabel_outParamList.CurrentRec.ssENAddressType.ssActive = true; // GetAddressTypesByLabel.List.Current.AddressType.CreatedDate = CurrDateTime localVars.queryResGetAddressTypesByLabel_outParamList.CurrentRec.ssENAddressType.ssCreatedDate = BuiltInFunction.CurrDateTime(); // GetAddressTypesByLabel.List.Current.AddressType.CreatedBy = GetUserId localVars.queryResGetAddressTypesByLabel_outParamList.CurrentRec.ssENAddressType.ssCreatedBy = BuiltInFunction.GetUserId(); // GetAddressTypesByLabel.List.Current.AddressType.LastUpdatedDate = CurrDateTime localVars.queryResGetAddressTypesByLabel_outParamList.CurrentRec.ssENAddressType.ssLastUpdatedDate = BuiltInFunction.CurrDateTime(); // GetAddressTypesByLabel.List.Current.AddressType.LastUpdatedBy = GetUserId localVars.queryResGetAddressTypesByLabel_outParamList.CurrentRec.ssENAddressType.ssLastUpdatedBy = BuiltInFunction.GetUserId(); // CreateAddressType ExtendedActions.CreateAddressType(heContext, (((RCAddressTypeRecord)localVars.queryResGetAddressTypesByLabel_outParamList.CurrentRec.ssENAddressType)), out localVars.resCreateAddressType_outParamId); // AddressTypeId = CreateAddressType.Id result.outParamAddressTypeId = localVars.resCreateAddressType_outParamId; } } // try finally { outParamAddressTypeId = result.outParamAddressTypeId; } }