Esempio n. 1
0
        protected void btnRunModuleStatusUpdate_Click(object sender, System.EventArgs e)
        {
            // Run the module status update job
            BusinessServices.Application objApp = new BusinessServices.Application();
            objApp.RunModuleStatusUpdate(UserContext.UserData.OrgID);

            SetLastRunDate();
        }
Esempio n. 2
0
        // Set the label showing the sql server agent running status
        private void SetSqlAgentRunningStatus()
        {
            string strSqlAgentRunningStatus = "";

            BusinessServices.Application objApp = new BusinessServices.Application();
            try
            {
                strSqlAgentRunningStatus = objApp.GetSqlAgentRunningStatus().ToString();
            }
            catch (DatabaseException)
            {
                strSqlAgentRunningStatus = ResourceManager.GetString("strSqlAgentRunningStatus");//"This feature is not currently enabled. <br />To enable this feature EXECUTE permission must be enabled on object 'xp_servicecontrol'<br/>in database 'master' for the website database user<br />If you require this feature please contact your database administrator";
            }
            this.lblSqlAgentRunningStatus.Text = strSqlAgentRunningStatus;
        }
Esempio n. 3
0
        // Set the label showing when the module status update job was last run
        private void SetLastRunDate()
        {
            string strDateTimeUpdateLastRun;

            BusinessServices.Application objApp = new BusinessServices.Application();
            strDateTimeUpdateLastRun = objApp.GetDateModuleStatusUpdateLastRun(UserContext.UserData.OrgID).ToString("F");
            if (strDateTimeUpdateLastRun == DateTime.MinValue.ToString("F"))
            {
                this.lblModuleStatusUpdateLastRun.ForeColor = Color.Red;
                this.lblModuleStatusUpdateLastRun.Text      = ResourceManager.GetString("lblModuleStatusUpdateLastRun");//"Never";
            }
            else
            {
                //TODO_DATE
                this.lblModuleStatusUpdateLastRun.Text = objApp.GetDateModuleStatusUpdateLastRun(UserContext.UserData.OrgID).ToString("F");
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Get the system version from the database
        /// </summary>
        private void GetSystemVersion()
        {
            //Get Database version
            BusinessServices.Application app = new BusinessServices.Application();
            this.lblDatabaseVersion.Text = app.GetDatabaseVersion().Replace("\n", "<br>");

            ManagementObjectSearcher   query;
            ManagementObjectCollection queryCollection;
            string strData;

            //Get operating system
            query           = new ManagementObjectSearcher("select * from win32_OperatingSystem");
            queryCollection = query.Get();

            strData = "";
            foreach (ManagementObject mo in queryCollection)
            {
                strData  = "Operating System: " + mo["Caption"];
                strData += "<br>" + "Version: " + mo["Version"];
                strData += "<br>" + "Manufacturer : " + mo["Manufacturer"];
                strData += "<br>" + "Computer Name : " + mo["csname"];
                strData += "<br>" + "Windows Directory : " + mo["WindowsDirectory"];
                strData += "<br>" + "Serial Number : " + mo["SerialNumber"];
            }
            this.lblOperatingSystem.Text = strData;

            //Get Computer Information
            query           = new ManagementObjectSearcher("select * from Win32_ComputerSystem");
            queryCollection = query.Get();

            foreach (ManagementObject mo in queryCollection)
            {
                strData  = "Computer Manufacturer Name: " + mo["Manufacturer"];
                strData += "<br>" + "Computer Model: " + mo["model"];
                strData += "<br>" + "System Type: " + mo["SystemType"];
                strData += "<br>" + "Total Physical Memory: " + FormatSize(Int64.Parse(mo["totalphysicalmemory"].ToString()), false);
                strData += "<br>" + "Domain: " + mo["Domain"];
                //strData +="<br>" + "User Name: " + mo["UserName"];
            }
            this.lblComputerSystem.Text = strData;

            //Get Processor Information
            query           = new ManagementObjectSearcher("select * from Win32_processor");
            queryCollection = query.Get();
            foreach (ManagementObject mo in queryCollection)
            {
                strData  = "Manufacturer: " + mo["Manufacturer"];
                strData += "<br>" + "Computer Processor: " + mo["Caption"];
                strData += "<br>" + "CPU Speed: " + FormatSpeed(Int64.Parse(mo["MaxClockSpeed"].ToString()));
                if (!(null == mo["L2CacheSize"]))
                {
                    strData += "<br>" + "L2 Cache Size: " + FormatSize(Int64.Parse(mo["L2CacheSize"].ToString()), false);
                }
            }

            this.lblSystemProcessor.Text = strData;

            //this.lblOSVersion.Text  = Environment.OSVersion.ToString();

            this.lblFrameworkVersion.Text = Environment.Version.ToString();

            this.lblIISVersion.Text = Request.ServerVariables["SERVER_SOFTWARE"];
        }