public IHttpActionResult DeleteProductAttribute([FromBody] IdViewModel idViewModel)
 {
     try
     {
         ProductAttributeManager.DeleteProductAttribute(idViewModel.Id);
         return(Ok());
     }
     catch (Exception exception)
     {
         return(InternalServerError(exception));
     }
 }
Ejemplo n.º 2
0
 protected void DeleteButton_Click(object sender, EventArgs e)
 {
     try
     {
         ProductAttributeManager.DeleteProductAttribute(this.ProductAttributeID);
         Response.Redirect("ProductAttributes.aspx");
     }
     catch (Exception exc)
     {
         ProcessException(exc);
     }
 }
Ejemplo n.º 3
0
        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);
            }
        }