コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="currentRow"></param>
        /// <param name="rowIndex"></param>
        public override void VerifyRow(DataRow currentRow, int rowIndex)
        {
            var fileAttachment = FileAttachmentsBusinessObject.NewInstance();
            var attachmentId   = (Guid)currentRow["FK_FileAttachments"];
            var linkedObjectId = (Guid)currentRow["FK_LinkedToObject"];

            if (fileAttachment.IsObjectLinkedToAttachment(attachmentId, linkedObjectId))
            {
                LogBusinessRuleViolation(currentRow, rowIndex, "DuplicateAttachment", "This file is already attached to this object.");
            }
        }
コード例 #2
0
 /// <summary>
 ///     Override the GetBusinessObject method
 /// </summary>
 public override IBusinessObject GetBusinessObject() => FileAttachmentsBusinessObject.NewInstance();