silverlight页面的代码
private void enter_Click(object sender, RoutedEventArgs e)
{
Service1SoapClient client = new Service1SoapClient();
string name = this.Name.Text;
string pwd = this.Pwd.Password;
int i=client.select_adminAsync(name,pwd);
}
webservice页面的代码
[WebMethod]
public int select_admin(string name,string pwd)
{
string sql = "select * from admin where Name='" + name + "'and Password='" + pwd + "'";
DataSet ds = DbHelpSQL.ExecuteGetData(sql);
if (ds.Tables[0].Rows.Count > 0)
{
return 1;
}
else
{
return 0;
}
为什么调用方法的时候会说无法将void隐士转换为int 我方法的返回值明明是int 该怎么样才可以调用或者获取返回值