Commit inicial

This commit is contained in:
2013-10-14 01:03:45 +02:00
parent 6095221df5
commit af72a4decb
62 changed files with 1805 additions and 368 deletions

7
.gitignore vendored Normal file
View File

@@ -0,0 +1,7 @@
*.suo
*.exe
*.dll
*.pdb
*.user
ServerExplorer/obj
ServerExplorer/bin

View File

@@ -1,7 +0,0 @@
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

View File

@@ -1,7 +0,0 @@
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

380
ServerExplorer/CodeGen.cs Normal file
View File

@@ -0,0 +1,380 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Data;
namespace ServerExplorer
{
public class CodeGen
{
private static string FixNombre(string strIn){
return strIn.Replace(' ', '_');
}
public static void GeneraDTO(Config config, TablaDesc t)
{
string nombreObj = FixNombre(t.Esquema) + "_" + FixNombre(t.Nombre);
string nombreFichero = config.PathDTO + "/" + nombreObj + "_DTO.cs";
EscritorCodigo escritor = new EscritorCodigo(nombreFichero);
// Cabecera
escritor.Escribe("using System;");
escritor.Escribe("using System.Data;");
escritor.Escribe("");
escritor.EscribeInd("namespace " + config.NamespaceDTO);
// El objeto de la tabla
escritor.EscribeInd("public partial class " + nombreObj);
foreach (ColumnaDesc c in t.Columnas)
{
string nombre = FixNombre(c.Nombre);
TipoCol tipo = c.GetTipo();
string sTipo = null;
// Determinar el tipo a usar
switch (tipo)
{
case TipoCol.Numerico:
sTipo = "int"; break;
case TipoCol.Texto:
sTipo = "string"; break;
case TipoCol.AproxNumerico:
sTipo = "double"; break;
case TipoCol.Tiempo:
sTipo = "DateTime"; break;
case TipoCol.Booleano:
sTipo = "bool"; break;
case TipoCol.Binario:
sTipo = "byte[]"; break;
}
if (sTipo == null)
{
continue;
}
// El atributo privado para cada columna
escritor.Escribe("private " + sTipo + " _" + nombre + ";");
// La propiedad publica para cada columna
escritor.EscribeInd("public " + sTipo + " " + nombre);
escritor.EscribeInd("get");
escritor.Escribe("return _" + nombre + ";");
escritor.DeInd();
escritor.EscribeInd("set");
escritor.Escribe("_" + nombre + " = value;");
escritor.DeInd();
escritor.DeInd();
escritor.Escribe("");
}
escritor.DeInd();
// El Pie
escritor.DeInd();
// Cerrar ficheros
escritor.Cerrar();
}
private static void GenerarDALParametrosTabla
(TablaDesc t, String varPrm, String varCmd, String varDTO, bool input, EscritorCodigo escritor)
{
foreach (ColumnaDesc c in t.Columnas)
{
string nombre = FixNombre(c.Nombre);
TipoCol tipo = c.GetTipo();
// Establecer el tipo del parametro
switch (tipo)
{
case TipoCol.Numerico:
escritor.Escribe(varPrm + " = new SqlParameter(\"@[" + c.Nombre + "]\",SqlDbType.Int);"); break;
case TipoCol.Texto:
escritor.Escribe(varPrm + " = new SqlParameter(\"@[" + c.Nombre + "]\", " +
"SqlDbType.VarChar, " + c.Tamanho + ");"); break;
case TipoCol.AproxNumerico:
escritor.Escribe(varPrm + " = new SqlParameter(\"@[" + c.Nombre + "]\", SqlDbType.Real);"); break;
case TipoCol.Tiempo:
escritor.Escribe(varPrm + " = new SqlParameter(\"@[" + c.Nombre + "]\", SqlDbType.DateTime);"); break;
case TipoCol.Booleano:
escritor.Escribe(varPrm + " = new SqlParameter(\"@[" + c.Nombre + "]\", SqlDbType.Bit);"); break;
case TipoCol.Binario:
if (c.Tamanho > 0)
{
escritor.Escribe(varPrm + " = new SqlParameter(\"@[" + c.Nombre + "]\", " +
"SqlDbType.VarBinary, " + c.Tamanho + ");");
}
else
{
escritor.Escribe(varPrm + " = new SqlParameter(\"@[" + c.Nombre + "]\", SqlDbType.Binary);");
}
break;
default:
continue;
}
if (input)
{
escritor.Escribe(varPrm + ".Direction = ParameterDirection.Input;");
}
else
{
escritor.Escribe(varPrm + ".Direction = ParameterDirection.Output;");
}
escritor.Escribe(varPrm + ".Value = " + varDTO + "." + nombre + ";");
escritor.Escribe(varCmd + ".Parameters.Add(" + varPrm + ");");
}
escritor.Escribe("");
}
private static void GenerarDALInsert(Config config, TablaDesc t, EscritorCodigo escritor)
{
string nombreObj = FixNombre(t.Esquema) + "_" + FixNombre(t.Nombre);
string strInsert1, strInsert2;
// Cabecera y variables del metodo
escritor.EscribeInd("public bool Insertar(" + nombreObj + " reg)");
escritor.Escribe("SqlCommand cmd;");
escritor.Escribe("SqlParameter prm;");
escritor.Escribe("int nRows;");
escritor.Escribe("");
// Preparacion del comando
strInsert1 = String.Empty;
strInsert2 = String.Empty;
foreach (ColumnaDesc c in t.Columnas)
{
TipoCol tipo = c.GetTipo();
if(tipo==TipoCol.Otro)
continue;
if (strInsert1 == String.Empty)
{
// Primera columna
strInsert1 += "[" + c.Nombre + "]";
strInsert2 += "@[" + c.Nombre + "]";
}
else
{
// Cualquier otra columna
strInsert1 += ", [" + c.Nombre + "]";
strInsert2 += ", @[" + c.Nombre + "]";
}
}
escritor.Escribe("cmd = new SqlCommand(\"INSERT INTO [" + t.Esquema + "].[" + t.Nombre + "] " +
"(" + strInsert1 + ") " +
"VALUES (" + strInsert2 + "\");");
escritor.Escribe("");
// Preparacion de los parametros
GenerarDALParametrosTabla(t, "prm", "cmd", "reg", true, escritor);
// Ejecucion
escritor.Escribe("cnx.Open();");
escritor.Escribe("nRows = cmd.ExecuteNonQuery()");
escritor.Escribe("cnx.Close();");
escritor.Escribe("");
// Pie
escritor.Escribe("return (nRows>0);");
escritor.DeInd();
escritor.Escribe("");
}
private static void GenerarDALActualizar(Config config, TablaDesc t, EscritorCodigo escritor)
{
string nombreObj = FixNombre(t.Esquema) + "_" + FixNombre(t.Nombre);
string strActualizar,strFiltroPrimario;
// Cabecera y variables del metodo
escritor.EscribeInd("public bool Actualizar(" + nombreObj + " reg)");
escritor.Escribe("SqlCommand cmd;");
escritor.Escribe("SqlParameter prm;");
escritor.Escribe("int nRows;");
escritor.Escribe("");
// Preparacion del comando
strActualizar = String.Empty;
foreach (ColumnaDesc c in t.Columnas)
{
TipoCol tipo = c.GetTipo();
if (tipo == TipoCol.Otro)
continue;
if (c.Primaria)
continue;
if (strActualizar != String.Empty)
{
strActualizar += ",";
}
strActualizar += "[" + c.Nombre + "]=@[" + c.Nombre + "]";
}
strFiltroPrimario = String.Empty;
foreach (ColumnaDesc c in t.Columnas)
{
TipoCol tipo = c.GetTipo();
if (!c.Primaria)
continue;
if (strFiltroPrimario != String.Empty)
{
strFiltroPrimario += " AND ";
}
strFiltroPrimario += "[" + c.Nombre + "]=@[" + c.Nombre + "]";
}
escritor.Escribe("cmd = new SqlCommand(\"UPDATE [" + t.Esquema + "].[" + t.Nombre + "] " +
"SET " + strActualizar + " " +
"WHERE " + strFiltroPrimario + "\");");
escritor.Escribe("");
// Preparacion de los parametros
GenerarDALParametrosTabla(t, "prm", "cmd", "reg", true, escritor);
// Ejecucion
escritor.Escribe("cnx.Open();");
escritor.Escribe("nRows = cmd.ExecuteNonQuery();");
escritor.Escribe("cnx.Close();");
escritor.Escribe("");
// Pie
escritor.Escribe("return (nRows>0);");
escritor.DeInd();
escritor.Escribe("");
}
public static void GeneraDAL(Config config, TablaDesc t)
{
string nombreObj = FixNombre(t.Esquema) + "_" + FixNombre(t.Nombre);
string nombreDAL = FixNombre(t.Esquema) + "_" + FixNombre(t.Nombre) + "_DAL";
string nombreFichero = config.PathDTO + "/" + nombreDAL + ".cs";
EscritorCodigo escritor = new EscritorCodigo(nombreFichero);
// Cabecera.
escritor.Escribe("using System;");
escritor.Escribe("using System.Data;");
escritor.Escribe("using System.Data.Sql;");
escritor.Escribe("using System.Data.SqlClient;");
escritor.Escribe("");
escritor.Escribe("using " + config.NamespaceDTO + ";");
escritor.Escribe("");
escritor.EscribeInd("namespace " + config.NamespaceDAL);
// El objeto DAL.
escritor.EscribeInd("public partial class " + nombreDAL);
// Atributos internos
escritor.Escribe("SqlConnexion cnx;");
escritor.Escribe("");
// Constructor
escritor.EscribeInd("public " + nombreDAL + "(SqlConnexion cnx)");
escritor.Escribe("this.cnx = cnx;");
escritor.DeInd();
escritor.Escribe("");
// Metodo Insertar.
GenerarDALInsert(config, t, escritor);
// Metodo Actualizar.
GenerarDALActualizar(config, t, escritor);
// FIXME: Metodo Borrar.
// FIXME: Metodo Leer.
// FIXME: Metodo LeerTodos
// Cerrar objeto DAL.
escritor.DeInd();
// El Pie
escritor.DeInd();
// Cerrar ficheros.
escritor.Cerrar();
}
public static Boolean GenerarCodigo(Config config,DatabaseDesc database)
{
// Asegura la existencia de los directorios destinos
if (!System.IO.Directory.Exists(config.PathRaiz)) { Utiles.CrearDirectorio(config.PathRaiz); }
if (!System.IO.Directory.Exists(config.PathDTO)) { Utiles.CrearDirectorio(config.PathDTO); }
if (!System.IO.Directory.Exists(config.PathDAL)) { Utiles.CrearDirectorio(config.PathDAL); }
if (!System.IO.Directory.Exists(config.PathExtra)) { Utiles.CrearDirectorio(config.PathExtra); }
// Itera por cada tabla para crear sus DTO y DAL
foreach (TablaDesc t in database.Tablas)
{
GeneraDTO(config, t);
GeneraDAL(config, t);
}
return true;
}
private class Indentado
{
private int indentado = 0;
private StringBuilder sb = new StringBuilder();
public void Inc()
{
indentado++;
}
public void Dec()
{
indentado--;
if (indentado < 0)
{
indentado = 0;
}
}
public string Str()
{
sb.Remove(0, sb.Length);
for (int i=0; i < indentado; i++)
{
sb.Append("\t");
}
return sb.ToString();
}
}
private class EscritorCodigo
{
StreamWriter escritor;
Indentado indentado;
public EscritorCodigo(string nombreFichero)
{
escritor = new StreamWriter(nombreFichero);
indentado = new Indentado();
}
public void Cerrar()
{
escritor.Close();
}
public void Escribe(String str)
{
escritor.WriteLine(indentado.Str() + str);
}
public void EscribeInd(String str)
{
escritor.WriteLine(indentado.Str() + str);
escritor.WriteLine(indentado.Str() + "{");
indentado.Inc();
}
public void DeInd()
{
indentado.Dec();
escritor.WriteLine(indentado.Str() + "}");
}
}
}
}

