private void Button_Click(object sender, RoutedEventArgs e) { ChatService.ChatServiceSoapClient catalogService = new ChatService.ChatServiceSoapClient(); ChatService.User user = new ChatService.User(); user.Name = username.Text; user.Message = messagebox.Text; catalogService.InsertMessageAsync(user); }
public void CheckBD(object o, EventArgs sender) { ChatService.ChatServiceSoapClient catalogService = new ChatService.ChatServiceSoapClient(); catalogService.GetChatCompleted += new EventHandler<ChatService.GetChatCompletedEventArgs>(getChat); catalogService.GetChatAsync(); }