private void button1_Click(object sender, EventArgs e) { a = new Login(textBox1.Text, textBox2.Text); bool check = a.login(); if (textBox1.Text != "" && textBox2.Text != "") { if (check == true) { Managedoctor d = new Managedoctor(); d.Show(); this.Hide(); } else { MessageBox.Show("Invalid User Name or Password"); textBox1.BackColor = Color.Red; textBox2.BackColor = Color.Red; textBox1.Clear(); textBox2.Clear(); } } else { MessageBox.Show("Please Specify User ID or Password"); } }
private void button3_Click(object sender, EventArgs e) { Managedoctor d = new Managedoctor(); d.Show(); this.Hide(); }
private void button14_Click(object sender, EventArgs e) { dc = new Doctor(); string a; if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "" && textBox5.Text != "" && textBox6.Text != "" && textBox7.Text != "" && textBox8.Text != "" && textBox9.Text != "") { if (radioButton1.Checked) { a = "male"; dc.insert(textBox1.Text, textBox3.Text, textBox4.Text, textBox5.Text, textBox6.Text, textBox7.Text, a); } else if (radioButton2.Checked) { a = "female"; dc.insert(textBox1.Text, textBox3.Text, textBox4.Text, textBox5.Text, textBox6.Text, textBox7.Text, a); } MessageBox.Show("Data Inserted"); } else { MessageBox.Show("Error! Please Insert Complete Data"); } Managedoctor obj = new Managedoctor(); obj.Show(); this.Hide(); }