private void CPChangeProductOnSalePrice() { if (user.HasPolicy("Store.Product.Update")) { string productName = postData["productName"]; decimal?onSalePrice = Convert.ToDecimal(postData["onSalePrice"]); if (onSalePrice != null && onSalePrice <= 0) { onSalePrice = null; } SqlStoredProcedures sqlSP = new SqlStoredProcedures(); sqlSP.StoreChangeProductOnSalePrice(productName, onSalePrice); } else { throw new NoPermissionException(); } }