diff --git a/ServerExplorer/2008 to 2010.bat b/ServerExplorer/2008 to 2010.bat new file mode 100644 index 0000000..75ef23c --- /dev/null +++ b/ServerExplorer/2008 to 2010.bat @@ -0,0 +1,7 @@ +REM Tool from: http://www.programmersheaven.com/download/41236/download.aspx + +for /f "tokens=*" %%a IN ('dir /b /s *.sln') do ssr.exe 0 "Format Version 10.00" "Format Version 11.00" %%a +for /f "tokens=*" %%a IN ('dir /b /s *.sln') do ssr.exe 0 "# Visual Studio 2008" "# Visual Studio 2010" %%a + +for /f "tokens=*" %%a IN ('dir /b /s *.csproj') do ssr.exe 0 "ToolsVersion=''3.5''" "ToolsVersion=''4.0''" %%a +for /f "tokens=*" %%a IN ('dir /b /s *.csproj') do ssr.exe 0 "v9.0" "v10.0" %%a diff --git a/ServerExplorer/2010 to 2008.bat b/ServerExplorer/2010 to 2008.bat new file mode 100644 index 0000000..e0bbca2 --- /dev/null +++ b/ServerExplorer/2010 to 2008.bat @@ -0,0 +1,7 @@ +REM SSR.EXE tool from: http://www.programmersheaven.com/download/41236/download.aspx + +for /f "tokens=*" %%a IN ('dir /b /s *.sln') do ssr.exe 0 "Format Version 11.00" "Format Version 10.00" %%a +for /f "tokens=*" %%a IN ('dir /b /s *.sln') do ssr.exe 0 "# Visual Studio 2010" "# Visual Studio 2008" %%a + +for /f "tokens=*" %%a IN ('dir /b /s *.csproj') do ssr.exe 0 "ToolsVersion=''4.0''" "ToolsVersion=''3.5''" %%a +for /f "tokens=*" %%a IN ('dir /b /s *.csproj') do ssr.exe 0 "v10.0" "v9.0" %%a \ No newline at end of file diff --git a/ServerExplorer/Backup/ServerExplorer.sln b/ServerExplorer/Backup/ServerExplorer.sln deleted file mode 100644 index b20c15f..0000000 --- a/ServerExplorer/Backup/ServerExplorer.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerExplorer", "ServerExplorer\ServerExplorer.csproj", "{79531B74-3062-4A71-9953-5702BEBDEC0E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {79531B74-3062-4A71-9953-5702BEBDEC0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {79531B74-3062-4A71-9953-5702BEBDEC0E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {79531B74-3062-4A71-9953-5702BEBDEC0E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {79531B74-3062-4A71-9953-5702BEBDEC0E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ServerExplorer/Backup/ServerExplorer.suo b/ServerExplorer/Backup/ServerExplorer.suo deleted file mode 100644 index 991825e..0000000 Binary files a/ServerExplorer/Backup/ServerExplorer.suo and /dev/null differ diff --git a/ServerExplorer/Backup/ServerExplorer/Program.cs b/ServerExplorer/Backup/ServerExplorer/Program.cs deleted file mode 100644 index 56f343c..0000000 --- a/ServerExplorer/Backup/ServerExplorer/Program.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Forms; - -namespace ServerExplorer -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new frmPrincipal()); - } - } -} diff --git a/ServerExplorer/Backup/ServerExplorer/Properties/AssemblyInfo.cs b/ServerExplorer/Backup/ServerExplorer/Properties/AssemblyInfo.cs deleted file mode 100644 index 00673fe..0000000 --- a/ServerExplorer/Backup/ServerExplorer/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ServerExplorer")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("cyc")] -[assembly: AssemblyProduct("ServerExplorer")] -[assembly: AssemblyCopyright("Copyright © cyc 2012")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("31f76805-336c-471c-8af2-a4c1364e97b9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ServerExplorer/Backup/ServerExplorer/Properties/Resources.Designer.cs b/ServerExplorer/Backup/ServerExplorer/Properties/Resources.Designer.cs deleted file mode 100644 index 33e5119..0000000 --- a/ServerExplorer/Backup/ServerExplorer/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3082 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ServerExplorer.Properties -{ - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ServerExplorer.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - } -} diff --git a/ServerExplorer/Backup/ServerExplorer/Properties/Resources.resx b/ServerExplorer/Backup/ServerExplorer/Properties/Resources.resx deleted file mode 100644 index af7dbeb..0000000 --- a/ServerExplorer/Backup/ServerExplorer/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/ServerExplorer/Backup/ServerExplorer/Properties/Settings.Designer.cs b/ServerExplorer/Backup/ServerExplorer/Properties/Settings.Designer.cs deleted file mode 100644 index 626558f..0000000 --- a/ServerExplorer/Backup/ServerExplorer/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3082 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ServerExplorer.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} diff --git a/ServerExplorer/Backup/ServerExplorer/Properties/Settings.settings b/ServerExplorer/Backup/ServerExplorer/Properties/Settings.settings deleted file mode 100644 index 3964565..0000000 --- a/ServerExplorer/Backup/ServerExplorer/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/ServerExplorer/Backup/ServerExplorer/ServerExplorer.csproj b/ServerExplorer/Backup/ServerExplorer/ServerExplorer.csproj deleted file mode 100644 index f764262..0000000 --- a/ServerExplorer/Backup/ServerExplorer/ServerExplorer.csproj +++ /dev/null @@ -1,107 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {79531B74-3062-4A71-9953-5702BEBDEC0E} - WinExe - Properties - ServerExplorer - ServerExplorer - v3.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - - - Form - - - frmBaseDatos.cs - - - Form - - - frmPrincipal.cs - - - Form - - - frmServidores.cs - - - - - frmBaseDatos.cs - - - frmPrincipal.cs - - - frmServidores.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - \ No newline at end of file diff --git a/ServerExplorer/Backup/ServerExplorer/frmBaseDatos.Designer.cs b/ServerExplorer/Backup/ServerExplorer/frmBaseDatos.Designer.cs deleted file mode 100644 index 339782d..0000000 --- a/ServerExplorer/Backup/ServerExplorer/frmBaseDatos.Designer.cs +++ /dev/null @@ -1,182 +0,0 @@ -namespace ServerExplorer -{ - partial class frmBaseDatos - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.txtConString = new System.Windows.Forms.TextBox(); - this.lblConString = new System.Windows.Forms.Label(); - this.btnCopiarConString = new System.Windows.Forms.Button(); - this.lsvTablas = new System.Windows.Forms.ListView(); - this.colNombreTabla = new System.Windows.Forms.ColumnHeader(); - this.colEsquema = new System.Windows.Forms.ColumnHeader(); - this.colTipo = new System.Windows.Forms.ColumnHeader(); - this.lsvColumnas = new System.Windows.Forms.ListView(); - this.colNombreColumna = new System.Windows.Forms.ColumnHeader(); - this.colTipoDatos = new System.Windows.Forms.ColumnHeader(); - this.colTamanho = new System.Windows.Forms.ColumnHeader(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); - this.SuspendLayout(); - // - // txtConString - // - this.txtConString.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtConString.Location = new System.Drawing.Point(123, 12); - this.txtConString.Name = "txtConString"; - this.txtConString.ReadOnly = true; - this.txtConString.Size = new System.Drawing.Size(472, 20); - this.txtConString.TabIndex = 0; - // - // lblConString - // - this.lblConString.AutoSize = true; - this.lblConString.Location = new System.Drawing.Point(12, 15); - this.lblConString.Name = "lblConString"; - this.lblConString.Size = new System.Drawing.Size(105, 13); - this.lblConString.TabIndex = 1; - this.lblConString.Text = "Cadena de conexion"; - // - // btnCopiarConString - // - this.btnCopiarConString.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnCopiarConString.Location = new System.Drawing.Point(601, 10); - this.btnCopiarConString.Name = "btnCopiarConString"; - this.btnCopiarConString.Size = new System.Drawing.Size(52, 23); - this.btnCopiarConString.TabIndex = 3; - this.btnCopiarConString.Text = "Copiar"; - this.btnCopiarConString.UseVisualStyleBackColor = true; - this.btnCopiarConString.Click += new System.EventHandler(this.btnCopiarConString_Click); - // - // lsvTablas - // - this.lsvTablas.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.lsvTablas.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.colNombreTabla, - this.colEsquema, - this.colTipo}); - this.lsvTablas.Location = new System.Drawing.Point(12, 38); - this.lsvTablas.Name = "lsvTablas"; - this.lsvTablas.Size = new System.Drawing.Size(326, 426); - this.lsvTablas.TabIndex = 4; - this.lsvTablas.UseCompatibleStateImageBehavior = false; - this.lsvTablas.View = System.Windows.Forms.View.Details; - this.lsvTablas.SelectedIndexChanged += new System.EventHandler(this.lsvTablas_SelectedIndexChanged); - // - // colNombreTabla - // - this.colNombreTabla.Text = "Tabla"; - this.colNombreTabla.Width = 169; - // - // colEsquema - // - this.colEsquema.Text = "Esquema"; - // - // colTipo - // - this.colTipo.Text = "Tipo"; - this.colTipo.Width = 71; - // - // lsvColumnas - // - this.lsvColumnas.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lsvColumnas.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.colNombreColumna, - this.colTipoDatos, - this.colTamanho}); - this.lsvColumnas.Location = new System.Drawing.Point(344, 38); - this.lsvColumnas.Name = "lsvColumnas"; - this.lsvColumnas.Size = new System.Drawing.Size(309, 262); - this.lsvColumnas.TabIndex = 6; - this.lsvColumnas.UseCompatibleStateImageBehavior = false; - this.lsvColumnas.View = System.Windows.Forms.View.Details; - // - // colNombreColumna - // - this.colNombreColumna.Text = "Columna"; - this.colNombreColumna.Width = 139; - // - // colTipoDatos - // - this.colTipoDatos.Text = "Tipo de Datos"; - this.colTipoDatos.Width = 92; - // - // colTamanho - // - this.colTamanho.Text = "Tamaño"; - // - // dataGridView1 - // - this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(344, 306); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.Size = new System.Drawing.Size(309, 158); - this.dataGridView1.TabIndex = 8; - // - // frmBaseDatos - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(665, 476); - this.Controls.Add(this.dataGridView1); - this.Controls.Add(this.lsvColumnas); - this.Controls.Add(this.lsvTablas); - this.Controls.Add(this.btnCopiarConString); - this.Controls.Add(this.lblConString); - this.Controls.Add(this.txtConString); - this.Name = "frmBaseDatos"; - this.Text = "Base de Datos"; - this.Load += new System.EventHandler(this.frmBaseDatos_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox txtConString; - private System.Windows.Forms.Label lblConString; - private System.Windows.Forms.Button btnCopiarConString; - private System.Windows.Forms.ListView lsvTablas; - private System.Windows.Forms.ColumnHeader colNombreTabla; - private System.Windows.Forms.ColumnHeader colEsquema; - private System.Windows.Forms.ColumnHeader colTipo; - private System.Windows.Forms.ListView lsvColumnas; - private System.Windows.Forms.ColumnHeader colNombreColumna; - private System.Windows.Forms.ColumnHeader colTipoDatos; - private System.Windows.Forms.ColumnHeader colTamanho; - private System.Windows.Forms.DataGridView dataGridView1; - } -} \ No newline at end of file diff --git a/ServerExplorer/Backup/ServerExplorer/frmBaseDatos.cs b/ServerExplorer/Backup/ServerExplorer/frmBaseDatos.cs deleted file mode 100644 index 6de6eec..0000000 --- a/ServerExplorer/Backup/ServerExplorer/frmBaseDatos.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using System.Data.Sql; -using System.Data.SqlClient; - -namespace ServerExplorer -{ - public partial class frmBaseDatos : Form - { - SqlConnection cnx; - - public frmBaseDatos(String ConString) - { - InitializeComponent(); - - // Establecer conexion - txtConString.Text = ConString; - cnx = new SqlConnection(ConString); - } - - private void frmBaseDatos_Load(object sender, EventArgs e) - { - // Obtener lista de tablas - cnx.Open(); - DataTable dt = cnx.GetSchema("Tables"); - cnx.Close(); - - // Mostrar todas las tablas - lsvTablas.Items.Clear(); - foreach (DataRow dr in dt.Rows) - { - ListViewItem item = lsvTablas.Items.Add((String)dr["TABLE_NAME"]); - item.SubItems.Add((String)dr["TABLE_SCHEMA"]); - item.SubItems.Add((String)dr["TABLE_TYPE"]); - } - } - - private void btnCopiarConString_Click(object sender, EventArgs e) - { - // Copiar la cadena de conexion al portapapeles - System.Windows.Forms.Clipboard.SetText(txtConString.Text); - } - - private void lsvTablas_SelectedIndexChanged(object sender, EventArgs e) - { - if (lsvTablas.SelectedItems.Count == 1) - { - DataTable dt; - - // Determinar tabla seleccionada - ListViewItem item = lsvTablas.SelectedItems[0]; - - // Obtener las columnas de la tabla - String[] restr_columna = { null, null, item.SubItems[0].Text, null }; - // NOTA: Catalog, Owner, Table, TableType - cnx.Open(); - dt = cnx.GetSchema("Columns", restr_columna); - cnx.Close(); - - - // Mostrar "columnas" de las tablas - lsvColumnas.Items.Clear(); - foreach (DataRow dr in dt.Rows) - { - ListViewItem subitem = lsvColumnas.Items.Add((String)dr["COLUMN_NAME"]); - subitem.SubItems.Add((String)dr["DATA_TYPE"]); - if (dr["CHARACTER_MAXIMUM_LENGTH"] != DBNull.Value) - { - subitem.SubItems.Add(String.Format("{0}",dr["CHARACTER_MAXIMUM_LENGTH"])); - } - } - - // Obtener las restricciones de la tabla - cnx.Open(); - dt = cnx.GetSchema("Restrictions"); - dt = cnx.GetSchema("ForeignKeys"); - //dt = cnx.GetSchema("Indexes"); - //dt = cnx.GetSchema("IndexColumns"); - //dt = cnx.GetSchema("Constraint"); - cnx.Close(); - - // Mostrar las columnas de la tabla restricciones - dataGridView1.DataSource = dt; - } - } - - } -} diff --git a/ServerExplorer/Backup/ServerExplorer/frmBaseDatos.resx b/ServerExplorer/Backup/ServerExplorer/frmBaseDatos.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/ServerExplorer/Backup/ServerExplorer/frmBaseDatos.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/ServerExplorer/Backup/ServerExplorer/frmPrincipal.Designer.cs b/ServerExplorer/Backup/ServerExplorer/frmPrincipal.Designer.cs deleted file mode 100644 index 64dcfcd..0000000 --- a/ServerExplorer/Backup/ServerExplorer/frmPrincipal.Designer.cs +++ /dev/null @@ -1,114 +0,0 @@ -namespace ServerExplorer -{ - partial class frmPrincipal - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.servidorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.meiBuscarServidor = new System.Windows.Forms.ToolStripMenuItem(); - this.baseDeDatosToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.meiConectarA = new System.Windows.Forms.ToolStripMenuItem(); - this.meiConectarPRUEBAS = new System.Windows.Forms.ToolStripMenuItem(); - this.menuStrip1.SuspendLayout(); - this.SuspendLayout(); - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.servidorToolStripMenuItem, - this.baseDeDatosToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(800, 24); - this.menuStrip1.TabIndex = 4; - this.menuStrip1.Text = "menuPrincipal"; - // - // servidorToolStripMenuItem - // - this.servidorToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.meiBuscarServidor}); - this.servidorToolStripMenuItem.Name = "servidorToolStripMenuItem"; - this.servidorToolStripMenuItem.Size = new System.Drawing.Size(59, 20); - this.servidorToolStripMenuItem.Text = "Servidor"; - // - // meiBuscarServidor - // - this.meiBuscarServidor.Name = "meiBuscarServidor"; - this.meiBuscarServidor.Size = new System.Drawing.Size(160, 22); - this.meiBuscarServidor.Text = "Buscar Servidor"; - this.meiBuscarServidor.Click += new System.EventHandler(this.meiBuscarServidor_Click); - // - // baseDeDatosToolStripMenuItem - // - this.baseDeDatosToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.meiConectarA, - this.meiConectarPRUEBAS}); - this.baseDeDatosToolStripMenuItem.Name = "baseDeDatosToolStripMenuItem"; - this.baseDeDatosToolStripMenuItem.Size = new System.Drawing.Size(88, 20); - this.baseDeDatosToolStripMenuItem.Text = "Base de Datos"; - // - // meiConectarA - // - this.meiConectarA.Name = "meiConectarA"; - this.meiConectarA.Size = new System.Drawing.Size(186, 22); - this.meiConectarA.Text = "Conectar a..."; - // - // meiConectarPRUEBAS - // - this.meiConectarPRUEBAS.Name = "meiConectarPRUEBAS"; - this.meiConectarPRUEBAS.Size = new System.Drawing.Size(186, 22); - this.meiConectarPRUEBAS.Text = "Conectar a PRUEBAS"; - this.meiConectarPRUEBAS.Click += new System.EventHandler(this.meiConectarPRUEBAS_Click); - // - // frmPrincipal - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 601); - this.Controls.Add(this.menuStrip1); - this.IsMdiContainer = true; - this.MainMenuStrip = this.menuStrip1; - this.Name = "frmPrincipal"; - this.Text = "Explorador de Servidores"; - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.MenuStrip menuStrip1; - private System.Windows.Forms.ToolStripMenuItem servidorToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem meiBuscarServidor; - private System.Windows.Forms.ToolStripMenuItem baseDeDatosToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem meiConectarA; - private System.Windows.Forms.ToolStripMenuItem meiConectarPRUEBAS; - } -} \ No newline at end of file diff --git a/ServerExplorer/Backup/ServerExplorer/frmPrincipal.cs b/ServerExplorer/Backup/ServerExplorer/frmPrincipal.cs deleted file mode 100644 index 10c0d72..0000000 --- a/ServerExplorer/Backup/ServerExplorer/frmPrincipal.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; - -namespace ServerExplorer -{ - public partial class frmPrincipal : Form - { - public frmPrincipal() - { - InitializeComponent(); - } - - private void meiConectarPRUEBAS_Click(object sender, EventArgs e) - { - frmBaseDatos frm = new frmBaseDatos("Data Source=SSSRV3;Initial Catalog=PRUEBAS;User ID=sa;Password=SLsssrv3"); - frm.MdiParent = this; - frm.Show(); - } - - private void meiBuscarServidor_Click(object sender, EventArgs e) - { - frmServidores frm = new frmServidores(); - frm.MdiParent = this; - frm.Show(); - } - } -} diff --git a/ServerExplorer/Backup/ServerExplorer/frmPrincipal.resx b/ServerExplorer/Backup/ServerExplorer/frmPrincipal.resx deleted file mode 100644 index 541af56..0000000 --- a/ServerExplorer/Backup/ServerExplorer/frmPrincipal.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/ServerExplorer/Backup/ServerExplorer/frmServidores.Designer.cs b/ServerExplorer/Backup/ServerExplorer/frmServidores.Designer.cs deleted file mode 100644 index 87d487e..0000000 --- a/ServerExplorer/Backup/ServerExplorer/frmServidores.Designer.cs +++ /dev/null @@ -1,216 +0,0 @@ -namespace ServerExplorer -{ - partial class frmServidores - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.lsvServidores = new System.Windows.Forms.ListView(); - this.btnListarServidores = new System.Windows.Forms.Button(); - this.colNombreServidor = new System.Windows.Forms.ColumnHeader(); - this.colInstancia = new System.Windows.Forms.ColumnHeader(); - this.colVersion = new System.Windows.Forms.ColumnHeader(); - this.lblServidor = new System.Windows.Forms.Label(); - this.txtServidor = new System.Windows.Forms.TextBox(); - this.lblUsuario = new System.Windows.Forms.Label(); - this.lblContrasenha = new System.Windows.Forms.Label(); - this.txtUsuario = new System.Windows.Forms.TextBox(); - this.TxtContrasenha = new System.Windows.Forms.TextBox(); - this.btnListarBBDD = new System.Windows.Forms.Button(); - this.lsvBBDD = new System.Windows.Forms.ListView(); - this.colDBName = new System.Windows.Forms.ColumnHeader(); - this.colFechaCreacion = new System.Windows.Forms.ColumnHeader(); - this.SuspendLayout(); - // - // lsvServidores - // - this.lsvServidores.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.lsvServidores.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.colNombreServidor, - this.colInstancia, - this.colVersion}); - this.lsvServidores.Location = new System.Drawing.Point(12, 42); - this.lsvServidores.Name = "lsvServidores"; - this.lsvServidores.Size = new System.Drawing.Size(281, 391); - this.lsvServidores.TabIndex = 1; - this.lsvServidores.UseCompatibleStateImageBehavior = false; - this.lsvServidores.View = System.Windows.Forms.View.Details; - this.lsvServidores.SelectedIndexChanged += new System.EventHandler(this.lsvServidores_SelectedIndexChanged); - // - // btnListarServidores - // - this.btnListarServidores.Location = new System.Drawing.Point(12, 13); - this.btnListarServidores.Name = "btnListarServidores"; - this.btnListarServidores.Size = new System.Drawing.Size(281, 23); - this.btnListarServidores.TabIndex = 2; - this.btnListarServidores.Text = "Listar Servidores"; - this.btnListarServidores.UseVisualStyleBackColor = true; - this.btnListarServidores.Click += new System.EventHandler(this.btnListarServidores_Click); - // - // colNombreServidor - // - this.colNombreServidor.Text = "Servidor"; - this.colNombreServidor.Width = 110; - // - // colInstancia - // - this.colInstancia.Text = "Instancia"; - this.colInstancia.Width = 94; - // - // colVersion - // - this.colVersion.Text = "Version"; - this.colVersion.Width = 73; - // - // lblServidor - // - this.lblServidor.AutoSize = true; - this.lblServidor.Location = new System.Drawing.Point(319, 18); - this.lblServidor.Name = "lblServidor"; - this.lblServidor.Size = new System.Drawing.Size(46, 13); - this.lblServidor.TabIndex = 3; - this.lblServidor.Text = "Servidor"; - // - // txtServidor - // - this.txtServidor.Location = new System.Drawing.Point(429, 15); - this.txtServidor.Name = "txtServidor"; - this.txtServidor.Size = new System.Drawing.Size(180, 20); - this.txtServidor.TabIndex = 4; - // - // lblUsuario - // - this.lblUsuario.AutoSize = true; - this.lblUsuario.Location = new System.Drawing.Point(319, 45); - this.lblUsuario.Name = "lblUsuario"; - this.lblUsuario.Size = new System.Drawing.Size(43, 13); - this.lblUsuario.TabIndex = 5; - this.lblUsuario.Text = "Usuario"; - // - // lblContrasenha - // - this.lblContrasenha.AutoSize = true; - this.lblContrasenha.Location = new System.Drawing.Point(319, 70); - this.lblContrasenha.Name = "lblContrasenha"; - this.lblContrasenha.Size = new System.Drawing.Size(61, 13); - this.lblContrasenha.TabIndex = 6; - this.lblContrasenha.Text = "Contraseña"; - // - // txtUsuario - // - this.txtUsuario.Location = new System.Drawing.Point(429, 42); - this.txtUsuario.Name = "txtUsuario"; - this.txtUsuario.Size = new System.Drawing.Size(180, 20); - this.txtUsuario.TabIndex = 7; - // - // TxtContrasenha - // - this.TxtContrasenha.Location = new System.Drawing.Point(429, 67); - this.TxtContrasenha.Name = "TxtContrasenha"; - this.TxtContrasenha.Size = new System.Drawing.Size(180, 20); - this.TxtContrasenha.TabIndex = 8; - this.TxtContrasenha.UseSystemPasswordChar = true; - // - // btnListarBBDD - // - this.btnListarBBDD.Location = new System.Drawing.Point(322, 93); - this.btnListarBBDD.Name = "btnListarBBDD"; - this.btnListarBBDD.Size = new System.Drawing.Size(287, 23); - this.btnListarBBDD.TabIndex = 9; - this.btnListarBBDD.Text = "Listar BBDD"; - this.btnListarBBDD.UseVisualStyleBackColor = true; - this.btnListarBBDD.Click += new System.EventHandler(this.btnListarBBDD_Click); - // - // lsvBBDD - // - this.lsvBBDD.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.lsvBBDD.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.colDBName, - this.colFechaCreacion}); - this.lsvBBDD.Location = new System.Drawing.Point(322, 122); - this.lsvBBDD.Name = "lsvBBDD"; - this.lsvBBDD.Size = new System.Drawing.Size(287, 311); - this.lsvBBDD.TabIndex = 11; - this.lsvBBDD.UseCompatibleStateImageBehavior = false; - this.lsvBBDD.View = System.Windows.Forms.View.Details; - this.lsvBBDD.DoubleClick += new System.EventHandler(this.lsvBBDD_DoubleClick); - // - // colDBName - // - this.colDBName.Text = "Base de Datos"; - this.colDBName.Width = 165; - // - // colFechaCreacion - // - this.colFechaCreacion.Text = "Fecha de Creacion"; - this.colFechaCreacion.Width = 107; - // - // frmServidores - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(631, 445); - this.Controls.Add(this.lsvBBDD); - this.Controls.Add(this.btnListarBBDD); - this.Controls.Add(this.TxtContrasenha); - this.Controls.Add(this.txtUsuario); - this.Controls.Add(this.lblContrasenha); - this.Controls.Add(this.lblUsuario); - this.Controls.Add(this.txtServidor); - this.Controls.Add(this.lblServidor); - this.Controls.Add(this.btnListarServidores); - this.Controls.Add(this.lsvServidores); - this.Name = "frmServidores"; - this.Text = "Servidores"; - this.Load += new System.EventHandler(this.Form1_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.ListView lsvServidores; - private System.Windows.Forms.Button btnListarServidores; - private System.Windows.Forms.ColumnHeader colNombreServidor; - private System.Windows.Forms.ColumnHeader colInstancia; - private System.Windows.Forms.ColumnHeader colVersion; - private System.Windows.Forms.Label lblServidor; - private System.Windows.Forms.TextBox txtServidor; - private System.Windows.Forms.Label lblUsuario; - private System.Windows.Forms.Label lblContrasenha; - private System.Windows.Forms.TextBox txtUsuario; - private System.Windows.Forms.TextBox TxtContrasenha; - private System.Windows.Forms.Button btnListarBBDD; - private System.Windows.Forms.ListView lsvBBDD; - private System.Windows.Forms.ColumnHeader colDBName; - private System.Windows.Forms.ColumnHeader colFechaCreacion; - - } -} - diff --git a/ServerExplorer/Backup/ServerExplorer/frmServidores.cs b/ServerExplorer/Backup/ServerExplorer/frmServidores.cs deleted file mode 100644 index a9e8493..0000000 --- a/ServerExplorer/Backup/ServerExplorer/frmServidores.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using System.Data.Sql; -using System.Data.SqlClient; -using System.Data.SqlTypes; - -namespace ServerExplorer -{ - public partial class frmServidores : Form - { - public frmServidores() - { - InitializeComponent(); - } - - private void Form1_Load(object sender, EventArgs e) - { - } - - private void btnListarServidores_Click(object sender, EventArgs e) - { - // Obtener listado de servidores - SqlDataSourceEnumerator enumerador = SqlDataSourceEnumerator.Instance; - DataTable servidores = enumerador.GetDataSources(); - lsvServidores.Items.Clear(); - lsvBBDD.Items.Clear(); - foreach (DataRow dr in servidores.Rows) - { - // Nombre del servidor - ListViewItem item = lsvServidores.Items.Add((String)dr["ServerName"]); - - // Nombre de la instancia - if (dr["InstanceName"] == System.DBNull.Value) - { - item.SubItems.Add(""); - } - else - { - item.SubItems.Add((String)dr["InstanceName"]); - } - - // Numero de version - if (dr["Version"] == System.DBNull.Value) - { - item.SubItems.Add("???"); - } - else - { - item.SubItems.Add((String)dr["Version"]); - } - } - } - - private void lsvServidores_SelectedIndexChanged(object sender, EventArgs e) - { - if (lsvServidores.SelectedItems.Count > 0) - { - ListViewItem item = lsvServidores.SelectedItems[0]; - if (item.SubItems[1].Text.CompareTo("")==0) - { - // Servidor sin subinstancias - txtServidor.Text = item.SubItems[0].Text; - } - else - { - // Servidor con subinstancias - txtServidor.Text = item.SubItems[0].Text+"/"+item.SubItems[1].Text; - } - } - } - - private void btnListarBBDD_Click(object sender, EventArgs e) - { - // Construir cadena de conexion - SqlConnectionStringBuilder constructor = new SqlConnectionStringBuilder(); - constructor.DataSource = txtServidor.Text; - constructor.InitialCatalog = "master"; - constructor.UserID = txtUsuario.Text; - constructor.Password = TxtContrasenha.Text; - - // Obtener todas las bases de datos - SqlConnection cnx = new SqlConnection(constructor.ConnectionString); - cnx.Open(); - DataTable dt = cnx.GetSchema("Databases"); - cnx.Close(); - - - // Mostrar bases de datos - lsvBBDD.Items.Clear(); - foreach (DataRow dr in dt.Rows) - { - ListViewItem item = lsvBBDD.Items.Add((String)dr["database_name"]); - item.SubItems.Add(((DateTime)dr["create_date"]).ToShortDateString()); - } - } - - - private void lsvBBDD_DoubleClick(object sender, EventArgs e) - { - if (lsvBBDD.SelectedItems.Count == 1) - { - // Construir cadena de conexion final - SqlConnectionStringBuilder constructor = new SqlConnectionStringBuilder(); - constructor.DataSource = txtServidor.Text; - constructor.InitialCatalog = (String)lsvBBDD.SelectedItems[0].SubItems[0].Text; - constructor.UserID = txtUsuario.Text; - constructor.Password = TxtContrasenha.Text; - - // Llamar a la venta de la base de datos - frmBaseDatos frm = new frmBaseDatos(constructor.ConnectionString); - frm.Show(); - } - } - } -} diff --git a/ServerExplorer/Backup/ServerExplorer/frmServidores.resx b/ServerExplorer/Backup/ServerExplorer/frmServidores.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/ServerExplorer/Backup/ServerExplorer/frmServidores.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/ServerExplorer/ServerExplorer.suo b/ServerExplorer/ServerExplorer.suo index 6e1f1fa..ab4ae6d 100644 Binary files a/ServerExplorer/ServerExplorer.suo and b/ServerExplorer/ServerExplorer.suo differ diff --git a/ServerExplorer/ServerExplorer/CodeGenConfig.cs b/ServerExplorer/ServerExplorer/CodeGenConfig.cs index d873388..080cf2b 100644 --- a/ServerExplorer/ServerExplorer/CodeGenConfig.cs +++ b/ServerExplorer/ServerExplorer/CodeGenConfig.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Xml.Serialization; using System.IO; +using System.Runtime.Serialization; +using System.Xml.Serialization; namespace ServerExplorer { @@ -14,21 +13,41 @@ namespace ServerExplorer public String PathDAL=""; public String PathDTO=""; public String PathExtra=""; - - public List tablas=new List(); + public List Tablas = new List(); + + public CodeGenConfig() + { + // Nada + } public void Guardar(String fichero){ - XmlSerializer seriador = new XmlSerializer(typeof(CodeGenConfig)); + Type[] tipos={typeof(CodeGenTablaInfo)}; + XmlSerializer seriador = new XmlSerializer(typeof(CodeGenConfig), tipos); StreamWriter escritor = new StreamWriter(fichero); seriador.Serialize(escritor, this); } public static CodeGenConfig Cargar(String fichero) { - XmlSerializer seriador = new XmlSerializer(typeof(CodeGenConfig)); + Type[] tipos = { typeof(CodeGenTablaInfo) }; + XmlSerializer seriador = new XmlSerializer(typeof(CodeGenConfig), tipos); StreamReader lector = new StreamReader(fichero); - CodeGenConfig config=(CodeGenConfig)seriador.Deserialize(lector); + CodeGenConfig config = (CodeGenConfig)seriador.Deserialize(lector); return config; } + + } + + public class CodeGenTablaInfo + { + public String Esquema=""; + public String Nombre=""; + + public CodeGenTablaInfo() { } + public CodeGenTablaInfo(String esquema, String nombre) + { + Esquema = esquema; + Nombre = nombre; + } } } diff --git a/ServerExplorer/ServerExplorer/ServerExplorer.csproj b/ServerExplorer/ServerExplorer/ServerExplorer.csproj index 5680ffc..6f575b8 100644 --- a/ServerExplorer/ServerExplorer/ServerExplorer.csproj +++ b/ServerExplorer/ServerExplorer/ServerExplorer.csproj @@ -152,4 +152,4 @@ --> - \ No newline at end of file + diff --git a/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.exe b/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.exe index 94d05e4..1fa4d4a 100644 Binary files a/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.exe and b/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.exe differ diff --git a/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.pdb b/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.pdb index 5a3e489..2c91f7f 100644 Binary files a/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.pdb and b/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.pdb differ diff --git a/ServerExplorer/ServerExplorer/frmBaseDatos.Designer.cs b/ServerExplorer/ServerExplorer/frmBaseDatos.Designer.cs index f5e722b..5037a7b 100644 --- a/ServerExplorer/ServerExplorer/frmBaseDatos.Designer.cs +++ b/ServerExplorer/ServerExplorer/frmBaseDatos.Designer.cs @@ -39,13 +39,12 @@ this.colNombreColumna = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.colTipoDatos = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.colTamanho = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.menuBaseDatos = new System.Windows.Forms.MenuStrip(); this.archivoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuCargar = new System.Windows.Forms.ToolStripMenuItem(); this.menuGuardar = new System.Windows.Forms.ToolStripMenuItem(); this.menuConfiguracion = new System.Windows.Forms.ToolStripMenuItem(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.colClave = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.menuBaseDatos.SuspendLayout(); this.SuspendLayout(); // @@ -56,7 +55,7 @@ this.txtConString.Location = new System.Drawing.Point(123, 33); this.txtConString.Name = "txtConString"; this.txtConString.ReadOnly = true; - this.txtConString.Size = new System.Drawing.Size(472, 20); + this.txtConString.Size = new System.Drawing.Size(507, 20); this.txtConString.TabIndex = 0; // // lblConString @@ -71,7 +70,7 @@ // btnCopiarConString // this.btnCopiarConString.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnCopiarConString.Location = new System.Drawing.Point(601, 31); + this.btnCopiarConString.Location = new System.Drawing.Point(636, 31); this.btnCopiarConString.Name = "btnCopiarConString"; this.btnCopiarConString.Size = new System.Drawing.Size(52, 23); this.btnCopiarConString.TabIndex = 3; @@ -113,16 +112,18 @@ // // lsvColumnas // - this.lsvColumnas.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.lsvColumnas.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lsvColumnas.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.colNombreColumna, this.colTipoDatos, - this.colTamanho}); + this.colTamanho, + this.colClave}); this.lsvColumnas.FullRowSelect = true; this.lsvColumnas.Location = new System.Drawing.Point(344, 59); this.lsvColumnas.Name = "lsvColumnas"; - this.lsvColumnas.Size = new System.Drawing.Size(309, 241); + this.lsvColumnas.Size = new System.Drawing.Size(344, 405); this.lsvColumnas.TabIndex = 6; this.lsvColumnas.UseCompatibleStateImageBehavior = false; this.lsvColumnas.View = System.Windows.Forms.View.Details; @@ -130,28 +131,17 @@ // colNombreColumna // this.colNombreColumna.Text = "Columna"; - this.colNombreColumna.Width = 139; + this.colNombreColumna.Width = 122; // // colTipoDatos // this.colTipoDatos.Text = "Tipo de Datos"; - this.colTipoDatos.Width = 92; + this.colTipoDatos.Width = 81; // // colTamanho // this.colTamanho.Text = "Tamaño"; // - // dataGridView1 - // - this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(344, 306); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.Size = new System.Drawing.Size(309, 158); - this.dataGridView1.TabIndex = 8; - // // menuBaseDatos // this.menuBaseDatos.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -159,7 +149,7 @@ this.menuConfiguracion}); this.menuBaseDatos.Location = new System.Drawing.Point(0, 0); this.menuBaseDatos.Name = "menuBaseDatos"; - this.menuBaseDatos.Size = new System.Drawing.Size(665, 24); + this.menuBaseDatos.Size = new System.Drawing.Size(700, 24); this.menuBaseDatos.TabIndex = 9; this.menuBaseDatos.Text = "menuBaseDatos"; // @@ -193,12 +183,16 @@ this.menuConfiguracion.Text = "Configuracion"; this.menuConfiguracion.Click += new System.EventHandler(this.menuConfiguracion_Click); // + // colClave + // + this.colClave.Text = "Clave"; + this.colClave.Width = 71; + // // frmBaseDatos // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(665, 476); - this.Controls.Add(this.dataGridView1); + this.ClientSize = new System.Drawing.Size(700, 476); this.Controls.Add(this.lsvColumnas); this.Controls.Add(this.lsvTablas); this.Controls.Add(this.btnCopiarConString); @@ -209,7 +203,6 @@ this.Name = "frmBaseDatos"; this.Text = "Base de Datos"; this.Load += new System.EventHandler(this.frmBaseDatos_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); this.menuBaseDatos.ResumeLayout(false); this.menuBaseDatos.PerformLayout(); this.ResumeLayout(false); @@ -230,11 +223,11 @@ private System.Windows.Forms.ColumnHeader colNombreColumna; private System.Windows.Forms.ColumnHeader colTipoDatos; private System.Windows.Forms.ColumnHeader colTamanho; - private System.Windows.Forms.DataGridView dataGridView1; private System.Windows.Forms.MenuStrip menuBaseDatos; private System.Windows.Forms.ToolStripMenuItem archivoToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem menuCargar; private System.Windows.Forms.ToolStripMenuItem menuGuardar; private System.Windows.Forms.ToolStripMenuItem menuConfiguracion; + private System.Windows.Forms.ColumnHeader colClave; } } \ No newline at end of file diff --git a/ServerExplorer/ServerExplorer/frmBaseDatos.cs b/ServerExplorer/ServerExplorer/frmBaseDatos.cs index 875f3f9..644aafa 100644 --- a/ServerExplorer/ServerExplorer/frmBaseDatos.cs +++ b/ServerExplorer/ServerExplorer/frmBaseDatos.cs @@ -45,14 +45,15 @@ namespace ServerExplorer // en el listview a la configuracion private void tablas_delistview() { - config.tablas.Clear(); + config.Tablas.Clear(); foreach (ListViewItem item in lsvTablas.Items) { if (item.Checked) { - config.tablas.Add( - item.SubItems[1].Text+ // Esquema - item.SubItems[0].Text); // Nombre tabla + config.Tablas.Add(new CodeGenTablaInfo( + item.SubItems[1].Text, // Esquema + item.SubItems[0].Text // Nombre tabla + )); } } } @@ -61,10 +62,10 @@ namespace ServerExplorer // en le listview desde la configuracion private void tablas_alistview() { - int i, j,n; + int i,j,n; // Desmarcar todos en caso de no haber ninguna tabla - if (config.tablas.Count == 0) + if (config.Tablas.Count == 0) { foreach (ListViewItem item in lsvTablas.Items) item.Checked = false; @@ -72,7 +73,7 @@ namespace ServerExplorer } // Recorrer items marcando los que estan en la configuracion - n=config.tablas.Count; + n=config.Tablas.Count; i=j=0; foreach (ListViewItem item in lsvTablas.Items) { @@ -81,7 +82,11 @@ namespace ServerExplorer item.SubItems[1].Text + // Esquema item.SubItems[0].Text; // Nombre tabla do{ - if( config.tablas[i].CompareTo(tablename) == 0){ + if( config.Tablas[i].Esquema. + CompareTo(item.SubItems[1].Text) == 0 && + config.Tablas[i].Nombre. + CompareTo(item.SubItems[0].Text) == 0) + { item.Checked=true; break; } @@ -128,18 +133,19 @@ namespace ServerExplorer // Determinar tabla seleccionada ListViewItem item = lsvTablas.SelectedItems[0]; - + /* // Obtener las columnas de la tabla String[] restr_columna = { null, null, item.SubItems[0].Text, null }; // NOTA: Catalog, Owner, Table, TableType cnx.Open(); dt = cnx.GetSchema("Columns", restr_columna); + dt.DefaultView.Sort="ORDINAL_POSITION"; cnx.Close(); // Mostrar "columnas" de las tablas lsvColumnas.Items.Clear(); - foreach (DataRow dr in dt.Rows) + foreach (DataRowView dr in dt.DefaultView) { ListViewItem subitem = lsvColumnas.Items.Add((String)dr["COLUMN_NAME"]); subitem.SubItems.Add((String)dr["DATA_TYPE"]); @@ -148,18 +154,55 @@ namespace ServerExplorer subitem.SubItems.Add(String.Format("{0}",dr["CHARACTER_MAXIMUM_LENGTH"])); } } - - // Obtener las restricciones de la tabla + */ + // Obtener informacion de las columnas de la tabla + SqlDataAdapter da = new SqlDataAdapter( + "select col.COLUMN_NAME as Columna, "+ + " col.DATA_TYPE as Tipo, "+ + " col.CHARACTER_MAXIMUM_LENGTH as Tamanho, "+ + " c.CONSTRAINT_TYPE as TipoClave "+ + " from INFORMATION_SCHEMA.COLUMNS as col "+ + " left join INFORMATION_SCHEMA.KEY_COLUMN_USAGE as k " + + " on col.COLUMN_NAME=k.COLUMN_NAME and "+ + " col.TABLE_NAME=k.TABLE_NAME and "+ + " col.TABLE_SCHEMA=k.TABLE_SCHEMA "+ + " left join INFORMATION_SCHEMA.TABLE_CONSTRAINTS as c "+ + " on k.CONSTRAINT_NAME=c.CONSTRAINT_NAME "+ + " WHERE col.TABLE_NAME=@nombreTabla AND "+ + " col.TABLE_SCHEMA=@nombreEsquema "+ + " order by col.ORDINAL_POSITION", + cnx); + da.SelectCommand.Parameters.AddWithValue("@nombreTabla", item.SubItems[0].Text); + da.SelectCommand.Parameters.AddWithValue("@nombreEsquema",item.SubItems[1].Text); + dt = new DataTable(); cnx.Open(); - dt = cnx.GetSchema("Restrictions"); - dt = cnx.GetSchema("ForeignKeys"); - //dt = cnx.GetSchema("Indexes"); - //dt = cnx.GetSchema("IndexColumns"); - //dt = cnx.GetSchema("Constraint"); + da.Fill(dt); cnx.Close(); - // Mostrar las columnas de la tabla restricciones - dataGridView1.DataSource = dt; + // Mostrar "columnas" de las tablas + lsvColumnas.Items.Clear(); + foreach (DataRow dr in dt.Rows) + { + ListViewItem subitem = lsvColumnas.Items.Add((String)dr["Columna"]); + subitem.SubItems.Add((String)dr["Tipo"]); + if (dr["Tamanho"] != DBNull.Value) + { + subitem.SubItems.Add(String.Format("{0}", dr["Tamanho"])); + } + else + { + subitem.SubItems.Add(""); + } + if (dr["TipoClave"] != DBNull.Value) + { + subitem.SubItems.Add((String)dr["TipoClave"]); + } + else + { + subitem.SubItems.Add(""); + } + } + } } diff --git a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.exe b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.exe index 94d05e4..1fa4d4a 100644 Binary files a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.exe and b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.exe differ diff --git a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.pdb b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.pdb index 5a3e489..2c91f7f 100644 Binary files a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.pdb and b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.pdb differ diff --git a/ServerExplorer/UpgradeLog.XML b/ServerExplorer/UpgradeLog.XML deleted file mode 100644 index ef73bfa..0000000 --- a/ServerExplorer/UpgradeLog.XML +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ServerExplorer/_UpgradeReport_Files/UpgradeReport.css b/ServerExplorer/_UpgradeReport_Files/UpgradeReport.css deleted file mode 100644 index fae98af..0000000 --- a/ServerExplorer/_UpgradeReport_Files/UpgradeReport.css +++ /dev/null @@ -1,207 +0,0 @@ -BODY -{ - BACKGROUND-COLOR: white; - FONT-FAMILY: "Verdana", sans-serif; - FONT-SIZE: 100%; - MARGIN-LEFT: 0px; - MARGIN-TOP: 0px -} -P -{ - FONT-FAMILY: "Verdana", sans-serif; - FONT-SIZE: 70%; - LINE-HEIGHT: 12pt; - MARGIN-BOTTOM: 0px; - MARGIN-LEFT: 10px; - MARGIN-TOP: 10px -} -.note -{ - BACKGROUND-COLOR: #ffffff; - COLOR: #336699; - FONT-FAMILY: "Verdana", sans-serif; - FONT-SIZE: 100%; - MARGIN-BOTTOM: 0px; - MARGIN-LEFT: 0px; - MARGIN-TOP: 0px; - PADDING-RIGHT: 10px -} -.infotable -{ - BACKGROUND-COLOR: #f0f0e0; - BORDER-BOTTOM: #ffffff 0px solid; - BORDER-COLLAPSE: collapse; - BORDER-LEFT: #ffffff 0px solid; - BORDER-RIGHT: #ffffff 0px solid; - BORDER-TOP: #ffffff 0px solid; - FONT-SIZE: 70%; - MARGIN-LEFT: 10px -} -.issuetable -{ - BACKGROUND-COLOR: #ffffe8; - BORDER-COLLAPSE: collapse; - COLOR: #000000; - FONT-SIZE: 100%; - MARGIN-BOTTOM: 10px; - MARGIN-LEFT: 13px; - MARGIN-TOP: 0px -} -.issuetitle -{ - BACKGROUND-COLOR: #ffffff; - BORDER-BOTTOM: #dcdcdc 1px solid; - BORDER-TOP: #dcdcdc 1px; - COLOR: #003366; - FONT-WEIGHT: normal -} -.header -{ - BACKGROUND-COLOR: #cecf9c; - BORDER-BOTTOM: #ffffff 1px solid; - BORDER-LEFT: #ffffff 1px solid; - BORDER-RIGHT: #ffffff 1px solid; - BORDER-TOP: #ffffff 1px solid; - COLOR: #000000; - FONT-WEIGHT: bold -} -.issuehdr -{ - BACKGROUND-COLOR: #E0EBF5; - BORDER-BOTTOM: #dcdcdc 1px solid; - BORDER-TOP: #dcdcdc 1px solid; - COLOR: #000000; - FONT-WEIGHT: normal -} -.issuenone -{ - BACKGROUND-COLOR: #ffffff; - BORDER-BOTTOM: 0px; - BORDER-LEFT: 0px; - BORDER-RIGHT: 0px; - BORDER-TOP: 0px; - COLOR: #000000; - FONT-WEIGHT: normal -} -.content -{ - BACKGROUND-COLOR: #e7e7ce; - BORDER-BOTTOM: #ffffff 1px solid; - BORDER-LEFT: #ffffff 1px solid; - BORDER-RIGHT: #ffffff 1px solid; - BORDER-TOP: #ffffff 1px solid; - PADDING-LEFT: 3px -} -.issuecontent -{ - BACKGROUND-COLOR: #ffffff; - BORDER-BOTTOM: #dcdcdc 1px solid; - BORDER-TOP: #dcdcdc 1px solid; - PADDING-LEFT: 3px -} -A:link -{ - COLOR: #cc6633; - TEXT-DECORATION: underline -} -A:visited -{ - COLOR: #cc6633; -} -A:active -{ - COLOR: #cc6633; -} -A:hover -{ - COLOR: #cc3300; - TEXT-DECORATION: underline -} -H1 -{ - BACKGROUND-COLOR: #003366; - BORDER-BOTTOM: #336699 6px solid; - COLOR: #ffffff; - FONT-SIZE: 130%; - FONT-WEIGHT: normal; - MARGIN: 0em 0em 0em -20px; - PADDING-BOTTOM: 8px; - PADDING-LEFT: 30px; - PADDING-TOP: 16px -} -H2 -{ - COLOR: #000000; - FONT-SIZE: 80%; - FONT-WEIGHT: bold; - MARGIN-BOTTOM: 3px; - MARGIN-LEFT: 10px; - MARGIN-TOP: 20px; - PADDING-LEFT: 0px -} -H3 -{ - COLOR: #000000; - FONT-SIZE: 80%; - FONT-WEIGHT: bold; - MARGIN-BOTTOM: -5px; - MARGIN-LEFT: 10px; - MARGIN-TOP: 20px -} -H4 -{ - COLOR: #000000; - FONT-SIZE: 70%; - FONT-WEIGHT: bold; - MARGIN-BOTTOM: 0px; - MARGIN-TOP: 15px; - PADDING-BOTTOM: 0px -} -UL -{ - COLOR: #000000; - FONT-SIZE: 70%; - LIST-STYLE: square; - MARGIN-BOTTOM: 0pt; - MARGIN-TOP: 0pt -} -OL -{ - COLOR: #000000; - FONT-SIZE: 70%; - LIST-STYLE: square; - MARGIN-BOTTOM: 0pt; - MARGIN-TOP: 0pt -} -LI -{ - LIST-STYLE: square; - MARGIN-LEFT: 0px -} -.expandable -{ - CURSOR: hand -} -.expanded -{ - color: black -} -.collapsed -{ - DISPLAY: none -} -.foot -{ -BACKGROUND-COLOR: #ffffff; -BORDER-BOTTOM: #cecf9c 1px solid; -BORDER-TOP: #cecf9c 2px solid -} -.settings -{ -MARGIN-LEFT: 25PX; -} -.help -{ -TEXT-ALIGN: right; -margin-right: 10px; -} diff --git a/ServerExplorer/_UpgradeReport_Files/UpgradeReport.xslt b/ServerExplorer/_UpgradeReport_Files/UpgradeReport.xslt deleted file mode 100644 index f064951..0000000 --- a/ServerExplorer/_UpgradeReport_Files/UpgradeReport.xslt +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- Solución: - Proyecto: - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - src - - - - - - - - - - - - -
Nombre de archivoEstadoErroresAdvertencias
- javascript:document.images[''].click()src - - - - Convertido - - - - Convertido - -
- - archivos - - - 1 archivo - - - Convertido:
- No convertido: -
-
-
- - - - : - - - - - - - - - Informe de conversión - <xsl:if test="Properties/Property[@Name='LogNumber']"> - <xsl:value-of select="Properties/Property[@Name='LogNumber']/@Value"/> - </xsl:if> - - - - -

Informe de conversión -

- -

- Tiempo de conversión:
-

- - - - - - - - - - - - - - - - - - - - - - - - -

- - - - - -
- Configuración de conversión -

- - -
-
diff --git a/ServerExplorer/_UpgradeReport_Files/UpgradeReport_Minus.gif b/ServerExplorer/_UpgradeReport_Files/UpgradeReport_Minus.gif deleted file mode 100644 index 17751cb..0000000 Binary files a/ServerExplorer/_UpgradeReport_Files/UpgradeReport_Minus.gif and /dev/null differ diff --git a/ServerExplorer/_UpgradeReport_Files/UpgradeReport_Plus.gif b/ServerExplorer/_UpgradeReport_Files/UpgradeReport_Plus.gif deleted file mode 100644 index f6009ca..0000000 Binary files a/ServerExplorer/_UpgradeReport_Files/UpgradeReport_Plus.gif and /dev/null differ diff --git a/ServerExplorer/ssr.exe b/ServerExplorer/ssr.exe new file mode 100644 index 0000000..e341dc7 Binary files /dev/null and b/ServerExplorer/ssr.exe differ