Example #1
0
        /// <summary>
        /// Searches for potential customers in a black list and information about them
        /// </summary>
        /// <param name="fileName"></param>
        public void SearchTaxIdInBlackList(object fileName)
        {
            var queryBlackL = from tttaxid in list
                              from bbblack in blackList
                              where tttaxid.N3 == bbblack.N1
                              select new
            {
                N1 = tttaxid.N1,
                N2 = tttaxid.N2,
                N3 = tttaxid.N3,
                N4 = bbblack.N2
            };

            listOfResultsInBlackList = new List <DataClassString4>();
            foreach (var st in queryBlackL)
            {
                DataClassString4 resultExample = new DataClassString4();
                resultExample.N1 = st.N1;
                resultExample.N2 = st.N2;
                resultExample.N3 = st.N3.ToString();
                resultExample.N4 = st.N4;
                listOfResultsInBlackList.Add(resultExample);
            }

            ListBoxInBlackListEvent(listOfResultsInBlackList);
        }
Example #2
0
        /// <summary>
        /// Searches for non-unique TAXIDs and information about them
        /// </summary>
        /// <param name="fileName"></param>
        public void SearchNotUniqTaxId(object fileName)
        {
            var queryNotUniq = from tttaxid in list
                               group tttaxid by tttaxid.N3 into g
                               select new
            {
                N1 = g.Key,
                N2 = g.Count(),
                N3 = ""
            } into uuu
            where uuu.N2 > 1
            select uuu;

            var queryNotUniq2 = from mmm1 in queryNotUniq
                                from mmm2 in list
                                where mmm1.N1 == mmm2.N3
                                orderby mmm1.N2 descending
                                orderby mmm1.N1
                                select new
            {
                N1 = mmm2.N1,
                N2 = mmm2.N2,
                N3 = mmm2.N3,
                N4 = mmm1.N2
            };

            listOfResultsNotUniq = new List <DataClassString4>();
            foreach (var st in queryNotUniq2)
            {
                DataClassString4 resultExample = new DataClassString4();
                resultExample.N1 = st.N1;
                resultExample.N2 = st.N2;
                resultExample.N3 = st.N3;
                resultExample.N4 = st.N4.ToString();
                listOfResultsNotUniq.Add(resultExample);
            }

            ListBoxNotUniqEvent(listOfResultsNotUniq);
        }