101
ServerExplorer/Config.cs Normal file
View File

@@ -0,0 +1,101 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
namespace ServerExplorer
{
public class Config
{
public String ConString = "";
public String pathRaiz = ".";
public String PathRaiz
{
get { return pathRaiz; }
set { pathRaiz = value; }
}
public String pathDAL=".";
public String PathDAL
{
get
{
if (pathDAL == ".")
{
return pathRaiz;
}
else
{
return pathDAL;
}
}
set { pathDAL = value; }
}
public String pathDTO = ".";
public String PathDTO
{
get {
if (pathDTO == ".")
{
return pathRaiz;
}
else
{
return pathDTO;
}
}
set { pathDTO = value; }
}
public String pathExtra = ".";
public String PathExtra
{
get {
if (pathExtra == ".")
{
return pathRaiz;
}
else
{
return pathExtra;
}
}
set { pathExtra = value; }
}
public String NamespaceDAL = "DAL";
public String NamespaceDTO = "DTO";
public List<TablaInfo> Tablas = new List<TablaInfo>();
public Config() { }
public void Guardar(String fichero)
{
XmlSerializer seriador = new XmlSerializer(typeof(Config));
StreamWriter escritor = new StreamWriter(fichero);
seriador.Serialize(escritor, this);
escritor.Close();
}
public static Config Cargar(String fichero)
{
XmlSerializer seriador = new XmlSerializer(typeof(Config));
StreamReader lector = new StreamReader(fichero);
Config config = (Config)seriador.Deserialize(lector);
lector.Close();
return config;
}
}
public class TablaInfo
{
public String Esquema="";
public String Nombre="";
public TablaInfo() { }
public TablaInfo(String esquema, String nombre)
{
Esquema = esquema;
Nombre = nombre;
}
}
}

56
ServerExplorer/DocGen.cs Normal file
View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace ServerExplorer
{
public class DocGen
{
public static void GenerarDocumentacion(Config config, DatabaseDesc database)
{
// Asegura la existencia de los directorios destinos
if (!System.IO.Directory.Exists(config.PathRaiz)) { Utiles.CrearDirectorio(config.PathRaiz); }
if (!System.IO.Directory.Exists(config.PathDTO)) { Utiles.CrearDirectorio(config.PathDTO); }
if (!System.IO.Directory.Exists(config.PathDAL)) { Utiles.CrearDirectorio(config.PathDAL); }
if (!System.IO.Directory.Exists(config.PathExtra)) { Utiles.CrearDirectorio(config.PathExtra); }
// Abrir el documento que contendra la documentacion
StreamWriter escritor=new StreamWriter(config.PathExtra+"/documentacion.html");
// Poner cabecera de la documentacion
escritor.WriteLine("<html><head><title>" + database.Nombre + "</title></head>");
escritor.WriteLine("<body>");
// Iterar cada tabla
foreach (TablaDesc t in database.Tablas)
{
// Cabecera de la info de tabla
escritor.WriteLine("<h2>"+t.Esquema+"."+t.Nombre+"</h2>");
// Iterar las columnas
escritor.WriteLine("<table>");
escritor.WriteLine("<thead><tr><th>Nombre</th><th>Tipo</th><th>Tama&ntilde;o</th><th>Primaria</th></tr></thead>");
escritor.WriteLine("<tbody>");
foreach (ColumnaDesc c in t.Columnas)
{
escritor.WriteLine("<tr><td>" +
c.Nombre + "</td><td>" +
c.Tipo + "</td><td>" +
c.Tamanho + "</td><td>" +
c.Primaria + "</td></tr>");
}
escritor.WriteLine("</tbody></table>");
}
// Poner pie y cerrar fichero
escritor.WriteLine("</body></html>");
escritor.Close();
}
}
}

View File

