private void OK_Click(object sender, RoutedEventArgs e) { //Print label BARCODE.Barcode _barcode = new BARCODE.Barcode(); if (_mysqlManager.GetTestStatusFromTestByTestID(_testid) == "OK") { _barcode.PrintLabel(_component._PN, _component._location, _login, ""); } else { _barcode.PrintLabel(_component._PN, _component._location, _login, "DEF PRT"); } //DeactivateField _dismantledComponentsList.Remove(_component); ListViewAddSource(); //UpdateStock _mysqlManager.UpdateComponentStock(_component._id); //Add log _mysqlManager.InsertComponentLog(_login, _testid, _component._id, "OK"); //Close window if (_dismantledComponentsList.Count == 0) { this.Close(); } }