private void addSMI_Click(object sender, EventArgs e)
        {
            ItemInfoForm itemf = new ItemInfoForm(SqlConnection, -1);

            itemf.Notation = Notation.Insert;
            itemf.ShowDialog();
            RefreshData();
        }
        private void ввестиЗначенияВручнуюToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ItemInfoForm itemf = new ItemInfoForm(SqlConnection, -1);

            itemf.Notation = Notation.Insert;
            itemf.ShowDialog();
            RefreshData();
        }
        void CreateInfoForm()
        {
            if (dataGridView1.SelectedRows.Count > 0)
            {
                int  index     = dataGridView1.SelectedRows[0].Index;
                int  id        = 0;
                bool converted = Int32.TryParse(dataGridView1[0, index].Value.ToString(), out id);
                if (converted == false)
                {
                    return;
                }

                ItemInfoForm itemInfoForm = new ItemInfoForm(SqlConnection, id);
                itemInfoForm.Notation = Notation.Client;
                try
                {
                    itemInfoForm.ShowDialog();
                }
                catch (Exception)
                {
                    MessageBox.Show("запускай через отладчик");
                }
            }
        }