Exemple #1
0
        private void bgwFingerPrint_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            Cursor = Cursors.Default;

            if (e.Result is Exception)
            {
                this.ShowError("Koneksi ke fingerprint gagal!");
                _isFingerprintConnected        = false;
                this.ckeGetFingerPrint.Checked = false;
            }
            else
            {
                if (!e.Result.AsBoolean())
                {
                    this.ShowError("Koneksi ke fingerprint gagal! Data mekanik sekarang diambil dari master mekanik");
                    _isFingerprintConnected        = false;
                    this.ckeGetFingerPrint.Checked = false;
                }
                else
                {
                    _isFingerprintConnected = true;
                    _presenter.UpdateMechanicList(_availableMechanic);
                    ReloadMechanics();
                }
            }
            this.Enabled = true;
        }
Exemple #2
0
 private void bgwFingerPrint_RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
 {
     Cursor = Cursors.Default;
     if (e.Result is Exception)
     {
         this.ShowError("Koneksi ke fingerprint gagal!");
         _isFingerprintConnected = false;
     }
     else
     {
         if (!e.Result.AsBoolean())
         {
             this.ShowError("Koneksi ke fingerprint gagal! Data akan diambil dari database");
             _isFingerprintConnected = false;
         }
         else
         {
             _isFingerprintConnected = true;
             _presenter.UpdateMechanicList(_availableMechanic);
         }
     }
 }