private void Approve_Click(object sender, EventArgs e)
 {
     if (isInsert)
     {
         if (textBox5.Text != "")
         {
             dataGridView1.Enabled = true;
             isInsert = false;
             client.Insert((int)numericUpDown1.Value, DateTime.Parse(textBox2.Text + " " + textBox3.Text), textBox4.Text, textBox5.Text);
             textBox5.ReadOnly        = true;
             Delete.Enabled           = true;
             Insert.Enabled           = true;
             Update.Enabled           = true;
             Approve.Enabled          = false;
             dataGridView1.DataSource = null;
             dataGridView1.DataSource = client.Select(DateTime.Parse("01.01.2000 12:12:00"), DateTime.Parse("01.01.2050 12:12:00")).Tables["T1"];
         }
     }
     if (isUpdate)
     {
         if (textBox5.Text != "")
         {
             dataGridView1.Enabled = true;
             isUpdate = false;
             client.Update((int)numericUpDown1.Value, DateTime.Parse(textBox2.Text + " " + textBox3.Text), textBox4.Text, textBox5.Text);
             textBox5.ReadOnly        = true;
             Delete.Enabled           = true;
             Insert.Enabled           = true;
             Update.Enabled           = true;
             Approve.Enabled          = false;
             dataGridView1.DataSource = null;
             dataGridView1.DataSource = client.Select(DateTime.Parse("01.01.2000 12:12:00"), DateTime.Parse("01.01.2050 12:12:00")).Tables["T1"];
         }
     }
 }
 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("Имя автора не введено");
     }
 }