@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTitle("ServerExplorer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("cyc")]
[assembly: AssemblyCompany("VAR")]
[assembly: AssemblyProduct("ServerExplorer")]
[assembly: AssemblyCopyright("Copyright © cyc 2012")]
[assembly: AssemblyCopyright("Copyright © VAR 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

View File

@@ -51,6 +51,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -69,8 +70,9 @@
</ItemGroup>
<ItemGroup>
<Compile Include="CodeGen.cs" />
<Compile Include="CodeGenConfig.cs" />
<Compile Include="Config.cs" />
<Compile Include="DatabaseDesc.cs" />
<Compile Include="DocGen.cs" />
<Compile Include="frmBaseDatos.cs">
<SubType>Form</SubType>
</Compile>
@@ -89,12 +91,24 @@
<Compile Include="frmDatos.Designer.cs">
<DependentUpon>frmDatos.cs</DependentUpon>
</Compile>
<Compile Include="frmExec.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmExec.Designer.cs">
<DependentUpon>frmExec.cs</DependentUpon>
</Compile>
<Compile Include="frmPrincipal.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmPrincipal.Designer.cs">
<DependentUpon>frmPrincipal.cs</DependentUpon>
</Compile>
<Compile Include="frmProcedimientos.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmProcedimientos.Designer.cs">
<DependentUpon>frmProcedimientos.cs</DependentUpon>
</Compile>
<Compile Include="frmServidores.cs">
<SubType>Form</SubType>
</Compile>
@@ -114,9 +128,15 @@
<EmbeddedResource Include="frmDatos.resx">
<DependentUpon>frmDatos.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmExec.resx">
<DependentUpon>frmExec.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmPrincipal.resx">
<DependentUpon>frmPrincipal.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmProcedimientos.resx">
<DependentUpon>frmProcedimientos.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmServidores.resx">
<DependentUpon>frmServidores.cs</DependentUpon>
</EmbeddedResource>

Binary file not shown.

View File

@@ -1,120 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace ServerExplorer
{
public class CodeGen
{
public static Boolean GenerarCodigo(CodeGenConfig config,DatabaseDesc database)
{
// Asegura la existencia de los directorios destinos
if (!System.IO.Directory.Exists(config.PathDTO)) { Utiles.CrearDirectorio(config.PathDTO); }
if (!System.IO.Directory.Exists(config.PathDAL)) { Utiles.CrearDirectorio(config.PathDAL); }
if (!System.IO.Directory.Exists(config.PathExtra)) { Utiles.CrearDirectorio(config.PathExtra); }
// Itera por cada tabla para crear sus DTOs
foreach (TablaDesc t in database.Tablas)
{
string nombreObj = t.Esquema + t.Nombre;
string nombreFichero = config.PathDTO + "/" + nombreObj + "_DTO.cs";
EscritorCodigo escritor = new EscritorCodigo(nombreFichero);
// Cabecera.
escritor.Escribe("using System;");
escritor.Escribe("using System.Data;");
escritor.Escribe("");
escritor.EscribeInd("namespace namespace");
// El objeto de la tabla.
escritor.EscribeInd("public partial class " + nombreObj);
foreach(ColumnaDesc c in t.Columnas){
// El atributo privado para cada columna.
escritor.Escribe("private Object " + "_" + c.Nombre + ";");
// La propiedad publica para cada columna.
escritor.EscribeInd("public Object " + c.Nombre );
escritor.EscribeInd("get");
escritor.Escribe("return _" + c.Nombre + ";");
escritor.DeInd();
escritor.EscribeInd("set");
escritor.Escribe("_" + c.Nombre + " = value;");
escritor.DeInd();
escritor.DeInd();
escritor.Escribe("");
}
escritor.DeInd();
// El Pie
escritor.DeInd();
// Cerrar ficheros.
escritor.Cerrar();
}
return true;
}
private class Indentado
{
private int indentado = 0;
private StringBuilder sb = new StringBuilder();
public void Inc()
{
indentado++;
}
public void Dec()
{
indentado--;
if (indentado < 0)
{
indentado = 0;
}
}
public string Str()
{
sb.Remove(0, sb.Length);
for (int i=0; i < indentado; i++)
{
sb.Append("\t");
}
return sb.ToString();
}
}
private class EscritorCodigo
{
StreamWriter escritor;
Indentado indentado;
public EscritorCodigo(string nombreFichero)
{
escritor = new StreamWriter(nombreFichero);
indentado = new Indentado();
}
public void Cerrar()
{
escritor.Close();
}
public void Escribe(String str)
{
escritor.WriteLine(indentado.Str() + str);
}
public void EscribeInd(String str)
{
escritor.WriteLine(indentado.Str() + str);
escritor.WriteLine(indentado.Str() + "{");
indentado.Inc();
}
public void DeInd()
{
indentado.Dec();
escritor.WriteLine(indentado.Str() + "}");
}
}
}
}

View File

@@ -1,49 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
namespace ServerExplorer
{
public class CodeGenConfig
{
public String ConString = "";
public String PathRaiz=".";
public String PathDAL=".";
public String PathDTO=".";
public String PathExtra=".";
public List<CodeGenTablaInfo> Tablas = new List<CodeGenTablaInfo>();
public CodeGenConfig() { }
public void Guardar(String fichero)
{
XmlSerializer seriador = new XmlSerializer(typeof(CodeGenConfig));
StreamWriter escritor = new StreamWriter(fichero);
seriador.Serialize(escritor, this);
}
public static CodeGenConfig Cargar(String fichero)
{
XmlSerializer seriador = new XmlSerializer(typeof(CodeGenConfig));
StreamReader lector = new StreamReader(fichero);
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;
}
}
}

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory />
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>es-ES</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@@ -1,39 +0,0 @@
D:\VAR\ServerExplorer\ServerExplorer\bin\Debug\ServerExplorer.exe
D:\VAR\ServerExplorer\ServerExplorer\bin\Debug\ServerExplorer.pdb
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ResolveAssemblyReference.cache
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.Properties.Resources.resources
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.exe
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.pdb
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmServidores.resources
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmBaseDatos.resources
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmPrincipal.resources
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.exe
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.pdb
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\bin\Debug\ServerExplorer.exe
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\bin\Debug\ServerExplorer.pdb
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ResolveAssemblyReference.cache
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmBaseDatos.resources
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmPrincipal.resources
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmServidores.resources
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.Properties.Resources.resources
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ResGen.read.1.tlog
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ResGen.write.1.tlog
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmCodeGenConfig.resources
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.exe
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.pdb
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\bin\Debug\ServerExplorer.exe
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\bin\Debug\ServerExplorer.pdb
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ResolveAssemblyReference.cache
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmBaseDatos.resources
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmCodeGenConfig.resources
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmPrincipal.resources
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmServidores.resources
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.Properties.Resources.resources
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ResGen.read.1.tlog
C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ResGen.write.1.tlog
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmCodeGenConfig.resources
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\GenerateResource-ResGen.read.1.tlog
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ResGen.read.1.tlog
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\GenerateResource-ResGen.write.1.tlog
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ResGen.write.1.tlog
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmDatos.resources

View File

@@ -101,13 +101,104 @@ namespace ServerExplorer
}
}
public enum TipoCol
{
Unset,
Numerico,
AproxNumerico,
Tiempo,
Texto,
Binario,
Booleano,
Otro
}
public class ColumnaDesc
{
public String Nombre = "";
public String Tipo = "";
public string Nombre = "";
public string Tipo = "";
public int Tamanho = -1;
public bool Primaria = false;
public ColumnaDesc() { }
private TipoCol tipo = TipoCol.Unset;
public TipoCol GetTipo()
{
string stipo=Tipo.ToLower();
if (this.tipo != TipoCol.Unset)
{
return this.tipo;
}
// Numericos
if(
stipo=="bigint" ||
stipo=="int" ||
stipo=="smallint" ||
stipo=="tinyint" ||
stipo=="bigint"
)
{
return TipoCol.Numerico;
}
// Aproximados numericos
if (
stipo == "float" ||
stipo == "real"
)
{
return TipoCol.AproxNumerico;
}
// Tiempo
if (
stipo == "date" ||
stipo == "datetimeoffset" ||
stipo == "datetime2" ||
stipo == "smalldatetime" ||
stipo == "datetime" ||
stipo == "time"
)
{
return TipoCol.Tiempo;
}
// Texto
if (
stipo == "char" ||
stipo == "varchar" ||
stipo == "text" ||
stipo == "nchar" ||
stipo == "nvarchar" ||
stipo == "ntext"
)
{
return TipoCol.Texto;
}
// Binario
if (
stipo == "binary" ||
stipo == "varbinary" ||
stipo == "image"
)
{
return TipoCol.Binario;
}
// Booleano
if (
stipo == "bit"
)
{
return TipoCol.Booleano;
}
// Otro
return TipoCol.Otro;
}
}
}

View File

@@ -15,7 +15,7 @@ namespace ServerExplorer
{
info = new DirectoryInfo(path);
}
catch (Exception ex)
catch (Exception )
{
info = new DirectoryInfo(".");
}

View File

