public Result AlarmClearSystem()
        {
            // Подключение
            Result result = ConnectDb(_dbPath, out DbCore db);

            if (result.Error != ResultEnum.No_Error)
            {
                return(result);
            }
            try
            {
                InpBufferTbl inpTbl = new InpBufferTbl(db);
                OutBuffer    outTbl = new OutBuffer(db);
                while (true)
                {
                    InpProduct product = inpTbl.ExtractFirstItem();
                    if (product == null)
                    {
                        break;
                    }
                    outTbl.AddProduct(DateTime.Now, product.SN, AlarmSystemErrNymber);
                }
                // Очистка таблицы "В работе", необязательная операция
                ClearWorkTable(db);
            }
            catch (Exception e)
            {
                result = new Result(ResultEnum.Err_Data_Moves, e);
            }


            db.Disconnect();
            return(result);
        }
        private void ToOutBuffer(DbCore db, DateTime dtClosed, string SN, int error)
        {
            OutBuffer outBuffer = new OutBuffer(db);

            outBuffer.AddProduct(dtClosed, SN, error);
        }