public IHttpActionResult DeleteProductAttribute([FromBody] IdViewModel idViewModel) { try { ProductAttributeManager.DeleteProductAttribute(idViewModel.Id); return(Ok()); } catch (Exception exception) { return(InternalServerError(exception)); } }
protected void DeleteButton_Click(object sender, EventArgs e) { try { ProductAttributeManager.DeleteProductAttribute(this.ProductAttributeID); Response.Redirect("ProductAttributes.aspx"); } catch (Exception exc) { ProcessException(exc); } }
protected void DeleteButton_Click(object sender, EventArgs e) { try { ProductAttribute productAttribute = ProductAttributeManager.GetProductAttributeById(this.ProductAttributeId); if (productAttribute != null) { ProductAttributeManager.DeleteProductAttribute(productAttribute.ProductAttributeId); CustomerActivityManager.InsertActivity( "DeleteProductAttribute", GetLocaleResourceString("ActivityLog.DeleteProductAttribute"), productAttribute.Name); } Response.Redirect("ProductAttributes.aspx"); } catch (Exception exc) { ProcessException(exc); } }