protected void btnDelete_Click(object sender, EventArgs e) { var locationToDelete = new Location { Id = LocationId }; _locationManager.Delete(locationToDelete); Response.Redirect("LocationManagementPanel.aspx"); }
protected void btnSave_Click(object sender, EventArgs e) { var location = new Location { Code = txtLocationCode.Text, DepartmentId = int.Parse(DDLDepartments.SelectedValue), Description = txtLocationDescription.Text, UniqueId = Guid.NewGuid(), Id = LocationId }; _locationManager.Save(location); Response.Redirect("LocationManagementPanel.aspx"); }