Esempio n. 1
0
        private void AddIndex()
        {
            EBMIndexInfo indexForm = new EBMIndexInfo(Enums.OperateType.Add);
            DialogResult result    = indexForm.ShowDialog();

            if (result == DialogResult.OK && indexForm.EBIndex != null)
            {
                EBIndex_List.Add(indexForm.EBIndex);
                OnEbmIdChanged();
            }
            indexForm.Dispose();
        }
Esempio n. 2
0
 private void UpdateIndex()
 {
     if (dgvEBIndex.SelectedRows.Count > 0)
     {
         EBMIndexInfo indexForm = new EBMIndexInfo(Enums.OperateType.Update, EBIndex_List[dgvEBIndex.SelectedRows[0].Index]);
         DialogResult result    = indexForm.ShowDialog();
         if (result == DialogResult.OK && indexForm.EBIndex != null)
         {
             EBIndex_List[dgvEBIndex.SelectedRows[0].Index] = indexForm.EBIndex;
             OnEbmIdChanged();
         }
         indexForm.Dispose();
     }
     else
     {
         MessageBox.Show("未选中任何索引");
     }
 }