Пример #1
0
        public static bool CheckSpacesForList(LexRecord lexRecord, int contentType)

        {
            bool validFlag = true;


            List <string> inList = LexRecordUtil.GetListFromLexRecord(lexRecord, contentType);

            for (int i = 0; i < inList.Count; i++)

            {
                string inItem    = (string)inList[i];
                string newInItem = StringTrim(inItem);
                if (!newInItem.Equals(inItem))

                {
                    validFlag = false;
                    ErrMsgUtilLexRecord.AddContentErrMsg(contentType, 7, inItem, lexRecord);


                    LexRecordUtil.SetItemInListInLexRecordAt(lexRecord, contentType, newInItem, i);
                }
            }

            return(validFlag);
        }
Пример #2
0
        public static bool CheckDuplicatesForList(LexRecord lexRecord, int contentType)

        {
            bool validFlag = true;


            List <string> inList = LexRecordUtil.GetListFromLexRecord(lexRecord, contentType);
            List <string> uList  = new List <string>();

            for (int i = 0; i < inList.Count; i++)

            {
                string inItem = (string)inList[i];

                if (uList.Contains(inItem) == true)

                {
                    validFlag = false;
                    ErrMsgUtilLexRecord.AddContentErrMsg(contentType, 2, inItem, lexRecord);
                }
                else

                {
                    uList.Add(inItem);
                }
            }

            if (!validFlag)

            {
                LexRecordUtil.SetListInLexRecord(lexRecord, contentType, uList);
            }

            return(validFlag);
        }
Пример #3
0
        public static bool CheckDoublePipesForList(LexRecord lexRecord, int contentType)

        {
            bool validFlag = true;


            List <string> inList = LexRecordUtil.GetListFromLexRecord(lexRecord, contentType);

            foreach (string inItem in inList)

            {
                if (inItem.IndexOf("||", StringComparison.Ordinal) >= 0)

                {
                    ErrMsgUtilLexRecord.AddContentErrMsg(contentType, 3, inItem, lexRecord);

                    validFlag = false;
                }
            }

            return(validFlag);
        }