예제 #1
0
        public static void FinishInstall()
        {
            //MessageBox.Show(Strings.AboutToInstallDatabase);

            ExecuteEmbeddedSqlScript("TemPOS.Resources.EnableClrScript.sql", false);
            if (!DataModelBase.DatabaseExists("TemPOS"))
            {
                //System.Windows.Forms.Form window = CreateNotificationWindow();
                //window.Show();
                try
                {
                    //ExecuteEmbeddedSqlScript("TemPOS.Resources.EnableClrScript.sql");
                    ExecuteEmbeddedSqlScript("TemPOS.Resources.InstallDatabaseScript.sql", false);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, Types.Strings.DatabaseInstallationException);
                    return;
                }
                //window.Hide();
            }

            // Warning: Do not apply database patches at install time,
            //          instead apply patches the first time the app starts.
        }
예제 #2
0
        private void DoFinishInstall()
        {
            bool exists = false;

            try
            {
                exists = DataModelBase.DatabaseExists("TemPOS");
            }
            catch {  }

            if (!exists)
            {
                _notification = ActionNotificationControl.Create(null,
                                                                 Types.Strings.InstallingSQLDatabase, Types.Strings.Notification);
                _notification.Show();

                new Thread(DoFinishInstallThreadStart).Start();
            }
            else
            {
                _notification = null;
                FinalStartUp();
            }
        }