public dtoAttachmentFilePermission(dtoAttachmentFile attachment, dtoGenericPermission generic, long count) : base(attachment.Id) { Attachment = attachment; Deleted = attachment.Deleted; AllowDelete = generic.AllowDelete && Deleted != BaseStatusDeleted.None; AllowVirtualDelete = Deleted == BaseStatusDeleted.None && generic.AllowVirtualDelete && !(count > 0); AllowUnDelete = Deleted != BaseStatusDeleted.None && generic.AllowUnDelete; SubmissionCount = count; }
public dtoAttachmentFilePermission(long id, dtoAttachmentFile attachment) : base(id) { Attachment = attachment; Deleted = attachment.Deleted; }