コード例 #1
0
        /// <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);
                }
            }
        }