protected void saveButton_Click(object sender, EventArgs e) { Disease aDisease = new Disease(); aDisease.Name = nameTextBox.Text; aDisease.Description = descriptionTextBox.Text; aDisease.TreatementProcedure = treatementProcedureTextBox.Text; aDisease.PreferedMedicine = preferedDrugsTextBox.Text; string msg = aDiseaseManager.Save(aDisease); messageLabel.Text = msg; }
protected void saveButton_Click(object sender, EventArgs e) { Disease aDisease = new Disease(); aDisease.Name = nameTextBox.Text; aDisease.Description = descriptionTextBox.Text; aDisease.TreatmentProcedure = procedureTextBox.Text; aDisease.PreferedDrugs = preferdDrugsTextBox.Text; string ms = aManager.Save(aDisease); msg.Text = ms; }
private void saveButton_Click(object sender, EventArgs e) { DiseaseManager diseaseManager = new DiseaseManager(); Disease disease = new Disease(); disease.Name = diseaseNameTextBox.Text; if (diseaseManager.Save(disease)) { Close(); MessageBox.Show("Disease Successfully Added"); } }
protected void saveButton_Click(object sender, EventArgs e) { Disease aDisease = new Disease(); aDisease.Name = diseaseTextBox.Text; aDisease.Description = descripTextBox.Text; aDisease.Treatment = treatmentTextBox.Text; msgLabel.Text = aDiseaseManager.Save(aDisease); diseaseGridView.DataSource = aDiseaseManager.ShowDisease(); diseaseGridView.DataBind(); }
protected void diseaseSaveButton_Click(object sender, EventArgs e) { if (diseaseNameTextBox.Text == "" || descriptionTextBox.Text == "" || procedureTextBox.Text == "") { msgLabel.Text = "Please enter values"; } else { aDisease.DiseaseName = diseaseNameTextBox.Text; aDisease.Description = descriptionTextBox.Text; aDisease.TreatmentProcedure = procedureTextBox.Text; msgLabel.Text = manager.Save(aDisease); PopulateGridView(); } diseaseNameTextBox.Text = ""; descriptionTextBox.Text = ""; procedureTextBox.Text = ""; }
protected void saveButton_Click(object sender, EventArgs e) { Disease aDisease = new Disease(); aDisease.Name = nameTextBox.Text; aDisease.Description = descriptionTextBox.Text; aDisease.TreatmentProcedure = treatementProcedureTextBox.Text; aDisease.PreferredDrug = preferredDrugTextBox.Text; int rowAffected = aDiseaseManager.Save(aDisease); if (rowAffected > 0) { msgLabel.Text = "Disease Saved..."; } else { msgLabel.Text = "Error in saving or duplicate name of disease..."; } }