/// <summary> /// Populate member data with the data from db /// </summary> private void RetrieveInfoFromDb() { if (_dataVaultInterface != null) { // Get info from db _dataVaultInterface.GetPersonalInfo(out _personalInfo, _personalInfoId); // Get states form db _dataVaultInterface.GetStates(out _states); // Get genders from db _dataVaultInterface.GetGenders(out _genders); // Get attachment types from db List <AttachmentTypeInfo> attachmentTypes; _dataVaultInterface.GetAttachmentTypes(out attachmentTypes); AttachmentInfo.SetAttachmentTypes(attachmentTypes); // Create empty child window list. Should be same size as the attachment list int attachmentsCount = _personalInfo.Attachments.Count; _childWindows = new List <AttachmentWindow>(); for (int i = 0; i < attachmentsCount; i++) { _childWindows.Add(null); } } }
// 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); }