コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        private async void btnCoreStart_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.RunSyncCompanyCore(_coreSyncList);

                GuiCommon.ShowMessage(resultSync.DisplayMessage());
                AfterSync?.Invoke();
            }
            else
            {
                GuiCommon.ShowMessage(result.DisplayMessage());
            }
            CL_Dialog.PleaseWait.Hide();
        }