void CheckAuthority(int qx)
{
SqlConnection conn1 = new SqlConnection("data source=(local);database=********;user=sa; password=********"); //创建连接对象,并指明要连接的数据库名称、用户名、用户密码
SqlCommand orderCMD = new SqlCommand("Select Count(*) From relUserAndRole inner join relRoleAndAuthority on UserId=" + Session["userid"].ToString() + " and relUserAndRole.RoleId=relRoleAndAuthority.RoleId" + " and qx_id=" + qx, conn1);
conn1.Open();
Int32 MyCount = (Int32)orderCMD.ExecuteScalar();
conn1.Close();
if (MyCount != 0)
{
Session["Admin"] = "OK";
}
}
还有一个问题:void CheckAuthority(int qx) 中的“void” 是什么意思,怎么书上都没有介绍的???