コード例 #1
0
ファイル: EntityBase.cs プロジェクト: WilliamClydeMoon/Apps
        /*__________________________________________________________________________________________*/
        protected EntityBase()
        {
            //Session.Instance.Associations = new AssociationsDo(); // .Associations. = Matches  => new AssociationsDo()
            //Session.Instance.Names = new NamesDo();
            //Session.Instance.Contacts = new ContactsDo();

            associations = new AssociationsDo(); // .Associations. = Matches  => new AssociationsDo()
            names = new NamesDo();
            contacts = new ContactsDo();
        }
コード例 #2
0
ファイル: NameTest.cs プロジェクト: WilliamClydeMoon/Apps
        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();
        }
コード例 #3
0
ファイル: NameTest.cs プロジェクト: WilliamClydeMoon/Apps
        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();
        }
コード例 #4
0
ファイル: UnitTest.cs プロジェクト: WilliamClydeMoon/Apps
 /*__________________________________________________________________________________________*/
 public void TestApp(string TestName )
 {
     switch (TestName.ToUpper( ))
     {
         case "ALL":
             TestNames();
             TestAssociations();
             TestContacts();
             TestAddContacts();
             break;
         case "NAMES":
             TestNames();
             break;
         case "ASSOCIATIONS":
             TestAssociations();
             break;
         case "CONTACTS":
             TestContacts();
             break;
         case "ADDCONTACTS":
             TestAddContacts();
             break;
         case "EXTENSIONS":
             var obj = new NamesDo();
             TestExtensions(obj);
             break;
         case "CUSTOMER":
             TestCustomer();
             break;
         case "ENTITY":
             TestEntity();
             break;
         case "XML":
             testxml();
             break;
         case "ITEMS":
             TestItems();
             break;
         case "STRINGEXTENSIONS":
             TestStringExtension();
             break;
     }
 }
コード例 #5
0
ファイル: NameTest.cs プロジェクト: WilliamClydeMoon/Apps
 //private List<Name>  names   = new List<Name>();
 public void TestLoad()
 {
     NamesDo names = new NamesDo();
     //names.LoadData();
 }
コード例 #6
0
ファイル: UnitTest.cs プロジェクト: WilliamClydeMoon/Apps
 /*__________________________________________________________________________________________*/
 private void TestExtensions(NamesDo  args)
 {
     var enumDict = AddressGroups.ADDRESS.ToList();
     var test = args.GetProperty(a => a.GetBestName("00000000000000085967_00000001220429793929_03490"));
 }
コード例 #7
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();
        }