Beispiel #1
0
        /// <summary>
        /// The Execute
        /// Which is responsible for returning only invalid records from given datatable
        /// </summary>
        /// <param name="context"></param>
        protected override void Execute(CodeActivityContext context)
        {
            var fieldList = RequiredFields.Get(context);
            var dataTale  = ValidationData.Get(context);

            var result = ValidaterUtility.GetInValidDataTableRows(dataTale, fieldList.Split(';').ToList());

            InvalidItemsDataTable.Set(context, result);
        }
        /// <summary>
        /// The Execute
        /// Which is responsible for validating the data
        /// </summary>
        /// <param name="context"></param>
        protected override void Execute(CodeActivityContext context)
        {
            var fieldList     = RequiredFields.Get(context);
            var dataTale      = ValidationData.Get(context);
            var resultMessage = string.Empty;

            var result = ValidaterUtility.IsValidDataTable(dataTale, fieldList.Split(';').ToList(), out resultMessage);

            IsValidDataTable.Set(context, result);
            ResultMessage.Set(context, resultMessage);
        }