Пример #1
0
        private void AddIndex()
        {
            EBMContentInfo form   = new EBMContentInfo(Enums.OperateType.Add);
            DialogResult   result = form.ShowDialog();

            if (result == DialogResult.OK && form.Content != null)
            {
                EBContent_List.Add(form.Content);
            }
            form.Dispose();
        }
Пример #2
0
 private void UpdateIndex()
 {
     if (dgvEBContent.SelectedRows.Count > 0)
     {
         EBMContentInfo form   = new EBMContentInfo(Enums.OperateType.Update, EBContent_List[dgvEBContent.SelectedRows[0].Index]);
         DialogResult   result = form.ShowDialog();
         if (result == DialogResult.OK && form.Content != null)
         {
             EBContent_List[dgvEBContent.SelectedRows[0].Index] = form.Content;
         }
         form.Dispose();
     }
     else
     {
         MessageBox.Show("未选中任何索引");
     }
 }