Example #1
0
        public void Registrations()
        {
            //// Initiate Timer
            //int intTimeout = 10;    // minutes for all registrations
            //if (Debug)
            //    oEventLog.WriteEntry(String.Format("Starting Avamar Registration Thread."), EventLogEntryType.Information);
            //Timeout timeout = new Timeout(TimeoutType.Minutes, intTimeout, oEventLog, Debug);
            //ThreadStart tTimeoutStart = new ThreadStart(timeout.Begin);
            //Thread tTimeout = new Thread(tTimeoutStart);
            //tTimeout.Start();

            try
            {
                this.Starter.Registrations = true;
                AvamarRegistration oAvamarRegistration = new AvamarRegistration(0, dsn);
                oAvamarRegistration.Registrations(EnvironmentID, this.Starter.strScripts, this.Starter.dsnAsset, this.Starter.dsnServiceEditor, this.Starter.dsnIP, this.Starter.intViewPage, this.Starter.intAssignPage);
            }
            catch (Exception ex)
            {
                string error = ex.Message + " ~ (Source: " + ex.Source + ") (Stack Trace: " + ex.StackTrace + ")";
                oEventLog.WriteEntry(error, EventLogEntryType.Error);
            }
            finally
            {
                this.Starter.Registrations = false;
                //timeout.StopIt = true;  // Kill timeout thread.
            }
        }
Example #2
0
        protected void btnRegister_Click(object sender, EventArgs e)
        {
            AvamarRegistration oAvamarAutomation = new AvamarRegistration(0, dsn);
            string             strScripts        = Server.MapPath("/scripts/");

            oAvamarAutomation.Registrations(EnvironmentID, strScripts, dsnAsset, dsnServiceEditor, dsnIP, intViewPage, intAssignPage);
        }