Beispiel #1
0
        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);
        }
Beispiel #2
0
 public static bool AttachmentDelete(int attachmentId)
 {
     return(AttachmentService.AttachmentDelete(
                AttachmentService.AttachmentFetch(attachmentId)));
 }