protected void saveButton_Click(object sender, EventArgs e) { Disease aDisease = new Disease(); aDisease.NameOfDisease = nameDiseaseEntryTextBox.Text; aDisease.Description = descriptionDiseaseEntryTextBox.Text; aDisease.TreatmentProcedure = treatmentProcedureDiseaseEntryTextBox.Text; if (diseaseManager.IsDiseaseExists(aDisease)) { megLabel.Text = ""; errorMegLabel.Text = "This disease already exists!"; } else { errorMegLabel.Text = ""; megLabel.Text = diseaseManager.SaveDisease(aDisease); nameDiseaseEntryTextBox.Text = ""; descriptionDiseaseEntryTextBox.Text = ""; treatmentProcedureDiseaseEntryTextBox.Text = ""; diseaseEntryGridView.DataSource = diseaseManager.GetAllDiseases(); diseaseEntryGridView.DataBind(); } }