Ejemplo n.º 1
0
        public questStatus RefreshSchema(DatabaseEditorViewModel databaseEditorViewModel)
        {
            // Initialize
            questStatus status = null;


            // Refresh schema
            DatabaseId  databaseId  = new DatabaseId(databaseEditorViewModel.Id);
            DatabaseMgr databaseMgr = new DatabaseMgr(this.UserSession);

            status = databaseMgr.RefreshSchema(databaseId);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
Ejemplo n.º 2
0
        public questStatus RefreshSchema(DatabasesListViewModel databasesListViewModel)
        {
            // Initialize
            questStatus status = null;


            // Refresh schema(s)
            foreach (DatabaseLineItemViewModel databaseLineItemViewModel in databasesListViewModel.Items)
            {
                DatabaseId  databaseId  = new DatabaseId(databaseLineItemViewModel.Id);
                DatabaseMgr databaseMgr = new DatabaseMgr(this.UserSession);
                status = databaseMgr.RefreshSchema(databaseId);
                if (!questStatusDef.IsSuccess(status))
                {
                    // TODO: DATABASE-SPECIFIC ERROR MESSAGE TO KNOW WHICH DATABASE FAILED.
                    return(status);
                }
            }
            return(new questStatus(Severity.Success));
        }