示例#1
0
        public static bool dbDownload()
        {
            #region DESCARGA INFORMACION DE MYSQL
            Log.system.verbose("Iniciando descarga de datos MySql");

            try
            {
                Faultcode.Download();
                Machine.Download();
                PcbInfo.Download();

                Log.system.notify("Faultcodes: " + Faultcode.Total());
                Log.system.notify("Maquinas: " + Machine.Total());
                Log.system.notify("PcbInfo: " + PcbInfo.Total());

                dbDownloadComplete = true;
            }
            catch (Exception ex)
            {
                dbDownloadComplete = false;
                Log.system.error(ex.Message);
            }
            #endregion

            return(dbDownloadComplete);
        }
示例#2
0
        /// <summary>
        /// Verifica si hay cambios en los archivos PCB de AOI
        /// </summary>
        public bool CheckPcbFiles()
        {
            bool complete = false;

            //aoiLog.verbose("CheckPcbFiles() " + aoiConfig.dataProgPath);

            if (UseCredential())
            {
                aoiLog.debug("Verificando cambios en PCB Files");
                try
                {
                    PcbData pcbData = new PcbData(this);
                    bool    reload  = pcbData.VerifyPcbFiles();
                    if (reload)
                    {
                        aoiLog.notify("Actualizando lista de PCB Files en memoria");
                        PcbInfo.Download(aoiConfig.machineNameKey);
                    }
                    aoiLog.debug("Verificacion de PCB Files completa");
                    complete = true;
                }
                catch (Exception ex)
                {
                    aoiLog.stack(ex.Message, this, ex);
                    complete = false;
                }
            }

            aoiReady = complete;
            return(complete);
        }