示例#1
0
        public void testGetGroup()
        {
            List<string> returnVal;
            Name name;
            string message;
            NamesDo names = new NamesDo();

            message = "TEST GET ALL";
            names.GetAll = true;
            names.LoadData();
            ReviewTestData(names.NamesList(), message);
            var datapair = names.GetPairedNameAndId();
            names.ReSet();

            message = "TEST GET BY ID";
            names.Ids.Add("00000000000000085967_00000001220429793929_03490");
            names.LoadData();
            ReviewTestData(names.NamesList(), message);
            names.ReSet();

            message = "TEST GET BY SPECIFIC GROUP";
            names.GetAll = true;
            names.Group = "OWNER";
            names.LoadData();
            ReviewTestData(names.NamesList(), message);
            names.ReSet();

            message = "TEST GET UNIQUE GROUPS";
            names.GetAll = true;
            names.LoadData();
            names.GetUniqueGroups();
            ReviewTestData(names.NamesList(), message);
            names.ReSet();

            message = "TEST BEST NAME";
            names.GetAll = true;
            names.LoadData();
            name = names.GetBestName("00000000000000085967_00000001220429793929_03490");
            ReviewTestData(names.NamesList(name),message);
            names.ReSet();

            names.GetAll = true;
            names.LoadData();
            var UniqueGroups = names.GetUniqueGroups();
        }
示例#2
0
        public void TestDisplay()
        {
            NamesDo names = new NamesDo();
            names.Ids.Add( "00000000000000085967_00000001220429793929_03490");
            names.Group = "OWNER";
            names.LoadData();

            Console.WriteLine("GetNamesInDateOrderById");
            foreach( var name in names.GetNamesInDateOrderById("00000000000000085967_00000001220429793929_03490"))
                //Console.WriteLine(name.FullName);
                Console.WriteLine();

            Console.WriteLine("GetBestName");
             var name2 = names.GetBestName("00000000000000085967_00000001220429793929_03490");
                Console.WriteLine(name2.FullName);

            names.GetUniqueNamesById();
        }
示例#3
0
        /*__________________________________________________________________________________________*/
        private void LoadClientData()
        {
            AssociationsDo associations = new AssociationsDo();
             string _francheseeId = "00000000000000080533_00000001219860847215_00001";

            //associations.ParentId =
            associations.Ids.Add( _francheseeId);
            associations.ParentGroup = "FRANCHESEE"; // parent
            associations.ChildGroup = "CLIENT";
            associations.IDType = (int)AssociationIdx.PARENTID;
            //associations = new AssociationsDo(parentgroup, parentid, childgroup, "parent");

            List<Association> ClientAssociation = associations.LoadData();
             associations.ReSet();

             associations.Ids.Add(ClientAssociation.FindLast(element => element.ParentId == _francheseeId).ChildId);

            associations.ParentGroup = "CLIENT"; // parent
            associations.ChildGroup = "CONTACT";
            associations.IDType = (int)AssociationIdx.PARENTID;
            //associations = new AssociationsDo(parentgroup, parentid, childgroup, "parent");
            List<Association > LoadClientContactData= associations.LoadData();

             NamesDo names = new NamesDo();
             names.Ids.Add(ClientAssociation.FindLast(element => element.ParentId == _francheseeId).ChildId);
             names.Group = "CLIENT";
             names.LoadData();
        }