Example #1
0
 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();
     }
 }
Example #2
0
 /// <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();
     }
 }