private void buttonInsertPriceTime_Click(object sender, EventArgs e) { UpdatePriceTimeForm update = new UpdatePriceTimeForm(); update.ShowDialog(); ShowPriceTime(); Show(); }
private void buttonUpdatePriceTime_Click(object sender, EventArgs e) { if (priceTime.Count != 0) { var index = dataGridViewPriceTime.CurrentRow.Index; UpdatePriceTimeForm update = new UpdatePriceTimeForm(); update.price = priceTime[index]; update.ShowDialog(); ShowPriceTime(); Show(); } else { MessageBox.Show("Таблица пустая"); } }