private void dgvCHILD_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (dgvCHILD.Rows.Count > 0)
     {
         using (AddChildForm acForm = new AddChildForm(false, dgvCHILD.CurrentRow.Index))
         {
             acForm.Owner = this;
             acForm.ShowDialog();
         }
     }
 }
        private void AddChild_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                using (AddChildForm acForm = new AddChildForm(true, dgvCHILD.Rows.Count == 0 ? 0 : int.Parse(dgvCHILD[0, dgvCHILD.Rows.Count - 1].Value.ToString())))
                {
                    acForm.Owner = this;
                    acForm.ShowDialog();
                }

                tbBQNT.Text = Convert.ToString(BQNT);
                dgvCHILD.Refresh();
                AddCNTChild = dgvCHILD.Rows.Count;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
                logger.Debug("\n/--------------------------------------------------------------------/\n" + ex.StackTrace + "\n//----------------------------//\n" + ex.Message + "\n\n");
            }
        }