日期:2014-05-18 浏览次数:20464 次
int a; private void OKButton_Click(object sender, RoutedEventArgs e) { client.selectcateidbynameAsync((combocate.SelectionBoxItem as Je_BusCate).CategoryName); client.selectcateidbynameCompleted += new EventHandler<selectcateidbynameCompletedEventArgs>(client_selectcateidbynameCompleted); MessageBox.Show(a.tostring()); } void client_selectcateidbynameCompleted(object sender, selectcateidbynameCompletedEventArgs e) { if (e.Error == null) { a = e.Result; } }
int a; private void OKButton_Click(object sender, RoutedEventArgs e) { client.selectcateidbynameAsync((combocate.SelectionBoxItem as Je_BusCate).CategoryName); client.selectcateidbynameCompleted += new EventHandler<selectcateidbynameCompletedEventArgs>(client_selectcateidbynameCompleted); } void client_selectcateidbynameCompleted(object sender, selectcateidbynameCompletedEventArgs e) { if (e.Error == null) { a= e.Result; } MessageBox.Show(a.tostring()); }