void DisconnectUser()
 {
     if (isConnected)
     {
         client.Close();
         client = null;
         dataGridView1.DataSource = null;
         textBox1.ReadOnly        = false;
         button1.Text             = "Написать заявки";
         Insert.Enabled           = false;
         Delete.Enabled           = false;
         Update.Enabled           = false;
         Approve.Enabled          = false;
         isConnected          = false;
         textBox1.Text        = "";
         textBox2.Text        = "";
         textBox3.Text        = "";
         textBox4.Text        = "";
         textBox5.Text        = "";
         numericUpDown1.Value = 1;
     }
 }
 void ConnectUser()
 {
     if (textBox1.Text != "")
     {
         if (!isConnected)
         {
             isConnected = true;
             client      = new ServiceRef.Service1Client();
             client.Open();
             dataGridView1.DataSource = client.Select(DateTime.Parse("01.01.2000 12:12:00"), DateTime.Parse("01.01.2050 12:12:00")).Tables["T1"];
             textBox1.ReadOnly        = true;
             button1.Text             = "Закончить работу";
             Insert.Enabled           = true;
             Delete.Enabled           = true;
             Update.Enabled           = true;
             Approve.Enabled          = false;
         }
     }
     else
     {
         MessageBox.Show("Имя автора не введено");
     }
 }