private void button4_Click(object sender, EventArgs e)
 {
     ServiceReference1.BlogServiceClient proxy = new ServiceReference1.BlogServiceClient();
     if (String.IsNullOrEmpty(textBox1.Text))
     {
         proxy.Close();
         label8.Text   = "Please enter the id...";
         textBox1.Text = textBox2.Text = textBox3.Text = textBox4.Text = "";
     }
     else
     {
         BlogClient.ServiceReference1.Blog blog = proxy.ShowBlog(int.Parse(textBox1.Text.ToString()));
         if (String.IsNullOrEmpty(blog.Author))
         {
             proxy.Close();
             label8.Text   = "Please enter valid id...";
             textBox1.Text = textBox2.Text = textBox3.Text = textBox4.Text = "";
         }
         else
         {
             textBox2.Text = blog.Title;
             textBox3.Text = blog.Data;
             textBox4.Text = blog.Author;
             proxy.Close();
         }
     }
 }
        private void listBox1_Click(object sender, EventArgs e)
        {
            ServiceReference1.BlogServiceClient proxy = new ServiceReference1.BlogServiceClient();
            BlogClient.ServiceReference1.Blog   blog  = proxy.ShowBlog(int.Parse(listBox1.SelectedValue.ToString()));
            //label5.Text = label6.Text = label7.Text = label13.Text = label18.Text = label16.Text = "";

            label2.Text = blog.Title;
            label3.Text = blog.Data;
            label4.Text = blog.Author;
            //label13.Text = note.DateAndTime.ToString();
            //label18.Text = note.NotePassword;
            //textBox1.Text = textBox2.Text = textBox3.Text = textBox4.Text = textBox5.Text = "";
            //label16.Text = "going in if condition...";
        }