public ImportDatabaseForm( nHydrateModel model, nHydrate.DataImport.Database currentDatabase, Microsoft.VisualStudio.Modeling.Shell.ModelingDocData docData) : this() { _model = model; this.CurrentDatabase = currentDatabase; this.DatabaseConnectionControl1.FileName = Path.Combine((new FileInfo(docData.FileName)).DirectoryName, "importconnection.cache"); tvwAdd.AfterCheck += new TreeViewEventHandler(treeView1_AfterCheck); tvwRefresh.AfterCheck += new TreeViewEventHandler(treeView1_AfterCheck); tvwDelete.AfterCheck += new TreeViewEventHandler(treeView1_AfterCheck); //tvwAdd.AfterSelect += new TreeViewEventHandler(treeView1_AfterSelect); //tvwRefresh.AfterSelect += new TreeViewEventHandler(treeView1_AfterSelect); //tvwDelete.AfterSelect += new TreeViewEventHandler(treeView1_AfterSelect); wizard1.BeforeSwitchPages += new nHydrate.Wizard.Wizard.BeforeSwitchPagesEventHandler(wizard1_BeforeSwitchPages); wizard1.AfterSwitchPages += new nHydrate.Wizard.Wizard.AfterSwitchPagesEventHandler(wizard1_AfterSwitchPages); wizard1.Finish += new EventHandler(wizard1_Finish); wizard1.FinishEnabled = false; chkSettingPK.CheckedChanged += new EventHandler(chkSettingPK_CheckedChanged); cmdTestConnection.Click += new EventHandler(cmdTestConnection_Click); this.Settings = new ImportModelSettings(); this.Settings.OverridePrimaryKey = chkSettingPK.Checked; DatabaseConnectionControl1.LoadSettings(); EnableButtons(); }
public ImportStaticDataForm() { InitializeComponent(); wizard1.BeforeSwitchPages += new nHydrate.Wizard.Wizard.BeforeSwitchPagesEventHandler(wizard1_BeforeSwitchPages); wizard1.AfterSwitchPages += new nHydrate.Wizard.Wizard.AfterSwitchPagesEventHandler(wizard1_AfterSwitchPages); wizard1.Finish += new EventHandler(wizard1_Finish); wizard1.FinishEnabled = false; DatabaseConnectionControl1.LoadSettings(); }
public ImportStaticDataForm(nHydrate.Dsl.Entity entity, Microsoft.VisualStudio.Modeling.Store store, Microsoft.VisualStudio.Modeling.Shell.ModelingDocData docData) : this() { _entity = entity; _store = store; lblWelcome.Text = "This wizard will walk you through the process of import static data from a database entity. The database entity schema must match the target function '" + entity.Name + "' in the modelRoot."; this.DatabaseConnectionControl1.FileName = Path.Combine((new FileInfo(docData.FileName)).DirectoryName, "importconnection.cache"); DatabaseConnectionControl1.LoadSettings(); }
public RefreshItemFromDatabase( nHydrateModel model, nHydrate.Dsl.IDatabaseEntity modelElement, Microsoft.VisualStudio.Modeling.Store store, Microsoft.VisualStudio.Modeling.Shell.ModelingDocData docData) : this() { if (modelElement == null) { throw new Exception("Model element canot be null."); } _model = model; _store = store; _modelElement = modelElement; _importDomain = new nHydrate.DataImport.SqlClient.ImportDomain(); this.DatabaseConnectionControl1.FileName = Path.Combine((new FileInfo(docData.FileName)).DirectoryName, "importconnection.cache"); DatabaseConnectionControl1.LoadSettings(); //Setup new model _auditFields.Add(new SpecialField { Name = _model.CreatedByColumnName, Type = SpecialFieldTypeConstants.CreatedBy }); _auditFields.Add(new SpecialField { Name = _model.CreatedDateColumnName, Type = SpecialFieldTypeConstants.CreatedDate }); _auditFields.Add(new SpecialField { Name = _model.ModifiedByColumnName, Type = SpecialFieldTypeConstants.ModifiedBy }); _auditFields.Add(new SpecialField { Name = _model.ModifiedDateColumnName, Type = SpecialFieldTypeConstants.ModifedDate }); _auditFields.Add(new SpecialField { Name = _model.TimestampColumnName, Type = SpecialFieldTypeConstants.Timestamp }); _auditFields.Add(new SpecialField { Name = _model.TenantColumnName, Type = SpecialFieldTypeConstants.Tenant }); wizard1.FinishEnabled = false; }
public ImportDatabaseForm() { InitializeComponent(); tvwAdd.AfterCheck += new TreeViewEventHandler(treeView1_AfterCheck); wizard1.BeforeSwitchPages += new nHydrate.Wizard.Wizard.BeforeSwitchPagesEventHandler(wizard1_BeforeSwitchPages); wizard1.AfterSwitchPages += new nHydrate.Wizard.Wizard.AfterSwitchPagesEventHandler(wizard1_AfterSwitchPages); wizard1.Finish += new EventHandler(wizard1_Finish); wizard1.FinishEnabled = false; chkSettingPK.CheckedChanged += new EventHandler(chkSettingPK_CheckedChanged); cmdTestConnection.Click += new EventHandler(cmdTestConnection_Click); this.Settings = new ImportModelSettings(); this.Settings.OverridePrimaryKey = chkSettingPK.Checked; this.SelectedTables = new List <string>(); this.SelectedViews = new List <string>(); DatabaseConnectionControl1.LoadSettings(); }
public ConnectStringForm() { InitializeComponent(); DatabaseConnectionControl1.LoadSettings(); }