private void ChangeTitleButton_Click(object sender, EventArgs e) { int codeOfGood = Convert.ToInt32(товарыDataGridView.CurrentRow.Cells[0].Value); string title = Convert.ToString(товарыDataGridView.CurrentRow.Cells[3].Value); ИзменитьЦенуНазваниеТовара f = new ИзменитьЦенуНазваниеТовара(codeOfGood, title); f.ShowDialog(); UpdateDataGrid(); }
private void ChangePriceButton_Click(object sender, EventArgs e) { int codeOfGood = Convert.ToInt32(товарыDataGridView.CurrentRow.Cells[0].Value); double price = Convert.ToDouble(товарыDataGridView.CurrentRow.Cells[4].Value); ИзменитьЦенуНазваниеТовара f = new ИзменитьЦенуНазваниеТовара(codeOfGood, (decimal)price); f.ShowDialog(); UpdateDataGrid(); }