private void addButton_odbiorca_Click(object sender, EventArgs e) { OdbiorcaDesign obrForm = new OdbiorcaDesign(); obrForm.ShowDialog(); DB.showDataFromOdbiorca(odbiorcaTableView); }
private void editButton_odbiorca_Click(object sender, EventArgs e) { int row = odbiorcaTableView.CurrentCellAddress.Y; string name = odbiorcaTableView.Rows[row].Cells[1].Value.ToString(); string surname = odbiorcaTableView.Rows[row].Cells[2].Value.ToString(); int id = (int)odbiorcaTableView.Rows[row].Cells[0].Value; OdbiorcaDesign msgForm = new OdbiorcaDesign(id, name, surname); msgForm.ShowDialog(); DB.showDataFromOdbiorca(odbiorcaTableView); }