private void btAdd_Click(object sender, EventArgs e) { frmAddEditObject frm = new frmAddEditObject(0, "", "", ""); if (frm.ShowDialog() == DialogResult.OK) { GetObjects(); } }
private void btEdit_Click(object sender, EventArgs e) { frmAddEditObject frm = new frmAddEditObject(Convert.ToInt32(dgvObjects.CurrentRow.Cells["id"].Value), dgvObjects.CurrentRow.Cells["cName"].Value.ToString(), dgvObjects.CurrentRow.Cells["Comment"].Value.ToString(), dgvObjects.CurrentRow.Cells["CadastralNumber"].Value.ToString()); if (frm.ShowDialog() == DialogResult.OK) { GetObjects(); } }