|
private void button2_Click(object sender, EventArgs e)
{
IAsyncResult result1;
project .BookServer .Service login=new project.BookServer.Service ();
//project.BookServer.Service login = new project.BookServer.Service();
//IAsyncResult result1 =login.BeginLogin(login_name.Text ,login_pwd );
string result;
//object result=login .EndLogin (result1 );
//result=login.Login(login_name.Text, login_pwd);
//public beginlogin(string path);
result1 = login.BeginLogin(login_name .Text ,login_pwd);
if (result1.IsCompleted)
result = login.EndLogin(result1 );
if (result =="error")
login_message.Text = "用户名或密码错误,请重新输入";
else
{
select c = new select();
c.ShowDialog();
}
}
以上是我编写的一段客户端代码,但是调试时老是出现这么一个错误:beginlogin方法没有采用“2”个参数的重载,也就是这句result1 = login.BeginLogin(login_name .Text ,login_pwd);请教各位达人,急
|
|