public static bool ExcludeFromGroup(this DocumentType documentType, DocumentGroupType @group, string tsr)
 {
     switch (group)
       {
     case DocumentGroupType.Output:
       var g = documentType.GetType();
       var h = g.GetCustomAttributes(typeof(OutputExcludeAttribute), false);
       return EsaOrEse.Contains(tsr) || h.Any();
     case DocumentGroupType.Input:
       return  documentType.GetType().GetCustomAttributes(typeof(InputExcludeAttribute), false).Any();
     default:
       throw new ArgumentOutOfRangeException(nameof(@group), @group, null);
       }
 }
Example #2
0
        private static void AssignGroup(ref int itemId, ref DocumentGroupType group, string groupCell)
        {
            if (groupCell.Contains("Output tax: Line items"))
              {
            group = DocumentGroupType.Output;

            itemId = 1;
              }

              if (groupCell.Contains("Input tax: Line items"))
              {
            group = DocumentGroupType.Input;

            itemId = 1;
              }
        }