private void button1_Click(object sender, EventArgs e) { //BookServiceRef.BookServiceClient bookClient = new BookServiceRef.BookServiceClient(); //string bookmsg = bookClient.GetBook(1); //txt_BookMsg.Text = bookmsg; BookServiceRef.BookServiceClient bookClient = new BookServiceRef.BookServiceClient(instanceContext); bookClient.DisplayName("这本书可以看"); }
private void btnSearch_Click(object sender, EventArgs e) { BookServiceRef.BookServiceClient bookSvrClient = new BookServiceRef.BookServiceClient(); textBoxMsg.Text = bookSvrClient.Search(string.Empty, string.Empty); List <Books> books = XMLHelper.DeSerializer <List <Books> >(textBoxMsg.Text); gridBooks.DataSource = books; }
static void Main(string[] args) { BookServiceRef.BookServiceClient client = new BookServiceRef.BookServiceClient(); client.GetBook(5); }