@@ -32,14 +32,14 @@
this.lblConString = new System.Windows.Forms.Label();
this.btnCopiarConString = new System.Windows.Forms.Button();
this.lsvTablas = new System.Windows.Forms.ListView();
this.colNombreTabla = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colEsquema = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colTipo = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
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 = ((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.colClave = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colNombreColumna = new System.Windows.Forms.ColumnHeader();
this.colTipoDatos = new System.Windows.Forms.ColumnHeader();
this.colTamanho = new System.Windows.Forms.ColumnHeader();
this.colClave = new System.Windows.Forms.ColumnHeader();
this.menuBaseDatos = new System.Windows.Forms.MenuStrip();
this.archivoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuCargar = new System.Windows.Forms.ToolStripMenuItem();
@@ -49,7 +49,14 @@
this.btnVerDatos = new System.Windows.Forms.Button();
this.lblTituloTabla = new System.Windows.Forms.Label();
this.lblTituloDB = new System.Windows.Forms.Label();
this.btnDocGen = new System.Windows.Forms.Button();
this.btnProcs = new System.Windows.Forms.Button();
this.btnExec = new System.Windows.Forms.Button();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.menuBaseDatos.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// txtConString
@@ -59,7 +66,7 @@
this.txtConString.Location = new System.Drawing.Point(120, 6);
this.txtConString.Name = "txtConString";
this.txtConString.ReadOnly = true;
this.txtConString.Size = new System.Drawing.Size(510, 20);
this.txtConString.Size = new System.Drawing.Size(616, 20);
this.txtConString.TabIndex = 0;
//
// lblConString
@@ -74,7 +81,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(636, 4);
this.btnCopiarConString.Location = new System.Drawing.Point(742, 4);
this.btnCopiarConString.Name = "btnCopiarConString";
this.btnCopiarConString.Size = new System.Drawing.Size(52, 23);
this.btnCopiarConString.TabIndex = 3;
@@ -84,17 +91,19 @@
//
// 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.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.lsvTablas.CheckBoxes = true;
this.lsvTablas.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colNombreTabla,
this.colEsquema,
this.colTipo});
this.lsvTablas.FullRowSelect = true;
this.lsvTablas.Location = new System.Drawing.Point(12, 70);
this.lsvTablas.Location = new System.Drawing.Point(3, 40);
this.lsvTablas.Name = "lsvTablas";
this.lsvTablas.Size = new System.Drawing.Size(326, 394);
this.lsvTablas.Size = new System.Drawing.Size(332, 468);
this.lsvTablas.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.lsvTablas.TabIndex = 4;
this.lsvTablas.UseCompatibleStateImageBehavior = false;
this.lsvTablas.View = System.Windows.Forms.View.Details;
@@ -125,9 +134,9 @@
this.colTamanho,
this.colClave});
this.lsvColumnas.FullRowSelect = true;
this.lsvColumnas.Location = new System.Drawing.Point(344, 70);
this.lsvColumnas.Location = new System.Drawing.Point(3, 40);
this.lsvColumnas.Name = "lsvColumnas";
this.lsvColumnas.Size = new System.Drawing.Size(344, 365);
this.lsvColumnas.Size = new System.Drawing.Size(458, 439);
this.lsvColumnas.TabIndex = 6;
this.lsvColumnas.UseCompatibleStateImageBehavior = false;
this.lsvColumnas.View = System.Windows.Forms.View.Details;
@@ -157,9 +166,9 @@
this.menuBaseDatos.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.archivoToolStripMenuItem,
this.menuConfiguracion});
this.menuBaseDatos.Location = new System.Drawing.Point(348, 467);
this.menuBaseDatos.Location = new System.Drawing.Point(7, 195);
this.menuBaseDatos.Name = "menuBaseDatos";
this.menuBaseDatos.Size = new System.Drawing.Size(148, 24);
this.menuBaseDatos.Size = new System.Drawing.Size(181, 24);
this.menuBaseDatos.TabIndex = 9;
this.menuBaseDatos.Text = "menuBaseDatos";
this.menuBaseDatos.Visible = false;
@@ -171,20 +180,20 @@
this.menuCargar,
this.menuGuardar});
this.archivoToolStripMenuItem.Name = "archivoToolStripMenuItem";
this.archivoToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
this.archivoToolStripMenuItem.Text = "Archivo";
this.archivoToolStripMenuItem.Size = new System.Drawing.Size(88, 20);
this.archivoToolStripMenuItem.Text = "Base de Datos";
//
// menuCargar
//
this.menuCargar.Name = "menuCargar";
this.menuCargar.Size = new System.Drawing.Size(124, 22);
this.menuCargar.Size = new System.Drawing.Size(152, 22);
this.menuCargar.Text = "Cargar";
this.menuCargar.Click += new System.EventHandler(this.menuCargar_Click);
//
// menuGuardar
//
this.menuGuardar.Name = "menuGuardar";
this.menuGuardar.Size = new System.Drawing.Size(124, 22);
this.menuGuardar.Size = new System.Drawing.Size(152, 22);
this.menuGuardar.Text = "Guardar";
this.menuGuardar.Click += new System.EventHandler(this.menuGuardar_Click);
//
@@ -198,7 +207,7 @@
// btnGenerar
//
this.btnGenerar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnGenerar.Location = new System.Drawing.Point(613, 441);
this.btnGenerar.Location = new System.Drawing.Point(386, 485);
this.btnGenerar.Name = "btnGenerar";
this.btnGenerar.Size = new System.Drawing.Size(75, 23);
this.btnGenerar.TabIndex = 10;
@@ -208,8 +217,8 @@
//
// btnVerDatos
//
this.btnVerDatos.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnVerDatos.Location = new System.Drawing.Point(521, 441);
this.btnVerDatos.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnVerDatos.Location = new System.Drawing.Point(3, 485);
this.btnVerDatos.Name = "btnVerDatos";
this.btnVerDatos.Size = new System.Drawing.Size(75, 23);
this.btnVerDatos.TabIndex = 11;
@@ -224,46 +233,107 @@
this.lblTituloTabla.BackColor = System.Drawing.SystemColors.ControlDarkDark;
this.lblTituloTabla.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblTituloTabla.ForeColor = System.Drawing.SystemColors.ControlLightLight;
this.lblTituloTabla.Location = new System.Drawing.Point(344, 30);
this.lblTituloTabla.Location = new System.Drawing.Point(3, 0);
this.lblTituloTabla.Name = "lblTituloTabla";
this.lblTituloTabla.Size = new System.Drawing.Size(344, 37);
this.lblTituloTabla.Size = new System.Drawing.Size(458, 37);
this.lblTituloTabla.TabIndex = 12;
this.lblTituloTabla.Text = "lblTituloTabla";
this.lblTituloTabla.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblTituloDB
//
this.lblTituloDB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblTituloDB.BackColor = System.Drawing.SystemColors.ControlDarkDark;
this.lblTituloDB.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblTituloDB.ForeColor = System.Drawing.SystemColors.ControlLightLight;
this.lblTituloDB.Location = new System.Drawing.Point(12, 30);
this.lblTituloDB.Location = new System.Drawing.Point(3, 0);
this.lblTituloDB.Name = "lblTituloDB";
this.lblTituloDB.Size = new System.Drawing.Size(326, 37);
this.lblTituloDB.Size = new System.Drawing.Size(332, 37);
this.lblTituloDB.TabIndex = 13;
this.lblTituloDB.Text = "lblTituloDB";
this.lblTituloDB.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnDocGen
//
this.btnDocGen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnDocGen.Location = new System.Drawing.Point(305, 485);
this.btnDocGen.Name = "btnDocGen";
this.btnDocGen.Size = new System.Drawing.Size(75, 23);
this.btnDocGen.TabIndex = 14;
this.btnDocGen.Text = "Doc";
this.btnDocGen.UseVisualStyleBackColor = true;
this.btnDocGen.Click += new System.EventHandler(this.btnDocGen_Click);
//
// btnProcs
//
this.btnProcs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnProcs.Location = new System.Drawing.Point(84, 485);
this.btnProcs.Name = "btnProcs";
this.btnProcs.Size = new System.Drawing.Size(87, 23);
this.btnProcs.TabIndex = 15;
this.btnProcs.Text = "Procedimientos";
this.btnProcs.UseVisualStyleBackColor = true;
this.btnProcs.Click += new System.EventHandler(this.btnProcs_Click);
//
// btnExec
//
this.btnExec.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnExec.Location = new System.Drawing.Point(177, 485);
this.btnExec.Name = "btnExec";
this.btnExec.Size = new System.Drawing.Size(45, 23);
this.btnExec.TabIndex = 16;
this.btnExec.Text = "Exec";
this.btnExec.UseVisualStyleBackColor = true;
this.btnExec.Click += new System.EventHandler(this.btnExec_Click);
//
// splitContainer1
//
this.splitContainer1.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.splitContainer1.Location = new System.Drawing.Point(1, 32);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.lblTituloDB);
this.splitContainer1.Panel1.Controls.Add(this.lsvTablas);
this.splitContainer1.Panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer1_Panel1_Paint);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.lblTituloTabla);
this.splitContainer1.Panel2.Controls.Add(this.btnDocGen);
this.splitContainer1.Panel2.Controls.Add(this.btnExec);
this.splitContainer1.Panel2.Controls.Add(this.lsvColumnas);
this.splitContainer1.Panel2.Controls.Add(this.menuBaseDatos);
this.splitContainer1.Panel2.Controls.Add(this.btnGenerar);
this.splitContainer1.Panel2.Controls.Add(this.btnProcs);
this.splitContainer1.Panel2.Controls.Add(this.btnVerDatos);
this.splitContainer1.Size = new System.Drawing.Size(806, 511);
this.splitContainer1.SplitterDistance = 338;
this.splitContainer1.TabIndex = 17;
//
// frmBaseDatos
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(700, 476);
this.Controls.Add(this.lblTituloDB);
this.Controls.Add(this.lblTituloTabla);
this.Controls.Add(this.btnVerDatos);
this.Controls.Add(this.btnGenerar);
this.Controls.Add(this.lsvColumnas);
this.Controls.Add(this.lsvTablas);
this.ClientSize = new System.Drawing.Size(806, 543);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.btnCopiarConString);
this.Controls.Add(this.lblConString);
this.Controls.Add(this.txtConString);
this.Controls.Add(this.menuBaseDatos);
this.MainMenuStrip = this.menuBaseDatos;
this.Name = "frmBaseDatos";
this.Text = "Base de Datos";
this.Load += new System.EventHandler(this.frmBaseDatos_Load);
this.menuBaseDatos.ResumeLayout(false);
this.menuBaseDatos.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -292,5 +362,9 @@
private System.Windows.Forms.Button btnVerDatos;
private System.Windows.Forms.Label lblTituloTabla;
private System.Windows.Forms.Label lblTituloDB;
private System.Windows.Forms.Button btnDocGen;
private System.Windows.Forms.Button btnProcs;
private System.Windows.Forms.Button btnExec;
private System.Windows.Forms.SplitContainer splitContainer1;
}
}

