Beispiel #1
0
 public void DesignTable(IServer server, Entity entityObject)
 {
     this.SafeRun(() =>
     {
         var serverInfo = GetServer(server);
         ManagementStudioController.DesignTable(entityObject.InternalObject as Table, serverInfo.Connection);
         ForceHideYourselfIfNeeded();
     }, "DesignTable - " + GetSafeEntityObject(entityObject));
 }
Beispiel #2
0
 public void SelectFromTable(IServer server, Entity entityObject)
 {
     this.SafeRun(() =>
     {
         var serverInfo = GetServer(server);
         ManagementStudioController.SelectFromTable(entityObject.InternalObject as Table, serverInfo.Connection, _cfg.SelectTopX, _cfg.IncludeAllColumns, _cfg.AddWhereClauseFor, _cfg.AddNoLock, _cfg.OrderBy);
         ForceHideYourselfIfNeeded();
     }, "SelectFromTable - " + GetSafeEntityObject(entityObject));
 }
Beispiel #3
0
 public void ScriptTable(IServer server, Entity entityObject)
 {
     this.SafeRun(() =>
     {
         var serverInfo = GetServer(server);
         ManagementStudioController.ScriptTable(entityObject.InternalObject as Table, serverInfo.Connection, _cfg.ScriptIndexes, _cfg.ScriptForeignKeys, _cfg.ScriptTriggers);
         ForceHideYourselfIfNeeded();
     }, "ScriptTable - " + GetSafeEntityObject(entityObject));
 }
Beispiel #4
0
 public void ExecuteFunction(IServer server, Entity entityObject)
 {
     this.SafeRun(() =>
     {
         var serverInfo = GetServer(server);
         ManagementStudioController.ExecuteFunction(entityObject.InternalObject as UserDefinedFunction, serverInfo.Connection);
         ForceHideYourselfIfNeeded();
     }, "ExecuteProcedure failed - " + GetSafeEntityObject(entityObject));
 }
Beispiel #5
0
 public void ModifyProcedure(IServer server, Entity entityObject)
 {
     this.SafeRun(() =>
     {
         var serverInfo = GetServer(server);
         ManagementStudioController.OpenStoredProcedureForModification(entityObject.InternalObject as StoredProcedure, serverInfo.Connection, _cfg.AlterOrCreate);
         ForceHideYourselfIfNeeded();
     }, "ModifyProcedure failed - " + GetSafeEntityObject(entityObject));
 }
Beispiel #6
0
 public void ModifyView(IServer server, Entity entityObject)
 {
     this.SafeRun(() =>
     {
         var serverInfo = GetServer(server);
         ManagementStudioController.ModifyView(entityObject.InternalObject as View, serverInfo.Connection, _cfg.AlterOrCreate);
         ForceHideYourselfIfNeeded();
     }, "ModifyView failed - " + GetSafeEntityObject(entityObject));
 }
Beispiel #7
0
 public void ExecuteProcedure(IServer server, Entity entityObject)
 {
     this.SafeRun(() =>
     {
         var serverInfo = GetServer(server);
         serverInfo.Connection.DatabaseName = entityObject.DatabaseName;
         ManagementStudioController.ExecuteStoredProc(entityObject.InternalObject as StoredProcedure, serverInfo.Connection);
         ForceHideYourselfIfNeeded();
     }, "ExecuteProcedure failed - " + GetSafeEntityObject(entityObject));
 }
Beispiel #8
0
 public void SelectFromView(IServer server, Entity entityObject)
 {
     this.SafeRun(() =>
     {
         var serverInfo = GetServer(server);
         serverInfo.Connection.DatabaseName = entityObject.DatabaseName;
         ManagementStudioController.SelectFromView(entityObject.InternalObject as View, serverInfo.Connection, _cfg.SelectTopX, _cfg.IncludeAllColumns, _cfg.AddWhereClauseFor, _cfg.AddNoLock);
         ForceHideYourselfIfNeeded();
     }, "SelectFromView failed - " + GetSafeEntityObject(entityObject));
 }
Beispiel #9
0
 public void ModifyFunction(IServer server, Entity entityObject)
 {
     this.SafeRun(() =>
     {
         var serverInfo = GetServer(server);
         serverInfo.Connection.DatabaseName = entityObject.DatabaseName;
         ManagementStudioController.OpenFunctionForModification(entityObject.InternalObject as UserDefinedFunction, serverInfo.Connection, _cfg.AlterOrCreate);
         ForceHideYourselfIfNeeded();
     }, "ModifyFunction failed - " + GetSafeEntityObject(entityObject));
 }
Beispiel #10
0
 public void ModifyProcedure(IServer server, Entity entityObject)
 {
     this.SafeRun(() =>
     {
         //System.Diagnostics.Debugger.Launch();
         //System.Diagnostics.Debugger.Break();
         var serverInfo = GetServer(server);
         serverInfo.Connection.DatabaseName = entityObject.DatabaseName;
         ManagementStudioController.OpenStoredProcedureForModification(entityObject.InternalObject as StoredProcedure, serverInfo.Connection, _cfg.AlterOrCreate);
         ForceHideYourselfIfNeeded();
     }, "ModifyProcedure failed - " + GetSafeEntityObject(entityObject));
 }