private void добавитьToolStripMenuItem_Click(object sender, EventArgs e) { sprSuppliersOne sprSuppliersOneForm = new sprSuppliersOne(); sprSuppliersOneForm.type = "add"; sprSuppliersOneForm.Text = "Новый поставщик"; sprSuppliersOneForm.ShowDialog(); }
private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e) { sprSuppliersOne sprSuppliersOne = new sprSuppliersOne(); sprSuppliersOne.type = "edit"; sprSuppliersOne.id = dgSuppliersList.CurrentRow.Cells[0].Value.ToString(); sprSuppliersOne.Text = dgSuppliersList.CurrentRow.Cells[1].Value.ToString(); sprSuppliersOne.ShowDialog(); }