View File

@@ -9,15 +9,17 @@ using System.Windows.Forms;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Xml.Serialization;
using System.Threading;
namespace ServerExplorer
{
public partial class frmBaseDatos : Form
{
SqlConnection cnx;
CodeGenConfig config;
String table_schema = null;
String table_name = null;
private frmBaseDatos instancia;
private SqlConnection cnx;
private Config config;
private String table_schema = null;
private String table_name = null;
private void inicializar()
{
@@ -53,7 +55,7 @@ namespace ServerExplorer
{
if (item.Checked)
{
config.Tablas.Add(new CodeGenTablaInfo(
config.Tablas.Add(new TablaInfo(
item.SubItems[1].Text, // Esquema
item.SubItems[0].Text // Nombre tabla
));
@@ -103,7 +105,7 @@ namespace ServerExplorer
public DatabaseDesc CrearDatabaseDesc()
{
DatabaseDesc db = new DatabaseDesc(cnx.Database);
foreach (CodeGenTablaInfo t in config.Tablas)
foreach (TablaInfo t in config.Tablas)
{
TablaDesc td = new TablaDesc();
td.FillDesc(t.Esquema, t.Nombre, cnx);
@@ -116,15 +118,16 @@ namespace ServerExplorer
{
InitializeComponent();
config = new CodeGenConfig();
instancia = this;
config = new Config();
config.ConString = ConString;
}
public frmBaseDatos(CodeGenConfig config)
public frmBaseDatos(Config config)
{
InitializeComponent();
instancia = this;
this.config = config;
}
@@ -194,7 +197,7 @@ namespace ServerExplorer
OpenFileDialog dialogo = new OpenFileDialog();
if (dialogo.ShowDialog() == DialogResult.OK)
{
config = CodeGenConfig.Cargar(dialogo.FileName);
config = Config.Cargar(dialogo.FileName);
inicializar();
}
}
@@ -216,16 +219,6 @@ namespace ServerExplorer
frm.ShowDialog();
}
private void btnGenerar_Click(object sender, EventArgs e)
{
tablas_delistview();
DatabaseDesc db = CrearDatabaseDesc();
//XmlSerializer seriador = new XmlSerializer(typeof(DatabaseDesc));
//seriador.Serialize(System.Console.Out, db);
CodeGen.GenerarCodigo(config, db);
}
private void btnVerDatos_Click(object sender, EventArgs e)
{
@@ -235,7 +228,7 @@ namespace ServerExplorer
if (table_schema == null || table_name == null) { return; }
nombreTabla=table_schema+"."+table_name;
nombreTabla="["+table_schema+"].["+table_name+"]";
// Obtener un datatable con todos los registros de la tabla.
da = new SqlDataAdapter(
@@ -253,9 +246,96 @@ namespace ServerExplorer
}
private void btnProcs_Click(object sender, EventArgs e)
{
/*DataTable dt;
SqlDataAdapter da;
// Obtener un datatable con todos los registros de la tabla.
da = new SqlDataAdapter(
"SELECT id,name,crdate FROM sysobjects WHERE type = 'P' AND category = 0 ORDER BY name ",
cnx);
dt = new DataTable();
cnx.Open();
da.Fill(dt);
cnx.Close();
// Crear y mostrar el formulario de los datos.
frmDatos form = new frmDatos(dt, "Procedimientos");
form.MdiParent = this.MdiParent;
form.Show();*/
// Crear y mostrar el formulario de los procedimientos.
frmProcedimientos form = new frmProcedimientos(config.ConString);
form.MdiParent = this.MdiParent;
form.Show();
}
private void btnExec_Click(object sender, EventArgs e)
{
// Crear y mostrar el formulario de exec.
frmExec form = new frmExec(config.ConString);
form.MdiParent = this.MdiParent;
form.Show();
}
private void menuBaseDatos_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
}
private void btnGenerar_Click(object sender, EventArgs e)
{
tablas_delistview();
DatabaseDesc db = CrearDatabaseDesc();
//XmlSerializer seriador = new XmlSerializer(typeof(DatabaseDesc));
//seriador.Serialize(System.Console.Out, db);
CodeGen.GenerarCodigo(config, db);
}
private void btnDocGen_Click(object sender, EventArgs e)
{
// Hacer insensible la ventana
this.Parent.Enabled = false;
// Obtener informacion.
tablas_delistview();
DatabaseDesc db = CrearDatabaseDesc();
// Escribir documentacion
DocGen.GenerarDocumentacion(config, db);
// Hace sensible la ventana
this.Parent.Enabled = true;
/*
tablas_delistview();
Thread hilo=new Thread(new ThreadStart(instancia.GenerarDoc));
hilo.Start();
*/
}
public void GenerarDoc()
{
// Hacer insensible la ventana
this.Enabled = false;
// Obtener informacion.
DatabaseDesc db = CrearDatabaseDesc();
// Escribir documentacion
DocGen.GenerarDocumentacion(config, db);
// Hace sensible la ventana
this.Enabled = true;
}
private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e)
{
}
}
}

View File

@@ -44,6 +44,10 @@
this.lblPathExtra = new System.Windows.Forms.Label();
this.btnCancelar = new System.Windows.Forms.Button();
this.btnAceptar = new System.Windows.Forms.Button();
this.lblNSDAL = new System.Windows.Forms.Label();
this.lblNSDTO = new System.Windows.Forms.Label();
this.txtNSDAL = new System.Windows.Forms.TextBox();
this.txtNSDTO = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// lblConString
@@ -189,7 +193,7 @@
// btnCancelar
//
this.btnCancelar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancelar.Location = new System.Drawing.Point(380, 201);
this.btnCancelar.Location = new System.Drawing.Point(380, 286);
this.btnCancelar.Name = "btnCancelar";
this.btnCancelar.Size = new System.Drawing.Size(75, 23);
this.btnCancelar.TabIndex = 15;
@@ -200,7 +204,7 @@
// btnAceptar
//
this.btnAceptar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnAceptar.Location = new System.Drawing.Point(299, 201);
this.btnAceptar.Location = new System.Drawing.Point(299, 286);
this.btnAceptar.Name = "btnAceptar";
this.btnAceptar.Size = new System.Drawing.Size(75, 23);
this.btnAceptar.TabIndex = 16;
@@ -208,11 +212,51 @@
this.btnAceptar.UseVisualStyleBackColor = true;
this.btnAceptar.Click += new System.EventHandler(this.btnAceptar_Click);
//
// lblNSDAL
//
this.lblNSDAL.AutoSize = true;
this.lblNSDAL.Location = new System.Drawing.Point(12, 169);
this.lblNSDAL.Name = "lblNSDAL";
this.lblNSDAL.Size = new System.Drawing.Size(46, 13);
this.lblNSDAL.TabIndex = 17;
this.lblNSDAL.Text = "NS DAL";
//
// lblNSDTO
//
this.lblNSDTO.AutoSize = true;
this.lblNSDTO.Location = new System.Drawing.Point(12, 195);
this.lblNSDTO.Name = "lblNSDTO";
this.lblNSDTO.Size = new System.Drawing.Size(48, 13);
this.lblNSDTO.TabIndex = 18;
this.lblNSDTO.Text = "NS DTO";
//
// txtNSDAL
//
this.txtNSDAL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtNSDAL.Location = new System.Drawing.Point(125, 166);
this.txtNSDAL.Name = "txtNSDAL";
this.txtNSDAL.Size = new System.Drawing.Size(330, 20);
this.txtNSDAL.TabIndex = 19;
//
// txtNSDTO
//
this.txtNSDTO.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtNSDTO.Location = new System.Drawing.Point(125, 192);
this.txtNSDTO.Name = "txtNSDTO";
this.txtNSDTO.Size = new System.Drawing.Size(330, 20);
this.txtNSDTO.TabIndex = 20;
//
// frmCodeGenConfig
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(467, 236);
this.ClientSize = new System.Drawing.Size(467, 321);
this.Controls.Add(this.txtNSDTO);
this.Controls.Add(this.txtNSDAL);
this.Controls.Add(this.lblNSDTO);
this.Controls.Add(this.lblNSDAL);
this.Controls.Add(this.btnAceptar);
this.Controls.Add(this.btnCancelar);
this.Controls.Add(this.btnPathExtra);
@@ -255,5 +299,9 @@
private System.Windows.Forms.Label lblPathExtra;
private System.Windows.Forms.Button btnCancelar;
private System.Windows.Forms.Button btnAceptar;
private System.Windows.Forms.Label lblNSDAL;
private System.Windows.Forms.Label lblNSDTO;
private System.Windows.Forms.TextBox txtNSDAL;
private System.Windows.Forms.TextBox txtNSDTO;
}
}

View File

@@ -11,9 +11,9 @@ namespace ServerExplorer
{
public partial class frmCodeGenConfig : Form
{
CodeGenConfig config;
Config config;
public frmCodeGenConfig(CodeGenConfig config)
public frmCodeGenConfig(Config config)
{
InitializeComponent();
@@ -27,6 +27,8 @@ namespace ServerExplorer
txtPathDAL.Text = config.PathDAL;
txtPathDTO.Text = config.PathDTO;
txtPathExtra.Text = config.PathExtra;
txtNSDAL.Text = config.NamespaceDAL;
txtNSDTO.Text = config.NamespaceDTO;
}
private void btnPathRaiz_Click(object sender, EventArgs e)
@@ -75,6 +77,8 @@ namespace ServerExplorer
config.PathDAL = txtPathDAL.Text;
config.PathDTO = txtPathDTO.Text;
config.PathExtra = txtPathExtra.Text;
config.NamespaceDAL = txtNSDAL.Text;
config.NamespaceDTO = txtNSDTO.Text;
this.Close();
}

View File

@@ -46,14 +46,15 @@
this.dgvDatos.Name = "dgvDatos";
this.dgvDatos.ReadOnly = true;
this.dgvDatos.RowHeadersVisible = false;
this.dgvDatos.Size = new System.Drawing.Size(326, 282);
this.dgvDatos.Size = new System.Drawing.Size(347, 308);
this.dgvDatos.TabIndex = 0;
this.dgvDatos.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDatos_CellContentClick);
//
// frmDatos
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(350, 306);
this.ClientSize = new System.Drawing.Size(371, 332);
this.Controls.Add(this.dgvDatos);
this.Name = "frmDatos";
this.Text = "frmDatos";

View File

@@ -23,5 +23,10 @@ namespace ServerExplorer
{
}
private void dgvDatos_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}

136
ServerExplorer/frmExec.Designer.cs generated Normal file
View File

@@ -0,0 +1,136 @@
namespace ServerExplorer
{
partial class frmExec
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnExec = new System.Windows.Forms.Button();
this.txtCommand = new System.Windows.Forms.TextBox();
this.dgvDatos = new System.Windows.Forms.DataGridView();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnGenInserts = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dgvDatos)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// btnExec
//
this.btnExec.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnExec.Location = new System.Drawing.Point(532, 66);
this.btnExec.Name = "btnExec";
this.btnExec.Size = new System.Drawing.Size(75, 23);
this.btnExec.TabIndex = 0;
this.btnExec.Text = "Exec";
this.btnExec.UseVisualStyleBackColor = true;
this.btnExec.Click += new System.EventHandler(this.btnExec_Click);
//
// txtCommand
//
this.txtCommand.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.txtCommand.Font = new System.Drawing.Font("Lucida Console", 8.25F);
this.txtCommand.Location = new System.Drawing.Point(3, 3);
this.txtCommand.Multiline = true;
this.txtCommand.Name = "txtCommand";
this.txtCommand.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtCommand.Size = new System.Drawing.Size(604, 57);
this.txtCommand.TabIndex = 1;
//
// dgvDatos
//
this.dgvDatos.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.dgvDatos.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvDatos.Location = new System.Drawing.Point(3, 3);
this.dgvDatos.Name = "dgvDatos";
this.dgvDatos.Size = new System.Drawing.Size(604, 338);
this.dgvDatos.TabIndex = 2;
//
// splitContainer1
//
this.splitContainer1.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.splitContainer1.Location = new System.Drawing.Point(12, 12);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnGenInserts);
this.splitContainer1.Panel1.Controls.Add(this.txtCommand);
this.splitContainer1.Panel1.Controls.Add(this.btnExec);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.dgvDatos);
this.splitContainer1.Size = new System.Drawing.Size(610, 440);
this.splitContainer1.SplitterDistance = 92;
this.splitContainer1.TabIndex = 3;
//
// btnGenInserts
//
this.btnGenInserts.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnGenInserts.Location = new System.Drawing.Point(424, 66);
this.btnGenInserts.Name = "btnGenInserts";
this.btnGenInserts.Size = new System.Drawing.Size(102, 23);
this.btnGenInserts.TabIndex = 2;
this.btnGenInserts.Text = "Genera INSERTs";
this.btnGenInserts.UseVisualStyleBackColor = true;
this.btnGenInserts.Click += new System.EventHandler(this.btnGenInserts_Click);
//
// frmExec
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(634, 464);
this.Controls.Add(this.splitContainer1);
this.Name = "frmExec";
this.Text = "frmExec";
this.Load += new System.EventHandler(this.frmExec_Load);
((System.ComponentModel.ISupportInitialize)(this.dgvDatos)).EndInit();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnExec;
private System.Windows.Forms.TextBox txtCommand;
private System.Windows.Forms.DataGridView dgvDatos;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Button btnGenInserts;
}
}

