public static Attachment AttachmentSave(Attachment attachment) { if (!attachment.IsValid) { return(attachment); } Attachment result; if (attachment.IsNew) { result = AttachmentService.AttachmentInsert(attachment); } else { result = AttachmentService.AttachmentUpdate(attachment); } return(result); }
public static bool AttachmentDelete(int attachmentId) { return(AttachmentService.AttachmentDelete( AttachmentService.AttachmentFetch(attachmentId))); }