private void button2_Click(object sender, EventArgs e) { this.Hide(); doctor d = new doctor(); d.Show(); }
private void checkInformationToolStripMenuItem_Click(object sender, EventArgs e) { this.Hide(); doctor d = new doctor(); d.Show(); }
private void button1_Click(object sender, EventArgs e) { SqlDataAdapter cc = new SqlDataAdapter(" SELECT d_id FROM doctor", c); DataTable dw = new DataTable(); cc.Fill(dw); foreach (DataRow item in dw.Rows) { int n = 0; string[] wn = new string[4]; wn[n] = item[0].ToString(); if (did.Text == wn[n]) { MessageBox.Show("Already Exist.\n Try again"); this.Close(); doctor d = new doctor(); d.Show(); st = false; } } if (st) { if (did.Text == "" || dname.Text == "" || dgender.Text == "" || dage.Text == "" || dq.Text == "" || dsalary.Text == "" || dmobile.Text == "" || daddress.Text == "" || dword.Text == "") { MessageBox.Show("Fill all boxes"); } else { InsertDoctor(); this.Close(); doctor d = new doctor(); d.Show(); } st = false; } }