//建立一个静态方法用于返回用户的登录情况
public static bool Logon(string userid,string password)
{
try
{
string str=ConfigurationSettings.AppSettings["sqlconn"];
SqlConnection conn=new SqlConnection(str);
conn.Open();
SqlCommand comm=new SqlCommand("select count(*) from logon where uid='"+userid+"' and pwd='"+password+"'",conn);
int  count=Convert.ToInt32(comm.ExecuteScalar());
if (count>0)
{
return true;
}
else
{ return false;
}

}
catch
{

}
}请问,我写的方法在访问时,,,出错"提示:并非每个方法都有返回值",,,请问大家,应该怎么改???多谢