private void Submitbtn_Click(object sender, EventArgs e) { if (!assertForm()) { MessageBox.Show("Please fill the blanks!"); } else { Prescription script = new Prescription(PatientTbx.Text, doctor, diseasetBx.Text, Notes, FromDate.Value, ToDate.Value); script.updateDB(); remove(); initializeBlankNote(); } }