Пример #1
0
 /// <summary>
 /// Main Constructor
 /// </summary>
 /// <param name="ACallerForm">A reference to the caller form.  Usually use 'this'.  It must implement the <see cref="IBoundImageEvaluator"/> interface.</param>
 /// <param name="AContext">A string that identifies the column context.  Can be empty text if the grid only has one column with an image.</param>
 /// <param name="AImageEnum">One of the available images that can be displayed.</param>
 public BoundImageToolTipModel(IBoundImageEvaluator ACallerForm,
                               BoundGridImage.AnnotationContextEnum AContext,
                               BoundGridImage.DisplayImageEnum AImageEnum)
 {
     FCallerForm    = ACallerForm;
     FCallerContext = AContext;
     FImageEnum     = AImageEnum;
 }
Пример #2
0
        /// <summary>
        /// Implementation of the interface member
        /// </summary>
        /// <param name="AContext">The context that identifies the column for which an image is to be evaluated</param>
        /// <param name="ADataRowView">The data containing the column of interest.  You will evaluate whether this column contains data that should have the image or not.</param>
        /// <returns>True if the image should be displayed in the current context</returns>
        public bool EvaluateBoundImage(BoundGridImage.AnnotationContextEnum AContext, DataRowView ADataRowView)
        {
            ARecurringGiftBatchRow row = (ARecurringGiftBatchRow)ADataRowView.Row;

            switch (AContext)
            {
            case BoundGridImage.AnnotationContextEnum.AccountCode:
                return(!FAccountAndCostCentreLogicObject.AccountIsActive(row.BankAccountCode));

            case BoundGridImage.AnnotationContextEnum.CostCentreCode:
                return(!FAccountAndCostCentreLogicObject.CostCentreIsActive(row.BankCostCentre));
            }

            return(false);
        }
Пример #3
0
        /// <summary>
        /// Implementation of the interface member
        /// </summary>
        /// <param name="AContext">The context that identifies the column for which an image is to be evaluated</param>
        /// <param name="ADataRowView">The data containing the column of interest.  You will evaluate whether this column contains data that should have the image or not.</param>
        /// <returns>True if the image should be displayed in the current context</returns>
        public bool EvaluateBoundImage(BoundGridImage.AnnotationContextEnum AContext, DataRowView ADataRowView)
        {
            SUserRow row = (SUserRow)ADataRowView.Row;

            return(row.Retired);
        }