private void addToolStripMenuItem_Click(object sender, EventArgs e) { var modObOfInvest = new ObjectOfInvestigationEdit(); modObOfInvest.ShowDialog(this); this.obOfInvestigateListView.Items.Clear(); loadObjectsList(); this.obOfInvestigateListView.Refresh(); }
private void changeToolStripMenuItem_Click(object sender, EventArgs e) { if (this.obOfInvestigateListView.SelectedIndices.Count > 0) { ObjectOfInvestigationPojo objectOfInvestigation = new ObjectOfInvestigationPojo(); objectOfInvestigation.id = Int32.Parse(this.obOfInvestigateListView.SelectedItems[0].SubItems[0].Text); objectOfInvestigation.name = this.obOfInvestigateListView.SelectedItems[0].SubItems[1].Text; objectOfInvestigation.characteristics = objectsOfInvestService.getObjectCharactsByObjctId(objectOfInvestigation.id); var modObOfInvest = new ObjectOfInvestigationEdit(e); modObOfInvest.selectedObjectOfInvestigation = objectOfInvestigation; modObOfInvest.ShowDialog(this); this.obOfInvestigateListView.Items.Clear(); loadObjectsList(); this.obOfInvestigateListView.Refresh(); } }