Exemplo n.º 1
0
        static void Test15()
        {
            DataVaultInterface i = new DataVaultInterface();

            i.Login("123");
            List <PersonalInfo> infos;

            i.GetBriefPersonalInfoList(out infos);
            PrintList(infos);
        }
Exemplo n.º 2
0
        static void Test16()
        {
            DataVaultInterface i = new DataVaultInterface();

            i.Login("123");
            List <PersonalInfo> infos;

            i.SearchBriefPersonalInfoListWithName(out infos, "first last");
            PrintList(infos);
        }
Exemplo n.º 3
0
        static void Test18()
        {
            DataVaultInterface i = new DataVaultInterface();

            i.Login("123");
            List <PersonalInfo> infos;

            i.SearchBriefPersonalInfoListWithPhone(out infos, "723");
            PrintList(infos);
        }
Exemplo n.º 4
0
        // Add a person
        static void Test21()
        {
            DataVaultInterface i = new DataVaultInterface();

            i.Login("123");
            PersonalInfo p = new PersonalInfo();

            p.Name.FirstName  = "TestF";
            p.Name.MiddleName = "TestM";
            p.Name.LastName   = "TestL";
            i.ModifyPersonalInfo(p);
        }
Exemplo n.º 5
0
        // Search for all kind
        static void Test20()
        {
            DataVaultInterface i = new DataVaultInterface();

            i.Login("123");
            List <PersonalInfo> infos;

            i.SearchBriefPersonalInfoList(out infos, "first la", DataVaultInterface.SearchOptionsEnum.Name);
            PrintList(infos);
            Seperator();
            i.SearchBriefPersonalInfoList(out infos, "23", DataVaultInterface.SearchOptionsEnum.Phone);
            PrintList(infos);
            Seperator();
            i.SearchBriefPersonalInfoList(out infos, "000", DataVaultInterface.SearchOptionsEnum.SSN);
            PrintList(infos);
        }
Exemplo n.º 6
0
        // Modify a person
        static void Test22()
        {
            DataVaultInterface i = new DataVaultInterface();

            i.Login("123");
            PersonalInfo p;

            i.GetPersonalInfo(out p, 0);
            Console.WriteLine(p);
            Seperator();
            p.Name.FirstName  = "TestF";
            p.Name.MiddleName = "TestM";
            p.Name.LastName   = "TestL";
            Console.WriteLine(p);
            Seperator();
            i.ModifyPersonalInfo(p);
        }
Exemplo n.º 7
0
        /// <summary>
        /// Log in
        /// </summary>
        private void Login()
        {
            string input = Password_TextBox.Password;

            if (null != _dataVaultInterface)
            {
                // Verify password
                StatusCode status = _dataVaultInterface.Login(input);

                // Check return value
                if (status == StatusCode.NO_ERROR)
                {
                    // Pass the interface to next window
                    ExistingWindow existingWindow = new ExistingWindow(_dataVaultInterface);
                    existingWindow.Show();
                    this.Close();
                }
                else
                {
                    ShowMessageBox(status);
                }
            }
        }