public int?CreateOrUpdateRecipientGroup(ApiRecepientGroup group) { if (group.Id == 0) { return(client.Post("recipientgroups/", group)); } client.Put($"recipientgroups/{group.Id}", group); return(group.Id); }
public void Save() { if (!IsValid || !IsDirty) { return; } var editedGroup = new ApiRecepientGroup(); mapper.Map(this, editedGroup); if (string.IsNullOrEmpty(AddressesBcc)) { editedGroup.AddressesBcc = null; } cachedService.CreateOrUpdateRecipientGroup(editedGroup); cachedService.RefreshRecipientGroups(); Close(); }