public void Excute() { try { DataSyncConfig config = DataSyncConfig.GetDataSyncConfig(); if (config != null) { DataSyncDirection dataSyncDirection = SenderMenu.Name.Equals(DataSyncMenuNames.DataSyncPageSqlCreateGroupInnerDataInitMenu) ? DataSyncDirection.InnerDataSync : DataSyncDirection.OuterDataSync; string result = triggerOperation.DoDBTriggerOperation(config, dataSyncDirection); TextShowDialog textShowDialog = new TextShowDialog(); textShowDialog.SetText(result); textShowDialog.ShowDialog(); } else { Logger.Warn("未找到数据同步的配置。/DataOperation/DataCaptureConfig.json"); } } catch (Exception ex) { EventBus.Default.Trigger(new NonUIExceptionEventData { UnhandledExceptionEventArgs = new UnhandledExceptionEventArgs(ex, false) }); } }
public static void DoDBTriggerOperationCilck(IocManager iocManager, DataSyncDirection dataSyncDirection, TriggerOperation triggerOperation, ILogger logger) { try { DataSyncConfig config = GetDataSyncConfig(); if (config != null) { string result = triggerOperation.DoDBTriggerOperation(config, dataSyncDirection); TextShowDialog textShowDialog = new TextShowDialog(); textShowDialog.SetText(result); textShowDialog.ShowDialog(); } else { logger.Warn("未找到数据同步的配置。/DataOperation/DataCaptureConfig.json"); } } catch (Exception ex) { EventBus.Default.Trigger(new NonUIExceptionEventData { UnhandledExceptionEventArgs = new UnhandledExceptionEventArgs(ex, false) }); } }