private void btnAct_Click(object sender, EventArgs e) { if (!DestConnect.FormValidate()) { return; } Migrate.Application.Model.MigrateProfile profile = new Application.Model.MigrateProfile(); profile.SourceConnString = Context.connString; profile.TargetFile = DestConnect.TargetFile; profile.ImpTables = SelectTable.GetSelected().ToList(); Migrate.Application.MigrateService service = new Application.ExportService(profile); service.UpdateProcessAction = Executing.UpdateProcess; service.UpdateMessageAction = Executing.UpdateMessage; service.MigrateFinished += FinishedHandler; this.btnAct.Enabled = false; ShowForm(Executing); Task.Run(() => { service.Start(); }); }
private void btnAct_Click(object sender, EventArgs e) { Migrate.Application.Model.MigrateProfile profile = new Application.Model.MigrateProfile(); profile.SourceConnString = Context.connString; profile.DestConnString = new Domain.Helper.Access.ConnectString() { Host = DestConnect.Host, Instance = DestConnect.Instance, Port = DestConnect.Port, UserId = DestConnect.UserId, Password = DestConnect.Password }; profile.DestTablespace = DestConnect.Tablespace; profile.ImpTables = SelectTable.GetSelected().ToList(); Migrate.Application.MigrateService service = new Application.D2DService(profile); service.UpdateProcessAction = Executing.UpdateProcess; service.UpdateMessageAction = Executing.UpdateMessage; service.MigrateFinished += FinishedHandler; this.btnAct.Enabled = false; ShowForm(Executing); Task.Run(() => { service.Start(); }); }