private void CPAddProduct() { if (user.HasPolicy("Store.Product.Add")) { string productName = postData["productName"]; decimal productPrice = Convert.ToDecimal(postData["productPrice"]); decimal employeePrice = Convert.ToDecimal(postData["employeePrice"]); string categoryName = postData["categoryName"]; SqlStoredProcedures sqlSP = new SqlStoredProcedures(); sqlSP.StoreAddProduct(productName, productPrice, employeePrice, categoryName, false); } else { throw new NoPermissionException(); } }