private async void btnSystemStart_ClickAsync(object sender, EventArgs e) { if (!HasInternetConnection()) { return; } CL_Dialog.PleaseWait.Show("Data syncing...\r\nPlease Wait", ParentForm); SyncResult result = await DataSync.HandShakeAsync(); if (result.Successful) { var resultSync = await DataSync.RunSyncSystem(_systemSyncList); if (resultSync.Successful) { string msg = LoginUser.AddSqlUsers(); if (msg != null) { GuiCommon.ShowMessage(msg); } } GuiCommon.ShowMessage(resultSync.DisplayMessage()); AfterSync?.Invoke(); } else { GuiCommon.ShowMessage(result.DisplayMessage()); } CL_Dialog.PleaseWait.Hide(); }
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(); }