private async void btnSync_ClickAsync(object sender, EventArgs e) { CL_Dialog.PleaseWait.Show("Data syncing...\r\nPlease Wait", ParentForm); SyncResult result = await DataSync.HandShakeAsync(); if (result.Successful) { var resultSync = await DataSync.RunSyncSystem(DataSync.GetSyncSystemList()); if (resultSync.Successful) { string msg = LoginUser.AddSqlUsers(); if (msg != null) { GuiCommon.ShowMessage(msg); } } GuiCommon.ShowMessage(resultSync.DisplayMessage()); } else { GuiCommon.ShowMessage(result.DisplayMessage()); } CL_Dialog.PleaseWait.Hide(); }
public void SetData() { tableCore.Clear(); _coreSyncList = DataSync.GetSyncCoreList(Company.CurrentId); _coreSyncList.ForEach(x => x.SyncChangeStatus += Core_SyncChangeStatus); _coreSyncList.ForEach(x => { tableCore.Rows.Add( x.SyncInfo.Id, x.SyncInfo.DisplayName, EnumTableSyncStatusText.GetText(x.SyncInfo.Status) ); }); tableLookup.Clear(); _lookupSyncList = DataSync.GetSyncLookupList(Company.CurrentId); _lookupSyncList.ForEach(x => x.SyncChangeStatus += Lookup_SyncChangeStatus); _lookupSyncList.ForEach(x => { tableLookup.Rows.Add( x.SyncInfo.Id, x.SyncInfo.DisplayName, EnumTableSyncStatusText.GetText(x.SyncInfo.Status), x.SyncInfo.DoSync, x ); }); tableSystem.Clear(); _systemSyncList = DataSync.GetSyncSystemList(); _systemSyncList.ForEach(x => x.SyncChangeStatus += System_SyncChangeStatus); _systemSyncList.ForEach(x => { tableSystem.Rows.Add( x.SyncInfo.Id, x.SyncInfo.DisplayName, EnumTableSyncStatusText.GetText(x.SyncInfo.Status), x.SyncInfo.DoSync, x ); }); tabControl.ShowTabHeader = DevExpress.Utils.DefaultBoolean.False; SetupButtons(); }
public void SetData() { tableLookup.Clear(); DataSync.GetSyncLookupList(Company.CurrentId).ForEach(x => { tableLookup.Rows.Add( x.SyncInfo.Id, x.SyncInfo.DisplayName, x.SyncInfo.DoSync ); }); tableSystem.Clear(); DataSync.GetSyncSystemList().ForEach(x => { tableSystem.Rows.Add( x.SyncInfo.Id, x.SyncInfo.DisplayName, x.SyncInfo.DoSync ); }); }