148
ServerExplorer/frmExec.cs Normal file
View File

@@ -0,0 +1,148 @@
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.SqlClient;
using System.Globalization;
namespace ServerExplorer
{
public partial class frmExec : Form
{
private string cnxString;
public frmExec(string cnxString)
{
InitializeComponent();
this.cnxString = cnxString;
}
private void frmExec_Load(object sender, EventArgs e){
}
private DataTable Exec()
{
SqlConnection cnx;
DataTable dt;
SqlDataAdapter da;
// Establecer conexion
cnx = new SqlConnection(cnxString);
// Obtener resultado en un datatable.
da = new SqlDataAdapter(txtCommand.Text, cnx);
dt = new DataTable();
cnx.Open();
da.Fill(dt);
cnx.Close();
return dt;
}
private void btnExec_Click(object sender, EventArgs e)
{
try
{
// Ejecutar consulta
DataTable dt = Exec();
// Mostrar resultados
dgvDatos.DataSource = dt;
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void btnGenInserts_Click(object sender, EventArgs e)
{
DataTable dt=new DataTable();
DataTable ddt;
string destname = String.Empty;
NumberFormatInfo nfi = new NumberFormatInfo();
// Preparar un conversor de formato numerico que use puntos para los decimales
nfi.NumberDecimalSeparator = ".";
// Obtener el nombre de la tabla destino
destname = Microsoft.VisualBasic.Interaction.InputBox("Nombre de la tabla destino", "tabla destino", String.Empty,
this.Top + (this.Height / 2), this.Left + (this.Width / 2));
try
{
// Ejecutar consulta
dt = Exec();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
// Preparar la datatable destino
ddt=new DataTable();
ddt.Columns.Add("Comando", typeof(String));
// Recorrer la tabla de datos
foreach (DataRow dr in dt.Rows)
{
string strColumns=String.Empty;
string strValues=String.Empty;
foreach (DataColumn dc in dt.Columns)
{
// El nombre de la columna
if (strColumns != String.Empty)
strColumns+=", ";
strColumns += "[" + dc.ColumnName + "]";
// El valor de la columna
if (strValues != String.Empty)
strValues+=", ";
object valor = dr[dc];
if (valor == DBNull.Value)
{
// NULOS
strValues += "NULL";
}else
if (dc.DataType.Name.ToLower() == "string")
{
// Cadenas
strValues += "'" + ((string)valor).Replace("'", "''") + "'";
}
else
if (dc.DataType.Name.ToLower() == "decimal")
{
// Decimales
strValues += ((decimal)valor).ToString(nfi);
}
else
{
// Otros
strValues += valor.ToString();
}
}
// Insertar fila a la datatable destino
ddt.Rows.Add(new object[] {
"INSERT INTO " + destname +
" (" + strColumns + ") "+
"VALUES (" + strValues + ")" });
}
// Establecer el resultado
dgvDatos.DataSource = ddt;
}
}
}

120
ServerExplorer/frmExec.resx Normal file
View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -19,8 +19,8 @@ namespace ServerExplorer
private void menuConectarPRUEBAS_Click(object sender, EventArgs e)
{
// Crear ventana de la base de datos de pruebas
//frmBaseDatos frm = new frmBaseDatos("Data Source=SSSRV3;Initial Catalog=PRUEBAS;User ID=sa;Password=SLsssrv3");
frmBaseDatos frm = new frmBaseDatos("Data Source=DANTE;Initial Catalog=BD_AlfonsoRodriguez;Integrated Security=True");
frmBaseDatos frm = new frmBaseDatos("Data Source=SSSRV3;Initial Catalog=PRUEBAS;User ID=sa;Password=SLsssrv3");
//frmBaseDatos frm = new frmBaseDatos("Data Source=DANTE;Initial Catalog=BD_AlfonsoRodriguez;Integrated Security=True");
//frmBaseDatos frm = new frmBaseDatos("Data Source=OSKURITO;Initial Catalog=BD_AlfonsoRodriguez;Integrated Security=True");
frm.MdiParent = this;
frm.WindowState = FormWindowState.Maximized;
@@ -41,7 +41,7 @@ namespace ServerExplorer
OpenFileDialog dialogo = new OpenFileDialog();
if (dialogo.ShowDialog() == DialogResult.OK)
{
CodeGenConfig config = CodeGenConfig.Cargar(dialogo.FileName);
Config config = Config.Cargar(dialogo.FileName);
// Crear y mostrar ventana
frmBaseDatos frm = new frmBaseDatos(config);

View File

@@ -0,0 +1,138 @@
namespace ServerExplorer
{
partial class frmProcedimientos
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lsvProcs = new System.Windows.Forms.ListView();
this.colNombre = new System.Windows.Forms.ColumnHeader();
this.colFecha = new System.Windows.Forms.ColumnHeader();
this.colTipo = new System.Windows.Forms.ColumnHeader();
this.txtProc = new System.Windows.Forms.TextBox();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// lsvProcs
//
this.lsvProcs.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.lsvProcs.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colNombre,
this.colFecha,
this.colTipo});
this.lsvProcs.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lsvProcs.FullRowSelect = true;
this.lsvProcs.GridLines = true;
this.lsvProcs.Location = new System.Drawing.Point(0, 0);
this.lsvProcs.Name = "lsvProcs";
this.lsvProcs.Size = new System.Drawing.Size(262, 369);
this.lsvProcs.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.lsvProcs.TabIndex = 0;
this.lsvProcs.UseCompatibleStateImageBehavior = false;
this.lsvProcs.View = System.Windows.Forms.View.Details;
this.lsvProcs.SelectedIndexChanged += new System.EventHandler(this.lsvProcs_SelectedIndexChanged);
//
// colNombre
//
this.colNombre.Text = "Nombre";
this.colNombre.Width = 120;
//
// colFecha
//
this.colFecha.Text = "Fecha";
this.colFecha.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.colFecha.Width = 84;
//
// colTipo
//
this.colTipo.Text = "Tipo";
//
// txtProc
//
this.txtProc.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.txtProc.Font = new System.Drawing.Font("Lucida Console", 8.25F);
this.txtProc.Location = new System.Drawing.Point(3, 3);
this.txtProc.Multiline = true;
this.txtProc.Name = "txtProc";
this.txtProc.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txtProc.Size = new System.Drawing.Size(308, 366);
this.txtProc.TabIndex = 1;
//
// splitContainer1
//
this.splitContainer1.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.splitContainer1.Location = new System.Drawing.Point(12, 12);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.lsvProcs);
this.splitContainer1.Panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer1_Panel1_Paint);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.txtProc);
this.splitContainer1.Size = new System.Drawing.Size(583, 372);
this.splitContainer1.SplitterDistance = 265;
this.splitContainer1.TabIndex = 2;
this.splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainer1_SplitterMoved);
//
// frmProcedimientos
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(607, 396);
this.Controls.Add(this.splitContainer1);
this.Name = "frmProcedimientos";
this.Text = "frmProcedimientos";
this.Load += new System.EventHandler(this.frmProcedimientos_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ListView lsvProcs;
private System.Windows.Forms.ColumnHeader colNombre;
private System.Windows.Forms.ColumnHeader colFecha;
private System.Windows.Forms.TextBox txtProc;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.ColumnHeader colTipo;
}
}

