public ManualEntryViewModel()
        {
            if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
            {
                return;
            }
            ObjectTypeOptions = new List <SqlServerObjectType>
            {
                new SqlServerObjectType("U", "Table"),
                new SqlServerObjectType("P", "Stored Procedure"),
                new SqlServerObjectType("V", "View"),
                new SqlServerObjectType("TF", "Table Function"),
                new SqlServerObjectType("FN", "Scalar Function")
            };

            Labels = new ObservableCollection <ProjectLabel>();
            Labels.AddRange(_rogueProjectRepository.GetProjectLabels().Select(x => new ProjectLabel(x)));
            Labels.Insert(0, new ProjectLabel {
                Name = "Select a Label"
            });
            SelectedLabel = Labels.FirstOrDefault();

            SelectedSqlServerObjectType = ObjectTypeOptions.Single(x => x.TypeCode == "P");
            SelectedDatabase            = DatabaseOptions.SingleOrDefault(x => x.DatabaseName.Equals("StoneEdgeRogue") && x.Environment == "NA");
            ObjectSchemaOptions         = _utilityRepository.GetDatabaseSchemaNames(SelectedDatabase?.DatabaseName);
            SelectedObjectSchema        = ObjectSchemaOptions.SingleOrDefault(x => x == "dbo");
            SelectedDeveloper           = DeveloperOptions.SingleOrDefault(x => x.DomainUserName.Equals(Environment.UserName));
            ReleaseDate = DateHelper.GetNextWeekday(DateTime.Now, DayOfWeek.Thursday);
            if (SelectedDatabase != null && SelectedObjectSchema != null)
            {
                ObjectNameOptions = _utilityRepository.GetObjectNames(SelectedDatabase.DatabaseName, SelectedObjectSchema, SelectedSqlServerObjectType.TypeCode);
            }
            SelectedObjectName = ObjectNameOptions.FirstOrDefault();
        }
 private void RefreshObjects(object o)
 {
     try {
         ActionMessage      = null;
         ObjectNameOptions  = _utilityRepository.GetObjectNames(SelectedDatabase.DatabaseName, SelectedObjectSchema, SelectedSqlServerObjectType.TypeCode);
         SelectedObjectName = ObjectNameOptions.FirstOrDefault();
     }
     catch (Exception e)
     {
         MessageBox.Show("Error in RefreshObjects: " + e.Message);
     }
 }