01.
public
string
UpdateRating(
string
MeName,
double
rating)
02.
{
03.
string
strconn = WebConfigurationManager.ConnectionStrings[
"WebAgentConnectionString"
].ToString();
04.
using
(SqlConnection connection =
new
SqlConnection(strconn))
05.
{
06.
string
strSql =
""
;
07.
connection.Open();
08.
strSql =
"update Media set Rating = "
+ rating +
" where MediaFileName = '"
+ MeName +
"';"
;
09.
SqlCommand com =
new
SqlCommand(strSql, connection);
10.
com.ExecuteNonQuery();
11.
connection.Close();
12.
return
strSql;
13.
}
14.
}