protected void DeleteFarm(object sender, EventArgs e) { var farmManager = new FarmManager(ConfigurationManager.ConnectionStrings["AdditionalInformation"].ConnectionString); var result = farmManager.DeleteFarm(IdFerma.Text); if (result) { Response.Redirect("~/EditareFerme.aspx"); } else { FarmValidation.Text = "Ferma " + FermaName.Text + " nu poate fi stearsa!"; FarmValidation.Visible = true; FarmValidation.ForeColor = Color.Red; } }