private void buttonFirstStep_Click(object sender, EventArgs e) { //check sql credentials to make sure connection is sound if (textBoxServer.Text != "") { if (textBoxDBName.Text != "") { SupportOperations dbIO = new SupportOperations(textBoxServer.Text, textBoxDBName.Text); if (!dbIO.testSQLConnection()) { MessageBox.Show("There was an issue connecting with that information. Details:" + "\r\n" + dbIO.errorMessage, "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { if (demoOnly) { runDemoForm(dbIO.connectionString); } else { runFinancialForm(dbIO.connectionString); } } } else { MessageBox.Show("Database Name box cannot be blank"); } } else { MessageBox.Show("SQL Server box cannot be blank"); } }
public ProgressForm(string connString, bool existingdata, bool inclClosedMatters, bool inclWIPfees, bool inclWIPexp, bool inclAR, bool inclTrust) { InitializeComponent(); //variable assignments connectionString = connString; includeClosedMatters = inclClosedMatters; useExistingData = existingdata; Conversion = new ConversionControl(inclClosedMatters); if (ConversionControl.PCLaw != null) { PCLaw = ConversionControl.PCLaw; } else { PCLaw = new PLConvert.PCLawConversion(); } label11.Visible = inclWIPfees; label12.Visible = inclWIPexp; label14.Visible = inclAR; label13.Visible = inclTrust; //get a list of all labels so we know what and how to process the items List <Label> tempList = this.Controls.OfType <Label>().ToList(); List <Label> labelList = new List <Label>(); foreach (Label c in tempList) { if (c.Visible != true) { labelList.Add(c); } } SupportOperations supportOp = new SupportOperations(); convObjList = supportOp.createConvObjects(labelList).ToList(); //Control method calls beginConversion(); finishConversion(); }