private void savebutton_Click(object sender, EventArgs e) { if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox4.Text == "" || textBox5.Text == "" || textBox6.Text == "") { MessageBox.Show("You have to Fill Up the Form First"); } else { recpt = new ReceptionistService(); int result = recpt.saveVisitor(textBox1.Text, textBox3.Text, textBox2.Text, textBox4.Text, textBox5.Text, textBox6.Text); if (result > 0) { MessageBox.Show("User registration successfull."); } else { MessageBox.Show("Error"); } } }
private void getallbutton_Click(object sender, EventArgs e) { r = new ReceptionistService(); dataGridView1.DataSource = r.GetallVisitor(); }