private void Button1_Click(object sender, EventArgs e) { if (checkBox3.Checked) { Enrollee.plan = true; } else { Enrollee.plan = false; } String fullname = textBox1.Text; String ssn = textBox2.Text; String bAddress = textBox3.Text; String mAddress = textBox4.Text; String username = textBox5.Text; String password = textBox6.Text; string pin = PINTextBox.Text; DBMng.insertIntoPrimaryEnrollee(plantype, fullname, username, password, mAddress, bAddress, ssn, pin); int id; id = DBMng.validateEnrollee(username, password); if (DBMng.getPlanTypeEnrollee(id) == "basic") { DBMng.updateDeductible(id, 250); } this.Hide(); EnrolleeHomePage newEnrolleeInfo = new EnrolleeHomePage(id); newEnrolleeInfo.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { String username = this.textBox1.Text; String password = this.textBox2.Text; id = DBMng.validateEnrollee(username, password); if (id != 0) { // We can make a list of users for the next iteration // I don't feel like it right now // this should be in an if-else branch Enrollee.CurrentUser = username; this.Hide(); EnrolleeHomePage newform = new EnrolleeHomePage(id); newform.ShowDialog(); } else { this.label3.Visible = true; } this.textBox1.Text = ""; this.textBox2.Text = ""; }