예제 #1
0
        private void FillObjects()
        {
            textResults.Text = "";
            Application.DoEvents();
            Cursor = Cursors.WaitCursor;
            if (!DatabaseTools.SetDbConnection("canadatest"))             //if database doesn't exist
            //MessageBox.Show("Database canadatest does not exist.");
            {
                DatabaseTools.SetDbConnection("");
                textResults.Text += DatabaseTools.FreshFromDump();              //this also sets database to be unittest.
            }
            else
            {
                textResults.Text += DatabaseTools.ClearDb();
            }
            Prefs.RefreshCache();
            List <Userod> listUsers = Userods.GetAll();

            Security.CurUser  = listUsers[0];
            textResults.Text += ProviderTC.SetInitialProviders();
            Application.DoEvents();
            textResults.Text += CarrierTC.SetInitialCarriers();
            Application.DoEvents();
            textResults.Text += PatientTC.SetInitialPatients();
            Application.DoEvents();
            textResults.Text += ClaimTC.CreateAllClaims();
            Application.DoEvents();
            textResults.Text += PredeterminationTC.CreateAllPredeterminations();
            Application.DoEvents();
        }
예제 #2
0
 private void butClear_Click(object sender, EventArgs e)
 {
     textResults.Text = "";
     Application.DoEvents();
     Cursor = Cursors.WaitCursor;
     if (!DatabaseTools.SetDbConnection(dbname))             //if database doesn't exist
     //MessageBox.Show("Database canadatest does not exist.");
     {
         DatabaseTools.SetDbConnection("");
         textResults.Text += DatabaseTools.FreshFromDump();              //this also sets database to be unittest.
     }
     textResults.Text += DatabaseTools.ClearDb();
     textResults.Text += "Done.";
     Cursor            = Cursors.Default;
 }