void UpdateRecord() { if (listBox.SelectedIndex < 0) { return; } TableElement element = allItems[listBox.SelectedIndex]; element = element.EditInRedactor(); if (element == null) { return; } dataBaseWorker.UpdateRecord(element); allItems = dataBaseWorker.GetAllRecordsByType(tableType); InitItems(listBox.SelectedIndex); }