private void добавитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            sprReceiptOne sprReceiptOneForm = new sprReceiptOne();

            sprReceiptOneForm.type = "add";
            sprReceiptOneForm.Text = "Новая поставка";
            sprReceiptOneForm.ShowDialog();
        }
        private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            sprReceiptOne sprReceiptOne = new sprReceiptOne();

            sprReceiptOne.type = "edit";
            sprReceiptOne.id   = dgReceiptList.CurrentRow.Cells[0].Value.ToString();
            sprReceiptOne.Text = dgReceiptList.CurrentRow.Cells[1].Value.ToString();
            sprReceiptOne.ShowDialog();
        }
 private void dgComponentsList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (Mode == "1")
     {
         sprReceiptOne main = this.Owner as sprReceiptOne;
         if (main != null)
         {
             main.Accessory = dgComponentsList.CurrentRow.Cells[2].Value.ToString();
             this.Close();
         }
     }
 }