HOME
User:
Anonymous
search for
in
Template Archives
Templates
Articles
Users
Login
Username:
Password:
Navigation
Registered User Functions:
Register New Account
Anonymous Functions:
Home
Users
Archives
Templates
Articles
MyGeneration Website
MyGeneration Forums
Categories
Application Type
Command Line
Graphical User Interface
Library
Sample
Web Application
Architecture Type
Client-Server
Distributed Computing
Multi-Tier
Peer-to-peer
Operating System
Linux
Win32
Programming Language
ASP
ASP.Net
C#
C++
Firebird SQL
J#
Java
Jet SQL
JScript
JSP
MySQL
Perl
PHP
PL/SQL
PostgreSQL
SQL
Transact-SQL
VB.Net
VBScript
XSLT
Template: Ajax Auto Complete WebServices using EntitySpaces
Download Count:
1202
View Count:
2211
Template Properties
Unique ID:
0edb6d43-de78-44d0-9876-369f6ef0f857
Title:
Ajax Auto Complete WebServices using EntitySpaces
Namespace:
Samples.DotNetScript
Output Language:
C#
Mode:
Markup
Start Tag:
<%
End Tag:
%>
Template Body
Engine:
.Net Script
Language:
C#
<%#DEBUG%><%#NAMESPACE System.IO %><% /* The MyGeneration(http://www.mygenerationsoftware.com/portal/default.aspx) template is created to work with EntitySpaces http://www.entityspaces.net/portal/Documentation/QuickReference/tabid/87/Default.aspx It generates web services methods for MS ASP.NET AJAX ajaxtoolkit autocomplete control http://ajax.asp.net/ajaxtoolkit/AutoComplete/AutoComplete.aspx For each table it generate separate method for each field and generate distinct values as strings. Non-stringable columns like timestamps are excluded. The UI code was created based on "dOOdads ASP.NET Inline Grid archive" http://www.mygenerationsoftware.com/TemplateLibrary/Archive/?guid=e38b4cdb-a62d-4d3d-9084-a43ff25d9056 TODO:This is a draft version of the template and I beleive that a lot of things are required to do. * Remove unrelated code from UI, that was left from "dOOdads ASP.NET Inline Grid archive" * Create corresponding generator of AJAX autocomplete controls, that will call these web services. They probably should be incorporated into search functionality of EntitySpaces "Admin Grid Template Suite for ASP.NET" http://www.entityspaces.net/portal/Products/ASPNETASPXAdminGridTemplateSuite/tabid/115/Default.aspx * Exclude columns taht do not support DISTINCT (like ntext) * Add ability to specify columns(currently methods are generated for all columns) * Add ability to specify lookup tables and fields for lookup tables (similar to how it is implemented in Admin Grid Template Suite for Edit combo-box) */ public class GeneratedTemplate : DotNetScriptTemplate { public GeneratedTemplate(ZeusContext context) : base(context) {} public override void Render() { System.Diagnostics.Debugger.Launch(); System.Diagnostics.Debugger.Break(); esPlugIn.DnpUtils = DnpUtils; string databaseName = input["DatabaseName"].ToString(); // string tableName = input["tableName"].ToString(); string[] tableNames= BodyHelperUtilities.ParseTables((string)input["Tables"]); IDatabase database = MyMeta.Databases[databaseName]; ITable table ;//= database.Tables[tableName]; foreach(string tv in tableNames) { table = database.Tables[tv]; WebServiceForTable(table); } }//Render public void WebServiceForTable(ITable table) { // create both ASCX and ASCX.CS files string sClassName=table.Alias+"DistinctColumns"; %> /* <%= sClassName %>.asmx The file was generated from Template <%=context.ExecutingTemplate.Title %> (<%=context.ExecutingTemplate.FilePath %> <%=context.ExecutingTemplate.FileName %>) EntitySpaces Version # <%=esPlugIn.esVersion%> MyGeneration Version # <%= input["__version"].ToString() %> Created on <%= DateTime.Now.ToString() %> ------------------------------------------------------------------------------- */ using System; using System.Collections.Generic; using System.Web.Services; using BusinessObjects;//generated by EntitySpaces [WebService(Namespace = "http://tempuri.org/")]<%//TODO parameter from UI or settings %> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.Web.Script.Services.ScriptService] public class <%= sClassName %> : WebService { <% IColumns cols; cols = table.Columns; foreach(IColumn col in cols) { if(!esPlugIn.IsArrayType(col) && !esPlugIn.IsObjectType(col)) {//exclude fields like TimeStams WebMethodForColumn(table,col); } } %> } //end of <%= sClassName %>.asmx.cs class <% SaveAsmxFile(input["OutputPath"].ToString(), sClassName); }//void WebServiceForTable(ITable table) public void WebMethodForColumn(ITable table,IColumn column) { // EntitySpaces.PlugIn.esPluginSource source=new EntitySpaces.PlugIn.esPluginSource(table, null); string sTableName=table.Name; string sEsClassName=esPlugIn.Entity(sTableName);//source);//table.Alias; string sEsColumnName=esPlugIn.PropertyName(column); %> //CompletionList [WebMethod] public string[] <%= sEsColumnName %>GetDistinctValues(string prefixText, int count) { <%= sEsClassName %>Collection collection = new <%= sEsClassName %>Collection(); <%= sEsClassName %>Query query=collection.Query; query.Select( query.<%= sEsColumnName %>); query.es.Distinct= true; query.Where(query.<%= sEsColumnName %>.Like(prefixText+"%")); query.es.Top = count; query.Load(); List<string> items = new List<string>(count); foreach( <%= sEsClassName %> entity in collection) { string sValue=entity.str.<%= sEsColumnName %>; //Assert.StartWith(prefixText) items.Add(sValue); } return items.ToArray(); } <% }// WebMethodForColumn //string sRootPath input["txtPath"].ToString() private void SaveAsmxFile(string sRootPath,string sClassName) { string CodeBehindRelPath=@"App_Code\WebServicesCS\AutoCompletion\"; string AsmxRelPath=@"WebServices\AutoCompletion\"; if (!sRootPath.EndsWith("\\") ) sRootPath += "\\"; Dnp.Utils.Utils DnpUtils= new Utils(); // if(this.UseSingleFile()) string filename = DnpUtils.GetOutputFile(Path.Combine(sRootPath, CodeBehindRelPath), sClassName, ".asmx.cs", false, false); output.save(filename, false); //output.Buffer += output.text; output.clear(); GenerateAsmxFile(CodeBehindRelPath, sClassName); filename = DnpUtils.GetOutputFile(Path.Combine(sRootPath, AsmxRelPath), sClassName, ".asmx", false, false); output.save(filename, false); output.clear(); context.Log.Write("Created " + filename); } //idea from http://www.mygenerationsoftware.com/phpbb2/viewtopic.php?t=1588 string OBAsp = "<" + "%" ; //Open bracket in ASP.NET string CBAsp = "%" + ">"; //Open bracket in ASP.NET void GenerateAsmxFile(string CodeBehindRelPath, string sClassName) { string sRelUrl ="~/" +CodeBehindRelPath; sRelUrl = sRelUrl.Replace('\\', '/'); sRelUrl=Path.Combine(sRelUrl, sClassName+ ".asmx.cs"); %> <%= OBAsp %>@WebService Language="C#" CodeBehind=" <%= sRelUrl %>" Class="<%= sClassName %>" <%= CBAsp %> <% } }// class GeneratedTemplate public class BodyHelperUtilities { //C:\Projects\Samples\ASP.NET\AJAX\AjaxControlToolkit\SampleWebSite\App_Code\AutoComplete.cs public static string[] ParseTables(string sTables) { //TODO ALLOW TO SPECIFY COLUMNS FOR each table return ParseVerticalBarsSeparatorStringToStringArray(sTables); } //function to copy to body of template public static string[] ParseVerticalBarsSeparatorStringToStringArray(string sVBSstring) { //-------------------------------------------------------------- // Populate 'columns' ArrayList // // Column1|Column2|Column3|Column4 //-------------------------------------------------------------- if (sVBSstring.Length == 0) { // output.writeln("YOU MUST SELECT COLUMNS FOR THE GRID"); return null ; } string[] cols = sVBSstring.Split(new char[] { '|' }); return cols; } }//class BodyHelperUtilities %>
Dynamic Interface:
Engine:
.Net Script
Language:
C#
<%#DEBUG%><%#REFERENCE System.Windows.Forms.dll, System.Drawing.dll %> <%#NAMESPACE System.Windows.Forms, System.Drawing %> public class GeneratedGui : DotNetScriptGui { public GeneratedGui(ZeusContext context) : base(context) {} public override void Setup() { MyForm form = new MyForm(MyMeta, input); if (form.ShowDialog() != DialogResult.OK) { ui.IsCanceled = true; } } } public class MyForm : System.Windows.Forms.Form { private IDatabase database; //private Hashtable input = new Hashtable(); private Zeus.IZeusInput input = new ZeusInput(); private System.Windows.Forms.Button btnOkay; private dbRoot myMeta; private System.Windows.Forms.TabControl tab; private System.Windows.Forms.TabPage tabSettings; private System.Windows.Forms.TextBox txtOutputPath; private System.Windows.Forms.Button btnPath; private System.Windows.Forms.CheckedListBox chklistOptions; private System.Windows.Forms.TextBox txtNamespace; private System.Windows.Forms.Label l1; private System.Windows.Forms.Label label1; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Label txtBasePageName; private System.Windows.Forms.ListBox lboxTables; private System.Windows.Forms.Label lblTables; private System.Windows.Forms.FolderBrowserDialog pathFinder; private System.Windows.Forms.TabPage tabSourceDest; private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.ComboBox cboxDatabases; private System.Windows.Forms.Label lblDatabases; private System.Windows.Forms.Label label5; private System.Windows.Forms.TextBox txtDateFormat; private System.Windows.Forms.TextBox txtDecimalFormat; private System.Windows.Forms.Label label6; private System.Windows.Forms.TextBox txtUsing; private System.Windows.Forms.Label label7; /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; public MyForm(dbRoot myMeta) { this.myMeta = myMeta; InitializeComponent(); } public MyForm(dbRoot myMeta, IZeusInput input) { this.myMeta = myMeta; this.input = input; InitializeComponent(); } private void MyForm_Load(object sender, System.EventArgs e) { //TODO record in Project this.txtOutputPath.Text = input["defaultOutputPath"] as string; this.txtOutputPath.Text = @"C:\Projects\MySamples\Asp.Net\CodeGenerators\EntitySpaces\DNNESeLibrary\"; this.cboxDatabases.DataSource = this.myMeta.Databases; this.cboxDatabases.DisplayMember = "Name"; if(this.myMeta.DefaultDatabase != null) { this.database = this.myMeta.DefaultDatabase; this.cboxDatabases.SelectedIndex = this.cboxDatabases.FindStringExact(this.myMeta.DefaultDatabase.Name); } if(this.myMeta.DefaultDatabase != null) { this.lboxTables.DataSource = this.myMeta.DefaultDatabase.Tables; this.lboxTables.DisplayMember = "Name"; } } public void btnOkay_Click(object sender, EventArgs args) { if (cboxDatabases.SelectedIndex < 0) { MessageBox.Show("Please choose a Table"); return; } if (lboxTables.SelectedItems.Count < 0) { MessageBox.Show("Please select at least one Table"); return; } { IDatabase database = this.cboxDatabases.SelectedValue as IDatabase; ITable table = this.lboxTables.SelectedValue as ITable; string columns = ""; string colDelimiter = ""; foreach (object oTable in this.lboxTables.SelectedItems) { table = oTable as ITable; columns += colDelimiter; columns += table.Name; colDelimiter = "|"; } // Store parameters in Zeus so this template will work in project files this.input["DatabaseName"] = database.Name; this.input["Tables"] = columns; this.input["OutputPath"] = this.txtOutputPath.Text; this.input["DateFormat"] = this.txtDateFormat.Text; this.DialogResult = DialogResult.OK; this.Close(); } } private void btnCancel_Click(object sender, System.EventArgs e) { this.DialogResult = DialogResult.Cancel; this.Close(); } /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); } /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.btnOkay = new System.Windows.Forms.Button(); this.tab = new System.Windows.Forms.TabControl(); this.tabSourceDest = new System.Windows.Forms.TabPage(); this.lboxTables = new System.Windows.Forms.ListBox(); this.lblTables = new System.Windows.Forms.Label(); this.tabSettings = new System.Windows.Forms.TabPage(); this.label7 = new System.Windows.Forms.Label(); this.txtUsing = new System.Windows.Forms.TextBox(); this.l1 = new System.Windows.Forms.Label(); this.txtNamespace = new System.Windows.Forms.TextBox(); this.chklistOptions = new System.Windows.Forms.CheckedListBox(); this.btnPath = new System.Windows.Forms.Button(); this.txtOutputPath = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); this.txtBasePageName = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.txtDateFormat = new System.Windows.Forms.TextBox(); this.txtDecimalFormat = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.pathFinder = new System.Windows.Forms.FolderBrowserDialog(); this.btnCancel = new System.Windows.Forms.Button(); this.cboxDatabases = new System.Windows.Forms.ComboBox(); this.lblDatabases = new System.Windows.Forms.Label(); this.tab.SuspendLayout(); this.tabSourceDest.SuspendLayout(); this.tabSettings.SuspendLayout(); this.SuspendLayout(); // // btnOkay // this.btnOkay.Location = new System.Drawing.Point(712, 448); this.btnOkay.Name = "btnOkay"; this.btnOkay.Size = new System.Drawing.Size(80, 23); this.btnOkay.TabIndex = 3; this.btnOkay.Text = "OK"; this.btnOkay.Click += new System.EventHandler(this.btnOkay_Click); // // tab // this.tab.Controls.Add(this.tabSourceDest); this.tab.Controls.Add(this.tabSettings); this.tab.HotTrack = true; this.tab.Location = new System.Drawing.Point(0, 8); this.tab.Name = "tab"; this.tab.SelectedIndex = 0; this.tab.Size = new System.Drawing.Size(792, 424); this.tab.TabIndex = 4; // // tabSourceDest // this.tabSourceDest.Controls.Add(this.lboxTables); this.tabSourceDest.Controls.Add(this.lblTables); this.tabSourceDest.Location = new System.Drawing.Point(4, 22); this.tabSourceDest.Name = "tabSourceDest"; this.tabSourceDest.Size = new System.Drawing.Size(784, 398); this.tabSourceDest.TabIndex = 1; this.tabSourceDest.Text = "Source/Destination"; // // lboxTables // this.lboxTables.Location = new System.Drawing.Point(16, 40); this.lboxTables.Name = "lboxTables"; this.lboxTables.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; this.lboxTables.Size = new System.Drawing.Size(248, 329); this.lboxTables.TabIndex = 6; this.lboxTables.SelectedValueChanged += new System.EventHandler(this.lboxTables_SelectedValueChanged); // // lblTables // this.lblTables.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblTables.Location = new System.Drawing.Point(16, 16); this.lblTables.Name = "lblTables"; this.lblTables.Size = new System.Drawing.Size(200, 23); this.lblTables.TabIndex = 4; this.lblTables.Text = "Source/Destination ( Table )"; // // tabSettings // this.tabSettings.Controls.Add(this.label7); this.tabSettings.Controls.Add(this.txtUsing); this.tabSettings.Controls.Add(this.l1); this.tabSettings.Controls.Add(this.txtNamespace); this.tabSettings.Controls.Add(this.chklistOptions); this.tabSettings.Controls.Add(this.btnPath); this.tabSettings.Controls.Add(this.txtOutputPath); this.tabSettings.Controls.Add(this.label1); this.tabSettings.Controls.Add(this.textBox1); this.tabSettings.Controls.Add(this.txtBasePageName); this.tabSettings.Controls.Add(this.label5); this.tabSettings.Controls.Add(this.txtDateFormat); this.tabSettings.Controls.Add(this.txtDecimalFormat); this.tabSettings.Controls.Add(this.label6); this.tabSettings.Location = new System.Drawing.Point(4, 22); this.tabSettings.Name = "tabSettings"; this.tabSettings.Size = new System.Drawing.Size(784, 398); this.tabSettings.TabIndex = 0; this.tabSettings.Text = "Settings"; // // label7 // this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label7.Location = new System.Drawing.Point(432, 144); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(160, 23); this.label7.TabIndex = 7; this.label7.Text = "Additional \'using\' statements:"; // // txtUsing // this.txtUsing.AcceptsReturn = true; this.txtUsing.Location = new System.Drawing.Point(432, 168); this.txtUsing.Multiline = true; this.txtUsing.Name = "txtUsing"; this.txtUsing.Size = new System.Drawing.Size(328, 112); this.txtUsing.TabIndex = 6; // // l1 // this.l1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.l1.Location = new System.Drawing.Point(24, 40); this.l1.Name = "l1"; this.l1.Size = new System.Drawing.Size(80, 23); this.l1.TabIndex = 5; this.l1.Text = "Output Path:"; // // txtNamespace // this.txtNamespace.Location = new System.Drawing.Point(136, 72); this.txtNamespace.Name = "txtNamespace"; this.txtNamespace.Size = new System.Drawing.Size(272, 20); this.txtNamespace.TabIndex = 4; this.txtNamespace.Text = "Grids"; // // chklistOptions // this.chklistOptions.CheckOnClick = true; this.chklistOptions.Location = new System.Drawing.Point(432, 40); this.chklistOptions.Name = "chklistOptions"; this.chklistOptions.Size = new System.Drawing.Size(328, 94); this.chklistOptions.TabIndex = 3; // // btnPath // this.btnPath.Location = new System.Drawing.Point(368, 40); this.btnPath.Name = "btnPath"; this.btnPath.Size = new System.Drawing.Size(40, 24); this.btnPath.TabIndex = 2; this.btnPath.Text = "..."; this.btnPath.Click += new System.EventHandler(this.btnPath_Click); // // txtOutputPath // this.txtOutputPath.Location = new System.Drawing.Point(136, 40); this.txtOutputPath.Name = "txtOutputPath"; this.txtOutputPath.Size = new System.Drawing.Size(216, 20); this.txtOutputPath.TabIndex = 1; // // label1 // this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.Location = new System.Drawing.Point(24, 72); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 23); this.label1.TabIndex = 5; this.label1.Text = "NameSpace:"; // // textBox1 // this.textBox1.Location = new System.Drawing.Point(136, 104); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(272, 20); this.textBox1.TabIndex = 4; this.textBox1.Text = "BasePage"; // // txtBasePageName // this.txtBasePageName.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtBasePageName.Location = new System.Drawing.Point(24, 104); this.txtBasePageName.Name = "txtBasePageName"; this.txtBasePageName.Size = new System.Drawing.Size(96, 23); this.txtBasePageName.TabIndex = 5; this.txtBasePageName.Text = "BasePage Name:"; // // label5 // this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label5.Location = new System.Drawing.Point(24, 136); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(96, 23); this.label5.TabIndex = 5; this.label5.Text = "Date Format:"; // // txtDateFormat // this.txtDateFormat.Location = new System.Drawing.Point(136, 136); this.txtDateFormat.Name = "txtDateFormat"; this.txtDateFormat.Size = new System.Drawing.Size(272, 20); this.txtDateFormat.TabIndex = 4; this.txtDateFormat.Text = "{0:d}"; // // txtDecimalFormat // this.txtDecimalFormat.Location = new System.Drawing.Point(136, 168); this.txtDecimalFormat.Name = "txtDecimalFormat"; this.txtDecimalFormat.Size = new System.Drawing.Size(272, 20); this.txtDecimalFormat.TabIndex = 4; this.txtDecimalFormat.Text = "{0:0.00}"; // // label6 // this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label6.Location = new System.Drawing.Point(24, 168); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(96, 23); this.label6.TabIndex = 5; this.label6.Text = "Decimal Format:"; // // btnCancel // this.btnCancel.Location = new System.Drawing.Point(624, 448); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(75, 23); this.btnCancel.TabIndex = 6; this.btnCancel.Text = "Cancel"; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // cboxDatabases // this.cboxDatabases.Location = new System.Drawing.Point(144, 448); this.cboxDatabases.Name = "cboxDatabases"; this.cboxDatabases.Size = new System.Drawing.Size(352, 21); this.cboxDatabases.TabIndex = 7; this.cboxDatabases.SelectionChangeCommitted += new System.EventHandler(this.cboxDatabases_SelectionChangeCommitted); // // lblDatabases // this.lblDatabases.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblDatabases.Location = new System.Drawing.Point(16, 448); this.lblDatabases.Name = "lblDatabases"; this.lblDatabases.Size = new System.Drawing.Size(120, 23); this.lblDatabases.TabIndex = 8; this.lblDatabases.Text = "Select a database:"; // // MyForm // this.AcceptButton = this.btnOkay; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.BackColor = System.Drawing.SystemColors.Control; this.ClientSize = new System.Drawing.Size(800, 486); this.Controls.Add(this.lblDatabases); this.Controls.Add(this.cboxDatabases); this.Controls.Add(this.btnCancel); this.Controls.Add(this.tab); this.Controls.Add(this.btnOkay); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.HelpButton = true; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "MyForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "dOOdads Inline Grid (ASP.NET / C#)"; this.Load += new System.EventHandler(this.MyForm_Load); this.tab.ResumeLayout(false); this.tabSourceDest.ResumeLayout(false); this.tabSettings.ResumeLayout(false); this.tabSettings.PerformLayout(); this.ResumeLayout(false); } private void cboxDatabases_SelectionChangeCommitted(object sender, System.EventArgs e) { IDatabase database = this.cboxDatabases.SelectedValue as IDatabase; if(database != null) { this.database = database; this.lboxTables.DataSource = database.Tables; this.lboxTables.DisplayMember = "Name"; } } private void btnPath_Click(object sender, System.EventArgs e) { this.pathFinder.SelectedPath = this.txtOutputPath.Text; if(this.pathFinder.ShowDialog(this) == DialogResult.OK) { this.txtOutputPath.Text = this.pathFinder.SelectedPath; } } private void lboxTables_SelectedValueChanged(object sender, System.EventArgs e) { ITable table = this.lboxTables.SelectedValue as ITable; if(table != null) { //BindColumns(); //BindRelatedColumns(); } } #region Selected Properties private ITable SelectedTable { get { return this.lboxTables.SelectedValue as ITable; } } #endregion }
Copyright © 2004 MyGeneration Software. All rights reserved.
Feedback:
feedback@mygenerationsoftware.com
Support:
support@mygenerationsoftware.com