public FunctionalGroupErrors CreateNewFunctionalGroupErrorInfo(int sequenceNo, string idCode, string ctrlNumber) { FunctionalGroupErrors info = new FunctionalGroupErrors(sequenceNo, idCode, ctrlNumber); functionalGroupErrors.Add(info); return(info); }
public static void AddFunctionalGroupDetails(this InterchangeErrors errors, int groupNumber, string idCode, string ctrlNumber, bool updateExisting) { if (errors == null) { throw new ArgumentNullException("errors"); } FunctionalGroupErrors functionalGroupErrors = new FunctionalGroupErrors(groupNumber, idCode, ctrlNumber); if (errors.FunctionalGroupErrors.Count > 0 && updateExisting == true) { errors.FunctionalGroupErrors.Clear(); } errors.FunctionalGroupErrors.Add(functionalGroupErrors); }