Here is my [WebMethod]
[WebMethod]
public DataSet Restaurant(string amount, string persons)
{
// DataSet result = Amount / personHash;
decimal price = amount \ persons ;
DataSet result = null;
const string SQL_COMMAND_TEXT = "SELECT Rst_Name FROM RstProductDetails WHERE Product_Price WHERE Product_rice< = @price";
using (SqlConnection connection = Class1.GetConnection())
{
connection.Open();
using (SqlCommand command = new SqlCommand(SQL_COMMAND_TEXT, connection))
{
command.Parameters.Add("@Rst_Name", SqlDbType.NVarChar);
command.Parameters.Add("@PersonHash", SqlDbType.NVarChar);
command.Parameters.Add("@price", SqlDbType.Decimal);
command.Parameters["@Rst_Name"].Value = amount;
command.Parameters["@persons"].Value = persons;
command.Parameters["@price"].Value = price;
using (SqlDataAdapter dataAdapter = new SqlDataAdapter(command))
{
result = new DataSet();
dataAdapter.Fill(result);
}
}
}
return result;
}
Here is my databse relation diagram