Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        private void OK_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                //Print label
                BARCODE.Barcode _barcode = new BARCODE.Barcode();
                _barcode.PrintLabel(_component._PN, _component._location, _login, "");

                /*
                 * if(_mysqlManager.GetTestStatusFromTestByTestID(_testid) == "OK")
                 * {
                 *  _barcode.PrintLabel(_component._PN, _component._location, _login, "");
                 * }
                 * else
                 * {
                 *  _barcode.PrintLabel(_component._PN, _component._location, _login, "DEF PRT");
                 * }
                 */

                //UpdateStock
                _mysqlManager.UpdateComponentStock(_component._id);

                //Add log
                _mysqlManager.InsertComponentLog(_login, _testid, _component._id, "OK");

                StatusButton _btn;
                foreach (var value in _buttonListManager.GetButtonList())
                {
                    _btn = value.Item1;
                    if (_btn.ID == _id)
                    {
                        _btn.STATUS = "OK";
                    }
                }

                CloseAdobeReaderProcess();
                _browser.Dispose();

                //Close window
                this.Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }