Ejemplo n.º 1
0
        /// <summary>
        /// validateDB
        /// </summary>
        /// <param name="dsConfig"></param>
        /// <param name="outPut"></param>
        /// <param name="progress"></param>
        private void ValidateDB(DataSet dsConfig, string outPut, string progress)
        {
            if (progress.ToLower() == "")
            {
                RegisterKey.UpdateRegistryPropertyValue(NewRegistryPath + @"\eFPInstaller", "InstallStep", "validateDB").ToString();
            }
            DataSet dsPreReqConfig = ReadPreReqConfigXML();

            Validation.dsConfig       = dsConfig;
            Validation.dsPreReqConfig = dsPreReqConfig;
            Validation.systemName     = outPut;
            Validation.validateDB();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public InstallPage()
        {
            //string NewRegistryPath = @"HKCU:\software";

            InitializeComponent();
            LoadGridData();
            imgPictureBox.Visible = true;
            timer       = new System.Windows.Forms.Timer();
            timer.Tick += timerTick;
            RegisterKey.UpdateRegistryPropertyValue(NewRegistryPath + @"\eFPInstaller", "InstallStep", "").ToString();
            var progress = RegisterKey.GetRegistryPropertyValue(NewRegistryPath + @"\eFPInstaller", "InstallStep");

            if (progress == null | progress == string.Empty)
            {
                RegisterKey.SetRegistry("eFPInstaller", "InstallerStep", NewRegistryPath);
                RegisterKey.SetRegistryProperty(NewRegistryPath + @"\eFPInstaller", "InstallStep", string.Empty, "String");
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Step 3
        /// </summary>
        private void StepThree()
        {
            try
            {
                this.dicExceptionAtSteps["Step1"] = "Processing";
                string progress = RegisterKey.GetRegistryPropertyValue(NewRegistryPath + @"\eFPInstaller", "InstallStep");
                if (progress.ToLower() == "checkfordbserver")
                {
                    RegisterKey.UpdateRegistryPropertyValue(NewRegistryPath + @"\eFPInstaller", "InstallStep", "checkforApp").ToString();
                }

                LogFile.Instance.LogMessage(Constants.CARRIAGERETURNEWLINE + Constants.NEWLINE + " INSTALLING APPLICATION SERVER: " + Constants.CARRIAGERETURNEWLINE);
                if (checkIsItDBServer == false && checkIsAppServer == true)
                {
                    LogFile.Instance.LogMessage(Constants.CARRIAGERETURNEWLINE + DateTime.Now.ToString("HH:mm:ss") + " The current machine is a Application server " + Constants.CARRIAGERETURNEWLINE);
                }
                else
                {
                    LogFile.Instance.LogMessage(Constants.CARRIAGERETURNEWLINE + DateTime.Now.ToString("HH:mm:ss") + " The current machine is not a Application server " + Constants.CARRIAGERETURNEWLINE);
                }

                LogFile.Instance.LogMessage("\r\n\n INSTALLING WORKFLOW SERVER: \r\n");
                if (checkIsItDBServer == false && checkIsWFServer == true)
                {
                    LogFile.Instance.LogMessage(Constants.CARRIAGERETURNEWLINE + DateTime.Now.ToString("HH:mm:ss") + " The current machine is a Workflow server " + Constants.CARRIAGERETURNEWLINE);
                }
                else
                {
                    LogFile.Instance.LogMessage(Constants.CARRIAGERETURNEWLINE + DateTime.Now.ToString("HH:mm:ss") + " The current machine is not a Workflow server " + Constants.CARRIAGERETURNEWLINE);
                }

                throw new Exception("Exception occured in Step 3.");
            }
            catch (Exception ex)
            {
                // isExceptonOccured = true;
                UpdateProgressBarValueIfExceptionOccurs(ex, 3);
            }

            this.dicExceptionAtSteps["Step3"] = "Processed";
        }
Ejemplo n.º 4
0
        /// <summary>
        /// checkDBServer
        /// </summary>
        private void checkForDBServer(DataSet dsConfig)
        {
            try
            {
                string progress = RegisterKey.GetRegistryPropertyValue(NewRegistryPath + @"\eFPInstaller", "InstallStep");
                if (progress.ToLower() == "validatedb")
                {
                    RegisterKey.UpdateRegistryPropertyValue(NewRegistryPath + @"\eFPInstaller", "InstallStep", "checkForDBServer").ToString();
                }
                checkIsItDBServer = Validation.checkIsItDBServer;
                checkIsAppServer  = Validation.checkIsAppServer;
                checkIsWFServer   = Validation.checkIsWFServer;

                LogFile.Instance.LogMessage(Constants.CARRIAGERETURNEWLINE + Constants.NEWLINE + " INSTALLING DATABASE SERVER:" + Constants.CARRIAGERETURNEWLINE);
                if (checkIsItDBServer == true)
                {
                    LogFile.Instance.LogMessage(Constants.CARRIAGERETURNEWLINE + Constants.NEWLINE + " The current machine is a database server: " + Constants.CARRIAGERETURNEWLINE);
                    string SuccessPath = string.Empty;
                    bool   validatePreRequisiteStatus = false;
                    foreach (DataGridViewRow row in StatusGrid.Rows)
                    {
                        SuccessPath = System.AppDomain.CurrentDomain.BaseDirectory + "/Images/Success.png";
                        Image img = System.Drawing.Image.FromFile(SuccessPath);
                        if (row.Index == 0)
                        {
                            LogFile.Instance.LogMessage(Constants.CARRIAGERETURNEWLINE + Constants.NEWLINE + " VALIDATING PREREQUISITES: " + Constants.CARRIAGERETURNEWLINE);

                            validatePreRequisiteStatus = Validation.validatePreRequisites();
                            if (validatePreRequisiteStatus == true)
                            {
                                row.Cells[0].Value = img;
                            }
                            else
                            {
                            }
                        }

                        if (row.Index == 1)
                        {
                            LogFile.Instance.LogMessage(Constants.CARRIAGERETURNEWLINE + Constants.NEWLINE + " CONFIGURING DATABASE SERVER: " + Constants.CARRIAGERETURNEWLINE);

                            validatePreRequisiteStatus = Validation.RestoreDB();
                            DBConnections.SaveDBConnections(dsConfig);
                            if (validatePreRequisiteStatus == true)
                            {
                                row.Cells[0].Value = img;
                            }
                        }

                        if (row.Index == 2)
                        {
                            // LogFile.Instance.LogMessage(Constants.CARRIAGERETURNEWLINE + Constants.NEWLINE + " Create SQLServer Job: " + Constants.CARRIAGERETURNEWLINE);

                            validatePreRequisiteStatus = Validation.CreateSQLServerJob();;
                            if (validatePreRequisiteStatus == true)
                            {
                                row.Cells[0].Value = img;
                            }
                        }
                    }



                    //Save the DB Connections
                }
                else
                {
                    LogFile.Instance.LogMessage(Constants.CARRIAGERETURNEWLINE + DateTime.Now.ToString("HH:mm:ss") + " The current machine is not a database server " + Constants.CARRIAGERETURNEWLINE);
                }
            }
            catch (Exception ex)
            {
            }
        }