private void OnDataAdd(object sender, EventArgs e) { var addForm = new AddItemForm(this, false); if (addForm.ShowDialog() == DialogResult.OK) { _workspace.AddData(_stCurData); ReloadData(); RefreshWorkspace(); SaveStatusChange(true); RefreshProjectInfo(); } }
/// <summary> /// Редактировать данные наблюдений. /// </summary> private void EditItem() { int nIndex = int.Parse(WorkSpace.SelectedRows[0].Cells["colIndex"].Value.ToString()); _stCurData = _workspace.GetDatabyIndex(nIndex); var formAdd = new AddItemForm(this, true); if (formAdd.ShowDialog() == DialogResult.OK) { _workspace.EditData(_stCurData); ReloadData(); SaveStatusChange(true); RefreshWorkspace(); } }