private UpdateCollectionDataBase getNestedInsert(IIdoCommandBuilder builder) { PropertyPair linkBy = null; if (builder.GetLinkBy().Length > 0) linkBy = builder.GetLinkBy()[0]; var data = new UpdateCollectionRequestData(builder.GetIDOName()); var idoUpdateItem = getInsertItem(builder); data.Items.Add(idoUpdateItem); if (linkBy != null) data.SetLinkBy(linkBy.ParentProperty, linkBy.ChildProperty); return data; }
public UpdateCollectionRequestData GetUpdateCollectionRequest( IIdoCommandBuilder builder, LoadCollectionResponseWrapper loadData) { var request = new UpdateCollectionRequestData() { IDOName = builder.GetIDOName(), RefreshAfterUpdate = true, LinkBy = builder.GetLinkBy() }; var action = GetUpdateActionFromBuilder(builder); request.Items.AddRange(get_update_items(builder, loadData.Records, action)); return request; }
private UpdateCollectionRequestData getNestedUpdate(IIdoCommandBuilder builder, IdoItemWrapper idoItemWrapper) { PropertyPair linkBy = null; if (builder.GetLinkBy().Length > 0) linkBy = builder.GetLinkBy()[0]; var data = new UpdateCollectionRequestData(builder.GetIDOName()); var idoUpdateItem = getUpdateItem(builder, builder.GetUpdateAction(), idoItemWrapper); idoUpdateItem.ItemID = idoItemWrapper[IdoConstants.KEY].ToString(); //not needed!!! data.Items.Add(idoUpdateItem); if (linkBy != null) data.SetLinkBy(linkBy.ParentProperty, linkBy.ChildProperty); return data; }