private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string num = "";

            var senderGrid = (DataGridView)sender;

            try
            {
                if (senderGrid.Columns[e.ColumnIndex] is DataGridViewImageColumn && e.RowIndex >= 0)
                {
                    string str = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
                    for (int i = 0; i < str.Count(); i++)
                    {
                        if (str[i + 1] != 'о' && str[i + 2] != 'т')
                        {
                            num = num + str[i];
                        }
                        else
                        {
                            break;
                        }
                    }
                    reg_bill rb = new reg_bill(num);
                    rb.ShowDialog();
                }
            }

            catch
            {
            }
        }
        private void button4_Click(object sender, EventArgs e)
        {
            reg_bill rb = new reg_bill();

            rb.ShowDialog();
        }