private void textBoxTotalPatients_DoubleClick(object sender, EventArgs e)
        {
            IStorageDataAccessAgent db = GetDataAccessAgent();

            if (db != null)
            {
                _patientCount             = db.FindPatientsCount(_mpc);
                textBoxTotalPatients.Text = _patientCount.ToString();
            }
        }
        private void Initialize()
        {
            if (treeViewSqlServerInformation != null && treeViewSqlServerInformation.Nodes != null)
            {
                treeViewSqlServerInformation.Nodes.Clear();
            }

            _ciStorage = null;
            // Sql Server Information
            foreach (KeyValuePair <string, string> kvp in this.SqlDatabaseList)
            {
                ConnectionInformation ci = GetInfo(kvp.Key, kvp.Value);
                UpdateDatabaseDetails(ci);
                if (ci.FriendlyName == StorageDatabaseName)
                {
                    _ciStorage = ci;
                }
            }

            // Patient, study, series, image count
            if (_ciStorage != null)
            {
                IStorageDataAccessAgent db = GetDataAccessAgent();

                textBoxTotalPatients.Text = "0";
                textBoxTotalStudies.Text  = "0";
                textBoxTotalSeries.Text   = "0";
                textBoxTotalImages.Text   = "0";

                double dTotalMBytes = 0;
                try
                {
                    _patientCount = db.FindPatientsCount(_mpc);
                    _studiesCount = db.FindStudiesCount(_mpc);
                    _seriesCount  = db.FindSeriesCount(_mpc);
                    _imageCount   = db.FindCompositeInstancesCount(_mpc);

                    // RecalculateTotalDataStored();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }

                textBoxTotalPatients.Text = _patientCount.ToString();
                textBoxTotalStudies.Text  = _studiesCount.ToString();
                textBoxTotalSeries.Text   = _seriesCount.ToString();
                textBoxTotalImages.Text   = _imageCount.ToString();

                textBoxTotalDataStored.Text = string.Format("{0:F1} MB", dTotalMBytes);
            }
        }