Ejemplo n.º 1
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            var locationToDelete = new Location
            {
                Id = LocationId
            };

            _locationManager.Delete(locationToDelete);
            Response.Redirect("LocationManagementPanel.aspx");
        }
Ejemplo n.º 2
0
 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");
 }