private void btnAdd_Click(object sender, EventArgs e) { if (txtAppointmentID.Text.Length > 0 && txtAppointmentNumber.Text.Length > 0 && txtPatientID.Text.Length > 0 && txtDoctorName.Text.Length > 0 && DateTimeAppointment.Text.Length > 0 && txtAppointmentDuration.Text.Length > 0 && txtAppointmentCharges.Text.Length > 0) if (Appointment.IsExist(txtAppointmentID.Text) || Appointment.IsExist(txtAppointmentNumber.Text) || Appointment.ISExit(txtPatientID.Text)) { MessageBox.Show("Appointment already Exist"); } else { if (Appointment.InsertAppointmentRecord(txtAppointmentID.Text , txtAppointmentNumber.Text, txtPatientID.Text, txtDoctorName.Text, DateTimeAppointment.Value, txtAppointmentDuration.Text, txtAppointmentCharges.Text)) { MessageBox.Show("Appointment Record Inserted Successfully" , "Insertion Succeeded"); GetAppointmentTable();
} else { MessageBox.Show("Appointment Record Insertion Failed" , "Insertion Failed"); } } else { MessageBox.Show( "Fill Required Field" , "Empty Fields");