private void search_button_Click(object sender, EventArgs e) { first = user_first.Text; last = user_last.Text; f_name = first; l_name = last; fullName = last + first; string curFile = @"C:\Users\uta\Desktop\BMI\BMI\bin\Debug\Patients Data\" + fullName + ".txt"; Console.WriteLine(fullName); Console.WriteLine(File.Exists(curFile) ? "File exists." : "File does not exist."); if (File.Exists(curFile)) { found = 1; MessageBox.Show("Patient: " + first + " " + last + " is found!", "Welcome"); this.Visible = false; home_form.ShowDialog(); } else { found = 0; MessageBox.Show("Patient has not been registered.", "Oops!"); this.Visible = false; new_patient.ShowDialog(); } }
private void Login2_Click(object sender, EventArgs e) { userFirst = user_first.Text; userLast = user_last.Text; //user_acct.person(userFirst, userLast); user_acct.firstname(userFirst); user_acct.lastname(userLast); this.Visible = false; MessageBox.Show("Hello " + user_acct.user_first + " " + user_acct.user_last, "Welcome"); home_form.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { SavePatient save_Patient = new SavePatient(); DataForm data_form = new DataForm(); string first = user_first.Text; string last = user_last.Text; f_name = first; l_name = last; save_Patient.read_name(first, last); this.Visible = false; home_form.ShowDialog(); }
private void button3_Click(object sender, EventArgs e) { this.Visible = false; HomeForm home_form = new HomeForm(); home_form.ShowDialog(); }
private void button2_Click(object sender, EventArgs e) { // Configure the process using the StartInfo properties. this.Visible = false; home_front.ShowDialog(); }