/// <summary> /// 取得程式碼產生物件的實體 /// </summary> private void GetCodeBase() { List <string> keys = new List <string>(); GeneratorOption option; foreach (object key in clbKeys.CheckedItems) { keys.Add(key.ToString()); } option = new GeneratorOption { ConnectionString = paramsEditor1.CurrentConnectionString, TableName = paramsEditor1.CurrentTableName, SchemaKeyName = "IsKeyColumn", KeyColunmNames = keys }; switch (paramsEditor1.CurrentDbType) { default: case "MSSQL": this.m_CodeGenerator = new CodeGeneratorMsSql(option); break; case "Access": this.m_CodeGenerator = new CodeGeneratorAccess(option); break; } }
public void LoadOptions(GeneratorOption option) { this.Length = option.Length; this.SmallLetters = option.SmallLetters; this.CapitalLetters = option.SmallLetters; this.Digits = option.Digits; this.SpecialChars = option.SpecialChars; Generate(); }
private void CreateGenerator() { GeneratorOption option = new GeneratorOption { ConnectionString = paramsEditor1.CurrentConnectionString, TableName = paramsEditor1.CurrentTableName }; switch (paramsEditor1.CurrentDbType) { default: case "MSSQL": this.m_CodeGenerator = new CodeGeneratorMsSql(option); break; case "Access": this.m_CodeGenerator = new CodeGeneratorAccess(option); break; } }
/// <summary> /// 取得程式碼產生物件的實體 /// </summary> protected void GetCodeBase() { string keyName = string.Empty; List <string> keys = new List <string>(); GeneratorOption option; //主索引值的Column Name if (!string.IsNullOrEmpty(txtSchemaKeyName.Text)) { keyName = txtSchemaKeyName.Text; } else { keyName = "IsKey"; } //自定的主索引值 foreach (object key in clbkeys.CheckedItems) { keys.Add(key.ToString()); } option = new GeneratorOption { ConnectionString = paramsEditor1.CurrentConnectionString, TableName = paramsEditor1.CurrentTableName, SchemaKeyName = keyName, KeyColunmNames = keys }; switch (paramsEditor1.CurrentDbType) { default: case "MSSQL": this.m_CodeGenerator = new CodeGeneratorMsSql(option); break; case "Access": this.m_CodeGenerator = new CodeGeneratorAccess(option); break; } }
public CodeGeneratorMsSql(GeneratorOption option) : base(option) { }
public CodeGeneratorAccess(GeneratorOption option) : base(option) { }