View File

@@ -0,0 +1,118 @@
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 frmProcedimientos : Form
{
private string cnxString;
private SqlConnection cnx;
public frmProcedimientos(string cnxString)
{
InitializeComponent();
this.cnxString = cnxString;
}
private void frmProcedimientos_Load(object sender, EventArgs e)
{
DataTable dt;
SqlDataAdapter da;
// Establecer conexion
cnx = new SqlConnection(cnxString);
// Obtener un datatable con todos los procedimientos de la base de datos.
da = new SqlDataAdapter(
"SELECT id,name,crdate,type FROM sysobjects "+
"WHERE (UPPER(type) = 'P' OR UPPER(type) = 'TF' OR UPPER(type) = 'TR' OR UPPER(type) = 'V') AND category = 0 " +
"ORDER BY name ",
cnx);
dt = new DataTable();
cnx.Open();
da.Fill(dt);
cnx.Close();
// Mostrar todos los procedimientos
lsvProcs.Items.Clear();
foreach (DataRow dr in dt.Rows)
{
ListViewItem item = lsvProcs.Items.Add((String)dr["name"]);
item.SubItems.Add(((DateTime)dr["crdate"]).ToShortDateString());
string type = ((string)dr["type"]).ToUpper().Trim();
if (type == "P")
{
item.SubItems.Add("Proc");
}
else if (type == "TF")
{
item.SubItems.Add("Func");
}
else if (type == "TR")
{
item.SubItems.Add("Trigg");
}
else if (type == "V")
{
item.SubItems.Add("View");
}
else
{
item.SubItems.Add("Unk: \"" + (string)dr["type"] + "\"");
}
item.Tag = dr["id"];
}
}
private void lsvProcs_SelectedIndexChanged(object sender, EventArgs e)
{
if (lsvProcs.SelectedItems.Count>0 )
{
DataTable dt;
SqlDataAdapter da;
int id=(int)lsvProcs.SelectedItems[0].Tag;
// Obtener un datatable con el contenido del procedimiento.
da = new SqlDataAdapter(
"SELECT text FROM syscomments WHERE id = @id ORDER BY colid",
cnx);
da.SelectCommand.Parameters.AddWithValue("@id", id);
dt = new DataTable();
cnx.Open();
da.Fill(dt);
cnx.Close();
// Mostrar el contenido del procedimiento
txtProc.Text = String.Empty;
foreach (DataRow dr in dt.Rows)
{
txtProc.Text += ((string)dr[0]).Replace("\r","").Replace("\n","\r\n");
}
}
}
private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e)
{
}
private void splitContainer1_SplitterMoved(object sender, SplitterEventArgs e)
{
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -43,20 +43,25 @@
this.lsvBBDD = new System.Windows.Forms.ListView();
this.colDBName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colFechaCreacion = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
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.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.lsvServidores.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colNombreServidor,
this.colInstancia,
this.colVersion});
this.lsvServidores.FullRowSelect = true;
this.lsvServidores.Location = new System.Drawing.Point(12, 42);
this.lsvServidores.Location = new System.Drawing.Point(3, 32);
this.lsvServidores.Name = "lsvServidores";
this.lsvServidores.Size = new System.Drawing.Size(281, 391);
this.lsvServidores.Size = new System.Drawing.Size(306, 386);
this.lsvServidores.TabIndex = 1;
this.lsvServidores.UseCompatibleStateImageBehavior = false;
this.lsvServidores.View = System.Windows.Forms.View.Details;
@@ -79,9 +84,11 @@
//
// btnListarServidores
//
this.btnListarServidores.Location = new System.Drawing.Point(12, 13);
this.btnListarServidores.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnListarServidores.Location = new System.Drawing.Point(3, 3);
this.btnListarServidores.Name = "btnListarServidores";
this.btnListarServidores.Size = new System.Drawing.Size(281, 23);
this.btnListarServidores.Size = new System.Drawing.Size(306, 23);
this.btnListarServidores.TabIndex = 2;
this.btnListarServidores.Text = "Listar Servidores";
this.btnListarServidores.UseVisualStyleBackColor = true;
@@ -90,7 +97,7 @@
// lblServidor
//
this.lblServidor.AutoSize = true;
this.lblServidor.Location = new System.Drawing.Point(319, 18);
this.lblServidor.Location = new System.Drawing.Point(3, 8);
this.lblServidor.Name = "lblServidor";
this.lblServidor.Size = new System.Drawing.Size(46, 13);
this.lblServidor.TabIndex = 3;
@@ -98,15 +105,17 @@
//
// txtServidor
//
this.txtServidor.Location = new System.Drawing.Point(429, 15);
this.txtServidor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtServidor.Location = new System.Drawing.Point(70, 6);
this.txtServidor.Name = "txtServidor";
this.txtServidor.Size = new System.Drawing.Size(180, 20);
this.txtServidor.Size = new System.Drawing.Size(218, 20);
this.txtServidor.TabIndex = 4;
//
// lblUsuario
//
this.lblUsuario.AutoSize = true;
this.lblUsuario.Location = new System.Drawing.Point(319, 45);
this.lblUsuario.Location = new System.Drawing.Point(3, 35);
this.lblUsuario.Name = "lblUsuario";
this.lblUsuario.Size = new System.Drawing.Size(43, 13);
this.lblUsuario.TabIndex = 5;
@@ -115,7 +124,7 @@
// lblContrasenha
//
this.lblContrasenha.AutoSize = true;
this.lblContrasenha.Location = new System.Drawing.Point(319, 70);
this.lblContrasenha.Location = new System.Drawing.Point(3, 61);
this.lblContrasenha.Name = "lblContrasenha";
this.lblContrasenha.Size = new System.Drawing.Size(61, 13);
this.lblContrasenha.TabIndex = 6;
@@ -123,24 +132,30 @@
//
// txtUsuario
//
this.txtUsuario.Location = new System.Drawing.Point(429, 42);
this.txtUsuario.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtUsuario.Location = new System.Drawing.Point(70, 32);
this.txtUsuario.Name = "txtUsuario";
this.txtUsuario.Size = new System.Drawing.Size(180, 20);
this.txtUsuario.Size = new System.Drawing.Size(218, 20);
this.txtUsuario.TabIndex = 7;
//
// TxtContrasenha
//
this.TxtContrasenha.Location = new System.Drawing.Point(429, 67);
this.TxtContrasenha.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtContrasenha.Location = new System.Drawing.Point(70, 58);
this.TxtContrasenha.Name = "TxtContrasenha";
this.TxtContrasenha.Size = new System.Drawing.Size(180, 20);
this.TxtContrasenha.Size = new System.Drawing.Size(218, 20);
this.TxtContrasenha.TabIndex = 8;
this.TxtContrasenha.UseSystemPasswordChar = true;
//
// btnListarBBDD
//
this.btnListarBBDD.Location = new System.Drawing.Point(322, 93);
this.btnListarBBDD.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnListarBBDD.Location = new System.Drawing.Point(6, 84);
this.btnListarBBDD.Name = "btnListarBBDD";
this.btnListarBBDD.Size = new System.Drawing.Size(287, 23);
this.btnListarBBDD.Size = new System.Drawing.Size(282, 23);
this.btnListarBBDD.TabIndex = 9;
this.btnListarBBDD.Text = "Listar BBDD";
this.btnListarBBDD.UseVisualStyleBackColor = true;
@@ -148,15 +163,16 @@
//
// 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.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.lsvBBDD.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colDBName,
this.colFechaCreacion});
this.lsvBBDD.FullRowSelect = true;
this.lsvBBDD.Location = new System.Drawing.Point(322, 122);
this.lsvBBDD.Location = new System.Drawing.Point(6, 113);
this.lsvBBDD.Name = "lsvBBDD";
this.lsvBBDD.Size = new System.Drawing.Size(287, 311);
this.lsvBBDD.Size = new System.Drawing.Size(282, 305);
this.lsvBBDD.TabIndex = 11;
this.lsvBBDD.UseCompatibleStateImageBehavior = false;
this.lsvBBDD.View = System.Windows.Forms.View.Details;
@@ -172,26 +188,47 @@
this.colFechaCreacion.Text = "Fecha de Creacion";
this.colFechaCreacion.Width = 107;
//
// splitContainer1
//
this.splitContainer1.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.splitContainer1.Location = new System.Drawing.Point(12, 12);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.lsvServidores);
this.splitContainer1.Panel1.Controls.Add(this.btnListarServidores);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.lblServidor);
this.splitContainer1.Panel2.Controls.Add(this.lsvBBDD);
this.splitContainer1.Panel2.Controls.Add(this.txtServidor);
this.splitContainer1.Panel2.Controls.Add(this.btnListarBBDD);
this.splitContainer1.Panel2.Controls.Add(this.lblUsuario);
this.splitContainer1.Panel2.Controls.Add(this.lblContrasenha);
this.splitContainer1.Panel2.Controls.Add(this.TxtContrasenha);
this.splitContainer1.Panel2.Controls.Add(this.txtUsuario);
this.splitContainer1.Size = new System.Drawing.Size(607, 421);
this.splitContainer1.SplitterDistance = 312;
this.splitContainer1.TabIndex = 12;
//
// 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.Controls.Add(this.splitContainer1);
this.Name = "frmServidores";
this.Text = "Servidores";
this.Load += new System.EventHandler(this.Form1_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
@@ -212,6 +249,7 @@
private System.Windows.Forms.ListView lsvBBDD;
private System.Windows.Forms.ColumnHeader colDBName;
private System.Windows.Forms.ColumnHeader colFechaCreacion;
private System.Windows.Forms.SplitContainer splitContainer1;
}
}

Binary file not shown.